Skip to content

Installation

Ishimoto Shinobu edited this page Jan 19, 2020 · 39 revisions

Introduction

Welcome to the "Installation:" page! In this page we are explaining installation method of Ataraxia Linux for x86 and PowerPC-based PCs. Installation of Ataraxia Linux is very similar to Gentoo or Arch installation method.

Pre-installation

Verify image

Ataraxia Linux team provides a PGP keys to sign images. If you want to verify image, you should use GnuPG. Don't forget to add our public key to check signature. Check integrity of iso file:

gpg --with-fingerprint ataraxialinux-[CPU architecture].iso.sig ataraxialinux-[CPU architecture].iso

Same with stage archive:

gpg --with-fingerprint ataraxialinux-[CPU architecture].tar.zst ataraxialinux-[CPU architecture].tar.zst

Boot into Live CD

You should write Ataraxia's .iso image on your installation media. You can use your favorite method of doing this. After that, boot from your installation media.

Listing keyboard layouts

Ataraxia Linux supports many keyboard layouts. By default it uses American keyboard layout. To list them you should use this command:

ls /usr/share/keymaps/**/*.map.gz | less

Setting up your keyboard layout

If you don't have keyboard with American layout you should set keyboard layout via this command:

loadkeys [your layout]

Checking for EFI support [x86-only]

Ataraxia Linux supports EFI. To check for EFI use this command:

ls /sys/firmware/efi/efivars

Listing network interfaces

Ataraxia Linux supports networking. To list available network devices use this command:

ifconfig -a | less

Setting up network

Ataraxia Linux uses netifrc to setup network. Edit /etc/conf.d/net file:

# Static IP definition
config_[interface]="192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255"
routes_[interface]="default via 192.168.0.1"

To use DHCP:

# DHCP definition
config_[interface]="dhcp"

And then you can start the network:

cd /etc/init.d
ln -sf net.lo net.[interface]
/etc/init.d/net.[interface] start

You may can activate network service to start it at boot

rc-update add net.[interface] default

Partition the disks

Ataraxia Linux have 3 partition programs cfdisk, fdisk and gdisk. To list disks use this command:

fdisk -l

To start partitioning use this command:

cfdisk /dev/[your drive]

For people who use GPT partition table:

gdisk /dev/[your drive]

Format the partitions

You should have at least 1 partition for /. But you can add partitions for /boot/, /home/ and swap.

Format boot partition (optional for bios users)

If you decided to make /boot/ partition use this command: (It's optional in general, but required for EFI users)

mkfs.ext2 /dev/[your boot partition]

For EFI users (REQUIRED): WARNING: Don't forget to change partition type to EFI System Partition (ESP)!

mkfs.fat -F32 /dev/[your boot partition]

Format root partition

Root partition should be format with ext4 filesystem. To do this use this command:

mkfs.ext4 /dev/[your root partition]

Format home partition (optional)

Home partition also should be formatted as ext4 filesystem. To do this use this command:

mkfs.ext4 /dev/[your home partition]

Making swap partition (optional)

To make swap partition use this command:

mkswap /dev/[your swap partition]

Mount file systems

In order you should to mount boot and root partitions. Mount partitions order:

1. Mount root partition
2. Creating directory for boot partition
3. Mount boot partition in boot directory

Mount root partition:

mount /dev/[root partition] /mnt

Mount boot partition:

mkdir -p /mnt/boot
mount /dev/[boot partition] /mnt/boot

WARNING: use this if you're EFI user

mkdir -p /mnt/boot/EFI
mount /dev/[boot partition] /mnt/boot/EFI

Mount optional file systems

In order you should to mount home and swap partitions. Mount partitions order:

1. Creating directory for home partition
2. Mount home partition in home directory
3. Mount swap partition

Mount home partition:

mkdir -p /mnt/home
mount /dev/[home partition] /mnt/home

Mount swap partition:

swapon /dev/[swap partition]

Installing stage archive

Ataraxia Linux have pre-compiled rootfs. It's called stage archive.

Download stage archive

To download stage archive use this command:

cd /mnt
wget https://github.com/ataraxialinux/ataraxia/releases/download/[release]/ataraxialinux-[CPU architecture].tar.zst

Unpack stage archive

To unpack stage archive use this command:

tar -xvf ataraxialinux-[CPU architecture].tar.zst -C /mnt

Configuring fstab

To make Ataraxia Linux bootable you should generate /etc/fstab file:

genfstab -U /mnt >> /mnt/etc/fstab

Entering chroot

mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev
mount --bind /run /mnt/dev

chroot /mnt /bin/mksh

Timezone

To set time zone:

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime

and run hwclock to save the changes:

hwclock --systohc

Syncing local tree

Ataraxia Linux is a source-based Linux distribution. It uses neko to install ports. So we need get them:

reposync

Basic configuration

Hostname and domain information

You may set up your hostname for your PC. It's quite easy by editing /etc/conf.d/hostname, but difficult to come up with a name:

hostname="mypc"

You can do same step for domain name:

dns_domain_lo="mylovelyhome"

Network configuration

Follow steps that you have done before installation.

Further configuration

You can edit files for configuring the init system, font, keymap and so on:

nano /etc/rc.conf
nano /etc/conf.d/keymap
nano /etc/conf.d/consolefont

Package manager configuration

Edit /etc/neko.config to enable use of all of your CPU cores for compilation.

Extra network configuration:

Edit /etc/hosts

127.0.0.1	localhost.localdomain		localhost
::1		localhost.localdomain		localhost
127.0.1.1	*myhostname.localdomain*	*myhostname*

Changing root password

This is optional step:

passwd

Creating user:

useradd -m -G users,wheel,audio,video,input [your user]

and change the password:

passwd [your user]

Final steps

The main bootloader is:

grub - bootloader for x86 and PowerPC. Supports EFI and BIOS (for x86).

Installing grub on your system:

neko install grub

and if you have EFI system:

neko install efibootmgr grub

To install grub on your device (for x86):

grub-install /dev/[device]

For EFI users:

grub-install --target=[x86_64 or i386]-efi  --bootloader-id=grub_uefi --recheck

EFI users should use this (for PowerPC):

grub-install

And update configuration:

grub-mkconfig -o /boot/grub/grub.cfg

Now, exit chroot environment:

exit

Unmount everything:

umount /mnt/proc
umount /mnt/sys
umount /mnt/dev
umount /mnt/run
umount /mnt/boot
umount /mnt/home
umount /mnt

swapoff /dev/[swap partition]

and reboot:

reboot

Congratulation

You have installed Ataraxia Linux on your computer. Explore!

Clone this wiki locally