User Tools

This is an old revision of the document!


Install arch linux with zfs root

  1. Obtain latest ISO from archlinux.org and burn it to an ISO
  2. Boot up and change / size \
    1. mount a swap partition
    2. mount -o remount,size=16G /run/archiso/cowspace
  3. Add zfs support
    1. curl -s https://archzfs.leibelt.de/media/setup/init | bash
    2. zgenhostid -f 0x00bab10c
  4. Partition Disk(s)
    1. Create EFI partition
      sgdisk -n "1:1m:+512m" -t "1:ef00" /dev/sda
    2. I suggest a swap partition large enough to hold RAM (8g) contents if you intend to use hibernate
      sgdisk -n "2:0:+8g" -t "2:8200" /dev/sda
    3. Allocate the remainder to the ZFS pool
      sgdisk -n "3:0:-10m" -t "3:bf00" /dev/sda
  5. Create file systems
  6. Export/Import pool and mount file systems
  7. Install the system
    1. pacstrap /mnt linux linux-headers linux-firmware base vim amd-ucode networkmanager sudo openssh rsync
  8. Move into the install
    1. arch-chroot /mnt
  9. Set up arch system
    1. Time
      ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
      hwclock --systohc
    2. locale
      sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
      locale-gen
      echo "LANG=en_US.UTF-8" > /etc/locale.conf
    3. vconsole
      1. echo -e "KEYMAP=us\n#FONT=latarcyrheb-sun32" > /etc/vconsole.conf
    4. hostname/hosts
      1. echo tas > /etc/hostname
    5. set root password
      passwd root
  10. Create a normal user and add to sudoers/wheel group
    1. useradd -G wheel some_user
      passwd some_user
    2. edit sudoers with visudo to uncomment one of the wheel stanzas
      EDITOR=vim visudo
    3. create home for some_user
      mkdir -p ~some_user && chown some_user ~some_user
    4. su - some_user
  11. Install paru
    sudo pacman -S --needed base-devel git
    git clone https://aur.archlinux.org/paru.git
    cd paru
    makepkg -si
  12. Install zfs support
    paru -S zfs-utils
    paru -S zfs-dkms
    1. exit to root
  13. finish setup
    1. zgenhostid -f 0x00bab10c
    2. edit /etc/mkinitcpio.conf and modify the HOOKS line
      1. remove fsck, add zfs resume
      2. mkinitcpio -P
    3. set up services
      systemctl disable zfs-import-cache.service
      systemctl mask zfs-import-cache.service
      systemctl enable zfs-import-scan.service zfs-mount.service zfs.target zfs-volumes.target zfs-import.target zfs-zed.service NetworkManager

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information