# dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync
# loadkeys be-latin1
# wifi-menu
# vim /etc/pacman.conf
----------------------
[archzfs]
Server = http://archzfs.com/$repo/$arch
# pacman-key -r 0ee7a126
# pacman-key --lsign-key 0ee7a126
# pacman -Sy linux-headers zfs-dkms spl-dkms
# modprobe zfs
# touch /etc/zfs/zpool.cache
# parted /dev/sdx
-----------------
(parted) mklabel gpt
(parted) mkpart ESP fat32 1MiB 513MiB
(parted) set 1 boot on
(parted) mkpart primary ext2 513MiB 99%
# cryptsetup luksFormat --type luks2 -v -s 512 /dev/sdx2
# cryptsetup open /dev/sdx2 cryptroot
canmount=off
makes it so actual data is stored inside the parent dataset; but
the hierarchical structure exists for possible children.
Double check before you run any of these; not all are necessarily required either
# zpool create -o ashift=12 -o cachefile=/etc/zfs/zpool.cache -m none -R /mnt zroot /dev/mapper/cryptroot
# zfs create -o mountpoint=none -o compression=lz4 zroot/ROOT
# zfs create -o mountpoint=/ zroot/ROOT/default
# zfs create -o canmount=off -o mountpoint=/var -o xattr=sa zroot/ROOT/var
# zfs create -o canmount=off -o mountpoint=/var/lib zroot/ROOT/var/lib
# zfs create -o canmount=off -o mountpoint=/var/lib/systemd zroot/ROOT/var/lib/systemd
# zfs create -o canmount=off -o mountpoint=/usr zroot/ROOT/usr
# zfs create -o mountpoint=/opt zroot/ROOT/opt
# zfs create -o mountpoint=/var/lib/systemd/coredump zroot/ROOT/var/lib/systemd/coredump
# zfs create -o mountpoint=/var/log zroot/ROOT/var/log
# zfs create -o acltype=posixacl -o mountpoint=/var/log/journal zroot/ROOT/var/log/journal
# zfs create -o mountpoint=/home zroot/home
# zfs create -o mountpoint=/root zroot/home/root
# zfs create -o mountpoint=/home/<username> zroot/home/<username>
# zpool set bootfs=zroot zroot
# zfs set relatime=on zroot
# zfs set compression=lz4 zroot
# zfs create -V 16G -b 4096 -o logbias=throughput -o sync=always -o primarycache=metadata -o com.sun:auto-snapshot=false zroot/swap
# mkswap -f /dev/zvol/zroot/swap
# zpool export zroot
# zpool import -R /mnt zroot
# mkdir /mnt/boot
# mount /dev/sdx1 /mnt/boot
# pacstrap -i /mnt base base-devel
# loadkeys us
# genfstab -U -p /mnt | grep boot >> /mnt/etc/fstab
# loadkeys be-latin1
# vim /mnt/etc/fstab
--------------------
/dev/zvol/zroot/swap none swap discard 0 0
# arch-chroot /mnt /bin/bash
# vi /etc/locale.gen
--------------------
Uncomment en_US.UTF-8 UTF-8
# locale-gen
# vi /etc/locale.conf
---------------------
LANG=en_US.UTF-8
# rm /etc/localtime
# ln -s /usr/share/zoneinfo/Europe/Brussels /etc/localtime
# hwclock --systohc --utc
# pacman -S ntp
# ntpd -q
# hwclock -w
# pacman -S vim
# pacman -S terminus-font
# vim /etc/vconsole.conf
------------------------
KEYMAP=be-latin1
FONT=ter-112n
# vim /etc/pacman.conf
----------------------
[archzfs]
Server = http://archzfs.com/$repo/$arch
# pacman-key -r 0ee7a126
# pacman-key --lsign-key 0ee7a126
# vim /etc/pacman.d/mirrorlist
------------------------------
Move i3d.net up to top (with https)
# pacman -Syu
# pacman -S linux-headers zfs-dkms spl-dkms
# systemctl enable zfs.target
# systemctl enable zfs-import-cache
# systemctl enable zfs-mount
# vim /etc/modprobe.d/zfs.conf
------------------------------
options zfs zfs_arc_max="2147483648"
# vim /etc/mkinitcpio.conf
--------------------------
HOOKS=(base udev autodetect modconf keyboard keymap consolefont block encrypt zfs filesystems)
# mkinitcpio -p linux
# passwd
# vim /etc/hostname
-------------------
<hostname>
# bootctl --path=/boot install
# vim /boot/loader/loader.conf
------------------------------
default arch
timeout 4
editor 0
# loadkeys us
# blkid /dev/sdx2 > partitionid.txt
# loadkeys be-latin1
# vim /boot/loader/entries/arch.conf
------------------------------------
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID=<UUID>:cryptroot:allow-discards zfs=zroot/ROOT/default rw pcie_aspm=force
# vim /boot/loader/entries/arch-fallback.conf
---------------------------------------------
title Arch Linux Fallback
linux /vmlinuz-linux
initrd /initramfs-linux-fallback.img
options cryptdevice=UUID=<UUID>:cryptroot:allow-discards zfs=zroot/ROOT/default rw
# pacman -S networkmanager openssh tlp smartmontools ethtool networkmanager-openvpn x86_energy_perf_policy
# systemctl enable NetworkManager
# systemctl enable tlp
# systemctl enable tlp-sleep
# systemctl enable fstrim.timer
# vim /etc/modprobe.d/alsa-base.conf
------------------------------------
options snd_hda_intel index=1,0
# exit
# cp /etc/zfs/zpool.cache /mnt/etc/zfs/
# umount /mnt/boot
# zpool export zroot
# reboot
# nmcli d wifi list
# nmcli dev wifi connect <SSID> password <password>
# ping google.com
# pacman -S zsh
# useradd -m -G wheel -s /bin/zsh <username>
# zfs allow <username> create,mount,mountpoint,snapshot zroot/home/<username>
# chown -R <username> /home/<username>
# passwd <username>
# visudo
--------
Uncomment %wheel ALL=(ALL) ALL
# pacman -S rsync xorg-server xf86-video-intel xorg-xinit xorg-xrandr i3 pulseaudio pavucontrol termite conky git libyaml gcc6 imagemagick xorg-xbacklight mpv notify-osd ttf-inconsolata ttf-bitstream-vera ttf-dejavu ttf-droid ttf-fira-mono ttf-fira-sans ttf-freefont ttf-liberation ttf-roboto ttf-ubuntu-font-family
# exit
$ cp /etc/X11/xinit/xinitrc .xinitrc
$ vim .xinitrc
--------------
exec i3
$ gsettings set org.gnome.desktop.interface scaling-factor 2
$ vim .Xresources
-----------------
Xft.dpi: 166
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.hinting: true
Xft.antialias: true
Xft.rgba: rgb
$ startx
$ setxkbmap be
Great! Thank you so much!
I forked it and headers with info on; creating your own archiso to have the latest kernel when installing zfs-dkms, couldn't get your keys to work so changed them to the official ones on the ZOL github, formatting boot partition, using reflector package to update the mirrors.
I'm stuck at the last step though. I get systemd boot to launch and display my "Arch Linux" entry, but nothing happens when choosing it. Would you know what that's about? Added the hooks in mkinitcpio and rebuilt the kernel.
EDIT Did "solve" the issue. Everything starts up normally but the screen is black. If i type in the LUKS-password blindly and press enter, everything boots OK after.
Again; Thank you for the detailed instructions!