Installation and configuration documentation of my Arch Linux setup in GitHub Pages.
This page describes how to install a fresh and minimal Arch Linux system for x86_64 machines on a single drive (SSD or HDD).
Both EFI and BIOS configurations are supported. Only the boot loader (GRUB) needs some different arguments. (see EFI and BIOS)
You can check in which mode you’ve booted: If the folder
/sys/firmware/efi
exists, the kernel has booted in EFI mode, else it’s booted in BIOS mode. You can even install a hybrid EFI/BIOS system (thus bootable in both EFI and BIOS mode) by installing in one mode (i.e. BIOS), then reboot in the other (i.e. EFI) and do the Install GRUB bootloader part again.
Both Ext4 and Btrfs root file systems are described, so you can make a choice.
On this page, Ext4 is taken as de facto standard for installations but Btrfs could be considered for its snapshot and volume support and transparent compression.
Go to https://www.archlinux.org/download/ and download the most recent iso file
dd if=<isofile> of /dev/sda bs=4M
… boot the device from the USB stick
You can use lsblk -f
to determine the drive to install to.
When the drive is determined as i.e. /dev/sdX
do:
export DRIVE=/dev/sdX # or i.e. /dev/mmcblk0 for eMMC devices
BOOT=${DRIVE}1 # or ${DRIVE}p1 for eMMC devices
ROOT=${DRIVE}2 # or ${DRIVE}p2 for eMMC devices
Call:
gdisk $DRIVE
… and configure as follows:
o
n
n
n
w
mkfs.fat -F32 $BOOT
mkfs.ext4 -L OS $ROOT
mount -o noatime $ROOT /mnt
OPTIONS=noatime,space_cache,compress=lzo,subvol=subvol_root
mkfs.btrfs -L OS $ROOT
mount $ROOT /mnt
btrfs subvolume Create /mnt/subvol_root
umount /mnt
mount -o $OPTIONS $ROOT /mnt
mkdir /mnt/boot
mount -o noatime $BOOT /mnt/boot
pacstrap -c /mnt base linux grub btrfs-progs efibootmgr
genfstab -Up /mnt >> /mnt/etc/fstab
You can omit the btrfs-progs package when not using btrfs. You can omit the efibootmgr package when booting in BIOS mode.
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot\
--bootloader-id=grub --recheck
grub-install --recheck $DRIVE
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot
For configuration of installation essentials, please see Installation Essentials