diff --git a/step1/10-disk b/step1/10-disk index a1c1f9c..080051c 100644 --- a/step1/10-disk +++ b/step1/10-disk @@ -150,13 +150,11 @@ while input "Size in G? [$(( disk[size] - swapsize - bootsize ))|rest]" "rest"; done setconf "add" "fde_key_store" "${cfg[fde_key_store]}" -setconf "add" "fde_keystore" "${cfg[fde_key_store]}" -setconf "add" "FDE_KEY_STORE" "${cfg[fde_key_store]}" setconf "add" "diskid" "${disk[id]}" setconf "add" "swapsize" "${swapsize}" setconf "add" "rootfssize" "${rootfssize}" setconf "add" "wipe" "${cfg[wipe]}" setconf "add" "diskname" "${disk[name]}" setconf "add" "bootsize" "4" -setconf "add" "target_part" "2" +#setconf "add" "target_part" "2" diff --git a/step2/10-disk b/step2/10-disk index f15c294..24d105f 100644 --- a/step2/10-disk +++ b/step2/10-disk @@ -25,7 +25,6 @@ if test -d /sys/firmware/efi; then sleep $sleep efipart="${dodiskid}-part${index}" index=$(( index + 1 )) - mkfs.vfat "${efipart}" || exit 1 else echo "BIOS Partition" (echo "o"; @@ -152,7 +151,8 @@ fi if test -d /sys/firmware/efi; then mkdir -p "${dest}/boot/efi" - mkfs.vfat -F32 "${efipart}" + mkfs.vfat "${efipart}" + sleep $sleep mount "${efipart}" "${dest}/boot/efi" fi diff --git a/step3/20-basesystem b/step3/20-basesystem index f79db74..02e18d8 100644 --- a/step3/20-basesystem +++ b/step3/20-basesystem @@ -102,6 +102,9 @@ if [[ "${cfg[fde_key_store]}" == "once" ]]; then { echo "UUID=${cfg[bootuuid]} /boot btrfs defaults,subvol=bootfs 0 0"; echo "UUID=${cfg[bootuuid]} /var/lib/backup/quelle/bootfs btrfs defaults 0 0"; } >> /etc/fstab fi +if test -d /sys/firmware/efi; then + echo "${efipart} /boot/efi vfat defaults 0 0" >> /etc/fstab +fi echo "${cfg[hostname]}" > /etc/hostname ln -sf "/usr/share/zoneinfo/${cfg[timezone]}" /etc/localtime diff --git a/step3/30-bootloader b/step3/30-bootloader index cc63be2..4078b5d 100644 --- a/step3/30-bootloader +++ b/step3/30-bootloader @@ -11,11 +11,13 @@ if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then fi fi - if [[ ! -f /boot/volume.key ]] && [[ ! "${cfg[fde_key_store]}" == "twice" ]] && [[ ! "${cfg[fde_key_store]}" == "once" ]]; then + if [[ "${cfg[fde_key_store]}" == "initramfs" ]]; then dd bs=1 count=64 if=/dev/urandom of=/boot/volume.key - echo -n "${cfg[diskpw]}" | cryptsetup luksAddKey "${cfg[diskname]}${cfg[target_part]}" /boot/volume.key -d - + echo -n "${cfg[diskpw]}" | cryptsetup luksAddKey "${target_partition}" /boot/volume.key -d - chmod 000 /boot/volume.key chmod -R g-rwx,o-rwx /boot + echo 'install_items+=" /boot/volume.key /etc/crypttab "' > /etc/dracut.conf.d/crypt-ssh.conf + echo "voidluks-${diskid} UUID=${cfg[partuuid]} /boot/volume.key luks" > /etc/crypttab fi fi @@ -32,10 +34,8 @@ if [[ "${cfg[hibernate]}" == "1" ]]; then sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"resume=UUID=${cfg[swapuuid]} /" /etc/default/grub fi -if [[ "${cfg[fde_key_store]}" == "initramfs" ]]; then - mkdir -p /etc/dracut.conf.d/ - echo 'install_items+=" /boot/volume.key /etc/crypttab "' > /etc/dracut.conf.d/crypt-ssh.conf - echo "voidluks-${diskid} UUID=${cfg[partuuid]} /boot/volume.key luks" > /etc/crypttab +if [[ "${cfg[fde_key_store]}" == "twice" ]] || [[ "${cfg[fde_key_store]}" == "once" ]]; then + echo "voidluks-${diskid} UUID=${cfg[partuuid]} none luks" > /etc/crypttab fi if ! grep -q "dark-gray/black" /etc/default/grub; then