This guide provides in-detail instructions for steps in Arch installation, a reference for myself.
Pre-requisites:
- disable CSM in bios to prevent errors on GRUB installation.
Patitioning Disk with Fdisk Link to heading
Selecting the disk Link to heading
- Use
sudo fdisk -lorlsblkto list the disk in your computer (lsblkgives less details). - Select the appropriate disk to operate on with
sudo fdisk /dev/sda(be sure to double check the correct disk is selected as it will be wiped).
Create partitions Link to heading
- boot, root and swap (optional) partition.
- For each partition, we need to set a partition type and file system format (Partition type will be set first with fdisk).
- Partition type: Linux Filesystem, EFI System, Linux Swap
- File system type: FAT32, NTFS, VFAT etc.
| Partition | Partition Type | File System Format |
|---|---|---|
| boot | EFI System | FAT32 |
| swap(optional) | Linux Swap | No file system format |
| root | Linux Filesystem | ext4 |
g to create a GPT label (for UEFI system), o for DOS/MBR partition (legacy BIOS)
both of these clears the drive of any previous partitions and starts from clean slate.
Boot partition Link to heading
nto create a new partition.- Hit enter on the first sector, for the last sector:
+1Gto give it 1GB of space. - After creating,
tto set the type,efto set the type EFI partition. +512Mfor e.g. to allocate 512MB of space.- Best to allocate 1GB of space for boot partition as recommended by Arch wiki (encountered an issue trying to install NVIDIA proprietary driver, turns out the boot partition ran out of space).
Swap partition (Optional) Link to heading
n.+4G. (example for 4GB)t, Change the value to 82 (Double check, value for Linux swap might change).
Root partition Link to heading
n. Press enter multiple times to use the default value (the rest of the disk space).
Once everything is done, w to permanently write.
Formatting and Setting Filesystem Type Link to heading
use lsblk to ensure you are formatting the correct partition (sda1/sda2 etc…)
FAT32 for boot partition: Link to heading
mkfs.fat -F32 /dev/sda1
EXT4 for root partition: Link to heading
mkfs.ext4 /dev/root_partition
Enable Swap partition Link to heading
Swap: for example sda2 is for swap.
mkswap /dev/sda2
swapon /dev/sda2
Mounting & Installing Link to heading
- Mount root partition on
/mnt:mount /dev/sda3 /mnt - Install Linux:
pacstrap -K /mnt base linux linux-firmware sudo vi-Kis to create an empty keyring. - Generate filesystem table:
genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mntto go into the installed system.
Grub Installation Link to heading
pacman -S grub efibootmgrmkdir /boot/efimount /dev/efi-partition /boot/efigrub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheckgrub-mkconfig -o /boot/grub/grub.cfg
ref: https://gist.github.com/chriscandy/16899e0d701a05654cb4f79ef2d2d062
Creating User Link to heading
passwdto set a root password, the default root password is an invalid one.useradd -m -G wheel -s /bin/bash username- edit the visudo file to allow users in wheel group to use sudo:
sudo visudo(uncomment the appropriate lines) - adding
-s /bin/bashresolved an issue where the password entered is always incorrect when trying to login. passwd usernameto set a password.
Install GRUB Bootloader Link to heading
- Disable CSM (compatibility support module) support in BIOS
Installing XFCE4 Desktop Environment Link to heading
xfce4 installation: sudo pacman -S xfce4 xfce4-goodies networkmanager lightdm lightdm-gtk-greeter
Enable services: systemctl enable lightdm & systemctl enable NetworkManager
GPU Driver installation Link to heading
- for certain nvidia card, running:
sudo pacman -S nvidia-open nvidia-utils nvidia-settingsand rebooting the pc should work. - otherwise, refer to the full guide: https://github.com/korvahannu/arch-nvidia-drivers-installation-guide
- check if nvidia driver is installed with
nvidia-smi.
Others Link to heading
ctrl-alt-f2to enter terminal if stuck at booting.- If accidentally logout from installation medium, default password is
root.