Multiple fixes for Root on ZFS guide (#191)
* Let user know that SELinux will be re-enabled after reboot Signed-off-by: Maurice Zhou <jasper@apvc.uk> * compat with future releases: use zfs-dkms and newer repo Signed-off-by: Maurice Zhou <jasper@apvc.uk> * rm unused releasever option Signed-off-by: Maurice Zhou <jasper@apvc.uk> * let user aware of the ignorable errors Signed-off-by: Maurice Zhou <jasper@apvc.uk> * detailed explanations for errors during grub-menu generation Signed-off-by: Maurice Zhou <jasper@apvc.uk> * Build ZFS dkms module in installed system Signed-off-by: Maurice Zhou <jasper@apvc.uk> * switch to dkms package for better compatibility with kernels Signed-off-by: Maurice Zhou <jasper@apvc.uk> * add direct download links for live iso Signed-off-by: Maurice Zhou <jasper@apvc.uk> * rm zfs-fuse before install; mirrorlist Signed-off-by: Maurice Zhou <jasper@apvc.uk> * reformat notes Signed-off-by: Maurice Zhou <jasper@apvc.uk> * rm netconfig - networkmanager is enabled by default Signed-off-by: Maurice Zhou <jasper@apvc.uk> * load kernel module in live; Signed-off-by: Maurice Zhou <jasper@apvc.uk> * rm encrypted bpool: untested Signed-off-by: Maurice Zhou <jasper@apvc.uk> * use u=r,go= permission on key file Signed-off-by: Maurice Zhou <jasper@apvc.uk> * fix typo Signed-off-by: Maurice Zhou <jasper@apvc.uk> * use bash shell Signed-off-by: Maurice Zhou <jasper@apvc.uk> * suggest clean the disks Signed-off-by: Maurice Zhou <jasper@apvc.uk> * add grub-menu auto update Signed-off-by: Maurice Zhou <jasper@apvc.uk> * monitor kernel-core pkg Signed-off-by: Maurice Zhou <jasper@apvc.uk> * copyright 2021 Signed-off-by: Maurice Zhou <jasper@apvc.uk> * fix kernel var detection Signed-off-by: Maurice Zhou <jasper@apvc.uk> * read-only cache file Signed-off-by: Maurice Zhou <jasper@apvc.uk> * replace zfs-mount.service with zfs-mount-generator Signed-off-by: Maurice Zhou <jasper@apvc.uk> * notes for mount and POSIX-compliant Signed-off-by: Maurice Zhou <jasper@apvc.uk> * hard-code kernel version Signed-off-by: Maurice Zhou <jasper@apvc.uk> * fix chroot variable Signed-off-by: Maurice Zhou <jasper@apvc.uk> * fix grub cfg Signed-off-by: Maurice Zhou <jasper@apvc.uk> * fix grub Signed-off-by: Maurice Zhou <jasper@apvc.uk> * missing comment Signed-off-by: Maurice Zhou <jasper@apvc.uk> * comments Signed-off-by: Maurice Zhou <jasper@apvc.uk>
This commit is contained in:
@@ -21,14 +21,14 @@ System Configuration
|
||||
#. Generate fstab::
|
||||
|
||||
echo bpool_$INST_UUID/$INST_ID/BOOT/default /boot zfs rw,xattr,posixacl 0 0 >> /mnt/etc/fstab
|
||||
for i in ${DISK[@]}; do
|
||||
for i in ${DISK}; do
|
||||
echo UUID=$(blkid -s UUID -o value ${i}-part1) /boot/efis/${i##*/}-part1 vfat \
|
||||
x-systemd.idle-timeout=1min,x-systemd.automount,noauto,umask=0022,fmask=0022,dmask=0022 0 1 >> /mnt/etc/fstab
|
||||
done
|
||||
echo UUID=$(blkid -s UUID -o value ${INST_PRIMARY_DISK}-part1) /boot/efi vfat \
|
||||
x-systemd.idle-timeout=1min,x-systemd.automount,noauto,umask=0022,fmask=0022,dmask=0022 0 1 >> /mnt/etc/fstab
|
||||
if [ "${INST_PARTSIZE_SWAP}" != "" ]; then
|
||||
for i in ${DISK[@]}; do
|
||||
for i in ${DISK}; do
|
||||
echo ${i##*/}-part4-swap ${i}-part4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256,discard >> /mnt/etc/crypttab
|
||||
echo /dev/mapper/${i##*/}-part4-swap none swap x-systemd.requires=cryptsetup.target,defaults 0 0 >> /mnt/etc/fstab
|
||||
done
|
||||
@@ -43,24 +43,6 @@ System Configuration
|
||||
|
||||
echo 'add_dracutmodules+=" zfs "' > /mnt/etc/dracut.conf.d/zfs.conf
|
||||
|
||||
#. Enable DHCP on all ethernet ports::
|
||||
|
||||
tee /mnt/etc/systemd/network/20-default.network <<EOF
|
||||
|
||||
[Match]
|
||||
Name=en*
|
||||
Name=eth*
|
||||
|
||||
[Network]
|
||||
DHCP=yes
|
||||
EOF
|
||||
systemctl enable systemd-networkd systemd-resolved --root=/mnt
|
||||
|
||||
Customize this file if the system is not using wired DHCP network.
|
||||
See `Network Configuration <https://wiki.archlinux.org/index.php/Network_configuration>`__.
|
||||
|
||||
Alternatively, configure ``NetworkManager``.
|
||||
|
||||
#. Enable timezone sync::
|
||||
|
||||
hwclock --systohc
|
||||
@@ -93,7 +75,12 @@ System Configuration
|
||||
|
||||
#. Enable ZFS services::
|
||||
|
||||
systemctl enable zfs-import-scan.service zfs-import.target zfs-mount zfs-zed zfs.target --root=/mnt
|
||||
systemctl enable zfs-import-scan.service zfs-import.target zfs-zed zfs.target --root=/mnt
|
||||
systemctl disable zfs-mount --root=/mnt
|
||||
|
||||
At boot, datasets on rpool are mounted with ``zfs-mount-generator``,
|
||||
which can control the mounting process more precisely than ``zfs-mount.service``.
|
||||
|
||||
|
||||
#. By default SSH server is enabled, allowing root login by password,
|
||||
disable SSH server::
|
||||
@@ -108,8 +95,8 @@ System Configuration
|
||||
INST_UUID=$INST_UUID
|
||||
INST_ID=$INST_ID
|
||||
unalias -a
|
||||
INST_VDEV=$INST_VDEV" > /mnt/root/chroot
|
||||
echo DISK=\($(for i in ${DISK[@]}; do printf "$i "; done)\) >> /mnt/root/chroot
|
||||
INST_VDEV=$INST_VDEV
|
||||
DISK=$DISK" > /mnt/root/chroot
|
||||
arch-chroot /mnt bash --login
|
||||
|
||||
#. Source variables::
|
||||
|
||||
Reference in New Issue
Block a user