The migration from the old to the new computer took me a long time, but it also enabled me to write this text – how to manually install ArchLinux. I need a reminder when an accident happens, and it can help someone. When you read “50” steps, it may scare someone, but if you know how to work in the console, there will be no problems. This way of installation can be fun, not to mention that “I am God!” moment and of course bragging in front of a clumsy neighbors that doesn’t even know what Linux is, not to mention the console and all commands you type. They’ll just think you invented the Matrix. This brings with it some bad things, they will ask you to fix their computer. When I say this it means that they will call you for every little thing. The warning is there, the good sides as well, so let me start with the list.
Installation procedure of ArchLinux
1 | iwctl | First and foremost – connecting to the Internet |
2 | station wlan0 connect | |
3 | exit | |
4 | reflector – c Serbia -a 6 –sort rate –save /etc/pacman.d/mirrorlist | Generate a mirrorlist file by selecting the fastest 6 servers in Serbia |
5 | timedatectl set-ntp true | Time synchronization |
6 | gdisk /dev/sda | Partitioning tool on the /dev/sda device |
7 | lsblk | List the partitions created in the previous step |
8 | mkfs.fat -F32 /dev/sda1 | Formats the /dev/sda1 partition to the fat32 file system (EFI partition on which the butloader will be installed) |
9 | mkfs.ext4 /dev/sda2 | Formatting a future “root” partition in an ext4 file system |
10 | mkfs.swap /dev/sda3 | Creating a swap partition |
11 | swapon /dev/sda3 | Mounting a swap partition |
12 | mount /dev/sda2 /mnt | Mounting root partition to /mnt |
13 | mkdir -p /mnt/boot/efi | |
14 | mount /dev/sda1 /mnt/boot/efi | Mount the /dev/sda1 partition on the previously created /mnt/boot/efi directory |
15 | pacstrap /mnt base linux linux-firmware nano amd-ucode | Basic system installation |
16 | genfstab -U /mnt > /mnt/etc/fstab | Generating an fstab file (required to mount partitions at boot time) |
17 | аrch-chroot | Chroot to the installed base system |
18 | ln -sf /usr/share/zoneinfo/Europe/Belgrade /etc/localtime | Configuring local time (time zones) |
19 | hwclock –systohc | Time synchronization |
20 | nano /etc/locale.gen | Selecting the locale (the line en_US.UTF-8 is uncommented in the specified file) |
21 | locale-gen | Generating a locale |
22 | echo “LANG=en_US.UTF-8” >> /etc/locale.conf | Write the locale to the /etc/locale.conf file |
23 | echo “perica” >> /etc/hostname | Adding a hostname to /etc/hostname |
24 | nano /etc/hosts 127.0.0.1 localhost ::1 localhost 127.0.1.1perica.localdomain perica | Add a hostname to /etc/hosts |
25 | passwd | Assign a password to the root |
26 | pacman -S grub efibootmgr networkmanager network-manager-applet wpa_supplicant dialog mtools dosfstools base-devel linux-headers git reflector cups xdg-utils xdg-user-dirs bash-completion alsa-utils pulseaudio acpi acpi_call | Installing the packages (the most important in the series is the bootloader – GRUB, the others can be installed later) |
27 | grub-install –target=x86_64-efi –efi-directory=/boot/efi –bootloader-id=GRUB | Installation of Grub butloader |
28 | grub-mkconfig -o /boot/grub/grub.cfg | Generating a configuration file |
29 | systemctl enable NetworkManager | Enabling the Network Manager service |
30 | systemctl enable cups | Enabling a print service (printer) |
31 | useradd -mG wheel Perica | Adding user Perica |
32 | passwd Perica | Assigning a password to Perica |
33 | EDITOR=nano visudo | Enable execution of all commands (with all users in the wheel group) |
34 | exit | Exit from the chrooted environment |
35 | umount -a | Unmounting the partitions mounted in steps 12 and 14 |
36 | Reboot | Restart the system and first log in to the freshly installed system |
37 | nmtui | Reconnect to the Internet |
38 | sudo timedatectl set-ntp true | Re-sync time |
39 | sudo hwclock –systohc | |
40 | sudo pacman -S rsync | Installing the rsync package |
41 | sudo reflector -c Hungary -a 6 –sort rate –save /etc/pacman.d/mirrorlist | Generate a mirrorlist file by selecting the fastest 6 servers in Serbia |
42 | sudo pacman -Syy | Refreshing repositories based on the generated mirrorlist |
43 | sudo systemctl enable –now reflector.timer | Launch a reflector service that will periodically refresh the mirrorlist file |
44 | sudo systemctl enable –nov fstrim.timer | Starting a service that extends the life of the SSD |
45 | git clone https://aur.archlinux.org/yay | AUR assistant cloning |
46 | cd yay | |
47 | makepkg -si | AUR assistant install |
48 | sudo pacman -S xf86-video-amdgpu xorg firefox plasma-meta plasma-wayland-session kde-applications-meta sddm | Installing drivers for graphics card (Ati/Radeon), Xorg server and Plasma (KDE) environment |
49 | sudo nano /etc/mkinitcpio.conf | Adding amdgpu to the kernel module list |
50 | sudo mkinitcpio -p linux | Kernel recompilation |
51 | sudo systemctl enable sddm | Starting the display manager service |
This text implies knowledge of using a console, disk partitioning tools. Since I normally use KDE Plasma, I mentioned it here during installation, your choice may be different, but then you have to install the appropriate packages. It is possible to install another graphics card driver (if you have Intel or Nvidia), just replace the manufacturer name in the package name in step 48. And after executing all these commands, you should have the system ready to use. Of course you need to install rest of the apps you use. Simple, isn’t it ?! 🙂
Another thing I almost forgot. I recently wrote about installing ArchLinux using the Archfi script. It’s not bad either, but this way is still nicer to me. Not to mention that I got a little tangled so I made the combination Arch-Manjaro 🙂