Skip to content

part II

this page is under construction

verifying the boot mode

  • check the UEFI bitness

    cat /sys/firmware/efi/fw_platform_size
    

verifying an internet connection exists

  • ensure a network interface exists and is enabled

    ip link
    

updating the system clock

  • ensure the system clock is accurate

    timedatectl set-ntp true
    

creating, formatting, and mounting disk partitions

  • list disks if needed

    fdisk -l
    
  • modify partition tables

    fdisk /dev/sda
    
    [g] [ENTER]
    [n] [ENTER] [p] [ENTER] [ENTER] [ENTER] [+1G] [ENTER]
    [n] [ENTER] [p] [ENTER] [ENTER] [ENTER] [+8G] [ENTER]
    [n] [ENTER] [p] [ENTER] [ENTER] [ENTER] [ENTER]
    [w] [ENTER]
    
  • format partitions

    1
    2
    3
    mkfs.fat -F 32 /dev/sda1
    mkswap /dev/sda2
    mkfs.btrfs /dev/sda3
    
  • mount partitions

    mount /dev/sda3 /mnt
    btrfs su cr /mnt/@
    btrfs su cr /mnt/@home
    btrfs su cr /mnt/@cache
    btrfs su cr /mnt/@log
    btrfs su cr /mnt/@machines
    btrfs su cr /mnt/@portables
    btrfs su cr /mnt/@tmp
    umount /mnt
    mount -o noatime,compress=lzo,subvol=@ /dev/sda3 /mnt
    mkdir -p /mnt/{boot,home,var/cache,var/lib/machines,var/lib/portables,var/log,var/tmp}
    mount -o noatime,compress=lzo,subvol=@home /dev/sda3 /mnt/home
    mount -o noatime,compress=lzo,subvol=@cache /dev/sda3 /mnt/var/cache
    mount -o noatime,compress=lzo,subvol=@log /dev/sda3 /mnt/var/log
    mount -o noatime,compress=lzo,subvol=@machines /dev/sda3 /mnt/var/lib/machines
    mount -o noatime,compress=lzo,subvol=@portables /dev/sda3 /mnt/var/lib/portables
    mount -o noatime,compress=lzo,subvol=@tmp /dev/sda3 /mnt/var/tmp
    mount /dev/sda1 /mnt/boot
    swapon /dev/sda2
    

installing essential packages

  • refresh keyrings

    pacman-key --init
    pacman-key --populate archlinux
    
  • install essential packages

    pacstrap /mnt base base-devel linux linux-firmware btrfs-progs amd-ucode
    

configuring the system

  • generate file system table

    genfstab -U /mnt >> /mnt/etc/fstab
    
  • change root into new file system

    arch-chroot /mnt
    
  • set time zone

    ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime # (1)!
    
    1. e.g. $TIMEZONE is America/New_York
  • set hardware clock

    hwclock --systohc
    
  • set localization

    1
    2
    3
    sed -i "s/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" /etc/locale.gen
    locale-gen
    echo "LANG=en_US.UTF-8" > /etc/locale.conf
    
  • set hosts

    echo -e "127.0.0.1 localhost\n::1 localhost\n127.0.1.1 $HOSTNAME.localdomain $HOSTNAME" > /etc/hosts # (1)!
    
    1. e.g. $HOSTNAME is smith
  • set hostname

    echo "$HOSTNAME" > /etc/hostname # (1)!
    
    1. e.g. $HOSTNAME is smith
  • rebuild initramfs file

    mkinitcpio -P
    
  • install & setup boot loader

    1
    2
    3
    4
    pacman -S bluez efibootmgr git grub nano networkmanager sudo
    # pacman -S vim wpa_supplicant pulseaudio pulseaudio-bluetooth gnome gnome-tweaks
    grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB --recheck
    grub-mkconfig -o /boot/grub/grub.cfg
    
  • setup network manager & bluetooth

    1
    2
    3
    # systemctl enable gdm
    systemctl enable NetworkManager
    systemctl enable bluetooth
    
  • setup sudo

    sed -i "s/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/g" /etc/sudoers
    
  • set root password

    passwd
    
  • create user

    useradd -m -G wheel $USER # (1)!
    passwd $USER
    
    1. $USER is john
  • exit & unmount

    1
    2
    3
    exit
    umount -l /mnt
    shutdown now
    

resources