sed -ri '/^crypt_dev/d' /tmp/fai/crypttab
mount -o subvol=root_$DISTRO /dev/mapper/crypt_dev_?da$rootn /mnt
mkdir -p /mnt/{q,home}
-mount -o subvol=/q /dev/mapper/crypt_dev_?da$rootn /mnt/q
-mount -o subvol=/home_$DISTRO /dev/mapper/crypt_dev_?da$rootn /mnt/home
+mount -o subvol=q /dev/mapper/crypt_dev_?da$rootn /mnt/q
+mount -o subvol=home_$DISTRO /dev/mapper/crypt_dev_?da$rootn /mnt/home
mkdir -p /mnt/boot
-mount /dev/?da$bootn /mnt/boot
+mount -o subvol=boot_$DISTRO /dev/?da$bootn /mnt/boot
# https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption#Keyfiles
cp /root/luks/host-$hostname /mnt/crypto_keyfile.bin
EOF
;;
*)
- echo "$0: 2nd fstab:"
- cat /mnt/etc/fstab
cp -r .ssh /mnt/root
cp -r /root/distro-install-common /mnt/root
;;&
ln -s /run/systemd/resolve/resolv.conf /mnt/etc/resolv.conf
# not necsesary, but makes reboot go fast.
-umount -R /mnt
+umount -R /mnt; sleep 1
# causes 255 exit code, so doing this from the caller script.
# reboot now