Skip to content

Instantly share code, notes, and snippets.

@yonderbread
Last active September 20, 2021 04:16
Show Gist options
  • Save yonderbread/cbf8a3c4d975874842dfaffd679f66b1 to your computer and use it in GitHub Desktop.
Save yonderbread/cbf8a3c4d975874842dfaffd679f66b1 to your computer and use it in GitHub Desktop.

Install Artix Linux from Live USB (openrc init system)

1. Boot from CD/DVD

Once booted into the live enviorment, choose to boot from CD/DVD.

2. Login

Log into the Artix Linux root user with the username and password available below.

Username : root

Password : artix

3. Update packages

Run pacman -Syu to update repos, databases and packages.

4. [Optional Step] Wifi

If you need to connect to wifi, you can do the following to connect to a wireless network.

  • Run ip a to list your network interfaces and locate your wifi network adapter's interface name, most likely it will be called wlan0.

  • Enable the wifi network interface with ip link set wlan0 up, where wlan0 is the name of your interface.

    Note: If you get an error message such as RTNETLINK answers: Operation not possible due to RF-KILL attempt to unblock the operatation with

    rfkill unblock wifi
  • Install connmanctl

pacman -S connman-openrc connman-gtk cmst
rc-update add connmand
  • Run connmanctl to open the connman command line

  • Scan for available wireless networks with scan wifi

  • List available wireless networks with services

  • Run agent on to enable the wifi agent

  • Run connect NETWORK (where NETWORK is the network) name you chose earlier. Enter the wifi password if requested

  • Exit the connman cli with the quit command

5. Choose a disk

To view available disk devices and their partitions, run the lsblk command. Find the name of the device you'd like to install to, then pass it as an argument to cfdisk. For example, to open /dev/sda with cfdisk you would run

cfdisk /dev/sda
6. Set up partitions

Delete all partitions on the device and create the following new partitions

  • 200MB EFI partition
  • Use the rest of the free space, or any amount you desire for a Linux filesystem partition

Write the changes to disk and then quit.

7. Format partitions

Format the EFI partition as FAT32 with

mkfs.fat -F32 /dev/sda1

.. where /dev/sda1 is the EFI partition

Format the Linux filesystem partition as EXT4 with

mkfs.ext4 /dev/sda2

.. where /dev/sda2 is the Linux filesystem partition

8. Create filesystem
mount /dev/sda2 /mnt # mount linux filesystem
mkdir -p /mnt/boot/efi # make efi boot directory
mount /dev/sda1 /mnt/boot/efi # mount efi boot directory
basestrap /mnt base base-devel openrc elogind-openrc linux linux-firmware vim nano intel-ucode # install base packages
fstabgen -U /mnt >> /mnt/etc/fstab # generate fstab file
cat /mnt/etc/fstab # verify fstab file was generated successfully
artools-chroot /mnt # open chroot command line in new filesystem
9. Set up swapfile and fstab file
dd if=/dev/zero of=/swapfile bs=1G count=2 status=progress # create 2GB swap file
chmod 600 /swapfile # change swap file permissions
mkswap /swapfile && swapon /swapfile # activate swapfile
nano /etc/fstab # add "/swapfile none swap defaults 0 0" line to fstab file
10. Setup locale
ln -sf /usr/share/zoneinfo/US /etc/localtime # set localtime file to US
hwclock --systohc # sync clock
nano /etc/locale.gen # uncomment your locale and save+quit (Example: en_US.UTF-8 UTF-8)
locale-gen # generate locales
nano /etc/locale.conf # add LANG=en_US.UTF-8 and then save+quit
11. Set up linux enviorment
nano /etc/hostname # add hostname such as "artix"
nano /etc/conf.d/hostname # add "hostname='artix'" (for openrc)
pacman -S dhclient # install dhcp client
pacman -S wpa_supplicant # wireless connection helper package
# add the following lines to /etc/hosts:
# 127.0.0.1        localhost
# ::1              localhost
# 127.0.0.1        artix.localdomain        artix
# (or replace "artix" your chosen hostname)
nano /etc/hosts # .. then save+quit
passwd # set root password
useradd -m tux # add user "tux"
passwd tux # change tux user's password
12. Install Bootloader & Extra Packages
pacman -S grub efibootmgr networkmanager networkmanager-openrc network-manager-applet \
    dosfstools linux-headers bluez bluez-utils cups cups-openrc xdg-utils xdg-user-dirs
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB # install grub
grub-mkconfig -o /boot/grub/grub.cfg # generate grub boot config
13. Finish up installation
exit # leave chroot
unmount -R /mnt # unmount filesystem
reboot # reboot system
14. Post-install steps

Login to your non superuser account and run the following commands

sudo pacman -Syu --noconfirm # update everything
sudo pacman -S xorg --noconfirm # install x graphical enviorment
pacman -S lxqt --noconfirm # LXQt desktop enviorment
pacman -S neovim mousepad system-config-printer blueman connman-gtk \
    sddm-openrc elogind elogind-openrc git --noconfirm
15. [Optional] Build and install paru AUR helper
git clone https://github.com/Morganamilo/paru paru-git
cd paru-git
sudo pacman -S --needed base-devel
makepkg -si
paru -Syu --noconfirm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment