export CLASS_TWO_DISK=true
export LUKS_DIR=/root/luks
export HOSTNAME=$hostname
+export DISTRO=arch
chmod +x partition.DEFAULT
./partition.DEFAULT
# arch doesn't need crypttab entries for initramfs crypt partititions
export bootn=3
export swapn=2
sed -ri '/^crypt_dev/d' /tmp/fai/crypttab
-mount -o subvol=/root /dev/mapper/crypt_dev_?da$rootn /mnt
+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 /dev/mapper/crypt_dev_?da$rootn /mnt/home
-mkdir -p /mnt/etc
-cp /tmp/fai/{fstab,crypttab} /mnt/etc
+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
they will succeed using the secodary mirror"
fi
pacstrap /mnt base
+cp /tmp/fai/{fstab,crypttab} /mnt/etc
case $hostname in
frodo)
# the root .ssh needs to be like this,
EOF
;;
*)
- echo "$0: first fstab:"
- cat /mnt/etc/fstab
- genfstab -p /mnt > /mnt/etc/fstab
- 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