Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computers:linux:arch-zfs-install [2025/09/02 11:35] – wikiadmin | computers:linux:arch-zfs-install [2025/09/06 11:30] (current) – wikiadmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Install arch linux with zfs root ===== | + | ===== Install arch linux with zfs root ===== |
| + | |||
| - Obtain latest ISO from archlinux.org and burn it to an ISO | - Obtain latest ISO from archlinux.org and burn it to an ISO | ||
| - Boot up and change / size \ | - Boot up and change / size \ | ||
| Line 31: | Line 33: | ||
| zfs create -o mountpoint=/ | zfs create -o mountpoint=/ | ||
| zfs mount zroot/ | zfs mount zroot/ | ||
| - | zfs create -o mountpoint=none zroot/homes | ||
| - | zfs create -o mountpoint=/ | ||
| - | zfs create -o mountpoint=/ | ||
| zfs mount | zfs mount | ||
| zroot/ | zroot/ | ||
| - | zroot/ | ||
| - | zroot/ | ||
| </ | </ | ||
| - Set up EFI and swap partitions< | - Set up EFI and swap partitions< | ||
| Line 46: | Line 43: | ||
| - Populate the fstab< | - Populate the fstab< | ||
| echo " | echo " | ||
| - | echo " | + | echo " |
| - Move into the install | - Move into the install | ||
| - < | - < | ||
| Line 55: | Line 52: | ||
| locale-gen | locale-gen | ||
| echo " | echo " | ||
| - | - vconsole | + | - vconsole< |
| - | - < | + | - hostname/ |
| - | - hostname/ | + | |
| - | - < | + | |
| - set root password< | - set root password< | ||
| - | - Create a normal user and add to sudoers/ | + | - Create a normal user and add to sudoers/ |
| - | - < | + | passwd |
| - | passwd some_user</ | + | mkdir -p ~some_user && chown some_user ~some_user</ |
| - edit sudoers with visudo to uncomment one of the wheel stanzas< | - edit sudoers with visudo to uncomment one of the wheel stanzas< | ||
| EDITOR=vim visudo</ | EDITOR=vim visudo</ | ||
| Line 71: | Line 66: | ||
| cd paru | cd paru | ||
| makepkg -si | makepkg -si | ||
| - | cd .. | ||
| - | rm -rf .cargo/ paru/ | ||
| </ | </ | ||
| - Install zfs support< | - Install zfs support< | ||
| - | paru -S zfs-dkms</ | + | paru -S zfs-dkms |
| - | - exit to root | + | </ |
| + | - exit to root< | ||
| - finish setup | - finish setup | ||
| - < | - < | ||
| - | - edit / | + | - edit / |
| - | - remove fsck, add zfs resume | + | vim / |
| - | - < | + | grep ^HOOKS / |
| + | HOOKS=(base udev autodetect microcode modconf kms keyboard keymap | ||
| + | mkinitcpio | ||
| + | | ||
| - set up services< | - set up services< | ||
| systemctl mask 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</ | systemctl enable zfs-import-scan.service zfs-mount.service zfs.target zfs-volumes.target zfs-import.target zfs-zed.service NetworkManager</ | ||
| + | - Set up the EFI and install zfsbootmenu< | ||
| + | zfs set org.zfsbootmenu: | ||
| + | mkdir /boot/efi | ||
| + | mount /boot/efi | ||
| + | mkdir -p / | ||
| + | curl -o / | ||
| + | cp / | ||
| + | pacman -S refind | ||
| + | refind-install | ||
| + | rm / | ||
| + | cat << EOF >> / | ||
| + | |||
| + | menuentry "zbm boot" { | ||
| + | loader / | ||
| + | options "quiet loglevel=0 zbm.skip" | ||
| + | } | ||
| + | menuentry "zbm menu" { | ||
| + | loader / | ||
| + | options "quiet loglevel=0 zbm.show" | ||
| + | } | ||
| + | menuentry "zbm backup menu" { | ||
| + | loader / | ||
| + | options "quiet loglevel=0 zbm.show" | ||
| + | } | ||
| + | EOF | ||
| + | </ | ||
| + | - Exit and reboot< | ||
| + | exit | ||
| + | umount -n -R /mnt | ||
| + | zpool export zroot | ||
| + | reboot | ||
| + | </ | ||
| + | - Finish up | ||
| + | - Log in as root< | ||
| + | zfs create -o mountpoint=none zroot/homes | ||
| + | zfs create -o mountpoint=/ | ||
| + | zfs create -o mountpoint=/ | ||
| + | cp -r /etc/skel/. ~ | ||
| + | cp -r /etc/skel/. ~some_user | ||
| + | chown -R some_user: | ||
| + | chmod 750 ~some_user | ||
| + | zfs snapshot zroot/ | ||
| + | exit | ||
| + | </ | ||
