Preparation

  1. Download 2021.05.01 Live ISO and signature.

  2. Follow installation guide on Arch wiki up to Update the system clock.

  3. Set root password or /root/authorized_keys.

  4. Start SSH server:

    systemctl start sshd
    
  5. Connect from another computer and enter a bash shell:

    ssh root@192.168.1.19
    bash
    
  6. Add archzfs repo.

  7. Install ZFS:

    LIVE_ZFS_PKG="zfs-linux-2.0.4_5.11.16.arch1.1-1-x86_64.pkg.tar.zst"
    LIVE_ZFS_UTILS="zfs-utils-2.0.4-1-x86_64.pkg.tar.zst"
    LIVE_ZFS_MIRROR="https://mirror.sum7.eu/archlinux/archzfs"
    pacman -U --noconfirm ${LIVE_ZFS_MIRROR}/archzfs/x86_64/${LIVE_ZFS_UTILS} || \
    pacman -U --noconfirm ${LIVE_ZFS_MIRROR}/archive_archzfs/${LIVE_ZFS_UTILS}
    pacman -U --noconfirm ${LIVE_ZFS_MIRROR}/archzfs/x86_64/${LIVE_ZFS_PKG} || \
    pacman -U --noconfirm ${LIVE_ZFS_MIRROR}/archive_archzfs/${LIVE_ZFS_PKG}
    modprobe zfs
    
  8. Timezone

    List available timezones with:

    ls /usr/share/zoneinfo/
    

    Store target timezone in a variable:

    INST_TZ=/usr/share/zoneinfo/Asia/Irkutsk
    
  9. Host name

    Store the host name in a variable:

    INST_HOST='archonzfs'
    
  10. Kernel variant

    Store the kernel variant in a variable. Available variants in official repo are:

    • linux

    • linux-lts

    • linux-zen

    • linux-hardened

    INST_LINVAR='linux'
    

    linux-hardened does not support hibernation.

  11. Unique pool suffix. ZFS expects pool names to be unique, therefore it’s recommended to create pools with a unique suffix:

    INST_UUID=$(dd if=/dev/urandom bs=1 count=100 2>/dev/null | tr -dc 'a-z0-9' | cut -c-6)
    
  12. Identify this installation in ZFS filesystem path:

    INST_ID=arch
    
  13. Target disk

    List available disks with:

    ls /dev/disk/by-id/*
    

    If using virtio as disk bus, use /dev/disk/by-path/* or /dev/vd*.

    Declare disk array:

    DISK=(/dev/disk/by-id/ata-FOO /dev/disk/by-id/nvme-BAR)
    

    For single disk installation, use:

    DISK=(/dev/disk/by-id/disk1)
    
  14. Choose a primary disk. This disk will be used for primary EFI partition and hibernation, default to first disk in the array:

    INST_PRIMARY_DISK=${DISK[0]}
    

    If disk path contains colon :, this disk can not be used for hibernation. encrypt mkinitcpio hook treats : as argument separator without a means to escape this character.

  15. Set vdev topology, possible values are:

    • (not set, single disk or striped; no redundancy)

    • mirror

    • raidz1

    • raidz2

    • raidz3

    INST_VDEV=
    
  16. Set partition size:

    Set ESP size. ESP contains Live ISO for recovery, as described in optional configurations:

    INST_PARTSIZE_ESP=4 # in GB
    #INST_PARTSIZE_ESP=1 # if local recovery is not needed
    

    Set boot pool size. To avoid running out of space while using boot environments, the minimum is 4GB. Adjust the size if you intend to use multiple kernel/distros:

    INST_PARTSIZE_BPOOL=4
    

    Set swap size. It’s recommended to setup a swap partition. If you intend to use hibernation, the minimum should be no less than RAM size. Skip if swap is not needed:

    INST_PARTSIZE_SWAP=8
    

    Root pool size, use all remaining disk space if not set:

    INST_PARTSIZE_RPOOL=