back Tech:
DATE 20240807
Arch linux installation is not that hard if you do it simple as if:
If so, it is done in 10 minutes (without downloading and installation time). In this tutorial, The Arch Linux is installed as
/dev/sda, partition table is as follows:
/dev/sda1 | BOOT Partition and to be mounted to /boot. |
/dev/sda2 | ROOT Partition and to be mounted to /. |
/dev/sda3 | SWAP Partition and no need to be mounted to. |
/dev/sda4 | HOME Partition and to be mounted to /home. |
# dd if=/path/to/archlinux-version-x86_64.iso of=/dev/sdb
Getting the installation media booted up, choosing UEFI in boot menu if needed. How to get the installation booted up?
To connect to internet (WiFi) using iwd
# iwctl
for more deatils, see: Connect to a network
GPT fdisk is personally recommended for partitioning the disk. GPT fdisk— consisting of the gdisk, cgdisk, sgdisk and fixparts programs—is a set of text-mode partitioning tools. Assuming your device is /dev/sda, run the following command and follow on-screen instructions.
# gdisk /dev/sda
Partitioning the disk by gdisk is just creating partition table on the disk. Formatting is still needed. In other words, formatting is writing filesystem on the partition. In this tutorial, EXT4 Filesystem is used for all partition except /boot partition where bootlader's files will reside and which is created as EFI System Partition.
/dev/sda1500MB or 1GB is recommended.ef00/bootFAT32 filesystem
# mkfs.fat -F32 /dev/sda1
/dev/sda230GB is recommended.8300/EXT4 filesystem
# mkfs.ext4 /dev/sda2
/dev/sda38GB is recommended.8200swap partition
# mkswap /dev/sda3
/dev/sda4/dev/sda8300/homeEXT4 filesystem
# mkfs.ext4 /dev/sda4
Mounting involves creating directories where the partitions will be mounted. Activating swap can be done by using swapon command.
/mnt./mnt/boot for BOOT Partition/mnt/home for HOME Partition/mnt/boot and /mnt/home.swapon.# mount /dev/sda2 /mnt
# mkdir /mnt/boot
# mkdir /mnt/home
# mount /dev/sda1 /mnt/boot
# mount /dev/sda4/mnt/home
# swapon /dev/sda3
At this stage, base system can be installed. It is also recommended to install other useful packages such as base-devel, nano, nvim, networkmanager.
# pacstrap /mnt base linux linux-firmware base-devel neovim networkmanager
# genfstab -U /mnt >> /mnt/etc/fstab
# arch-chroot /mnt
# ln -sf /usr/share/zoneinfo/Asia/Yangon /etc/localtime
# hwclock --systohc
# nano /etc/locale.gen
Uncomment en_US.UTF-8 UTF-8. If nano is not available, run pacman -S nano to install it first.
# locale-gen
# nano /etc/locale.conf
LANG=en_US.UTF-8
# nano /etc/hostname
myhostname
#nano /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
# passwd
# useradd -m -G wheel -s /bin/bash myusername
# passwd myusername
# EDITOR=nano visudo
uncomment the following line
%wheel ALL=(ALL) ALL
See: Systemd-boot for more details. Below command would be working only if EFI System Partition (ESP) is mounted to /boot or /efi. Mounting ESP to /boot is the most recommended and simplest. Read ESP Typical Mount Points for more knowledge.
# bootctl install
When running bootctl install, systemd-boot will try to locate the ESP at /efi, /boot, and /boot/efi. Setting esp to a different location requires passing the --esp-path=esp option.
# nano /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sda2 rw
# exit
# umount -R /mnt
# reboot
At this stage, the base installation finished. See General recommendations for system management directions and post-installation tutorials (like creating unprivileged user accounts, setting up a graphical user interface, sound or a touchpad). For a list of applications that may be of interest, see List of applications.