test
This commit is contained in:
parent
25fb3de821
commit
698ca255a1
|
@ -150,13 +150,11 @@ while input "Size in G? [$(( disk[size] - swapsize - bootsize ))|rest]" "rest";
|
||||||
done
|
done
|
||||||
|
|
||||||
setconf "add" "fde_key_store" "${cfg[fde_key_store]}"
|
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" "diskid" "${disk[id]}"
|
||||||
setconf "add" "swapsize" "${swapsize}"
|
setconf "add" "swapsize" "${swapsize}"
|
||||||
setconf "add" "rootfssize" "${rootfssize}"
|
setconf "add" "rootfssize" "${rootfssize}"
|
||||||
setconf "add" "wipe" "${cfg[wipe]}"
|
setconf "add" "wipe" "${cfg[wipe]}"
|
||||||
setconf "add" "diskname" "${disk[name]}"
|
setconf "add" "diskname" "${disk[name]}"
|
||||||
setconf "add" "bootsize" "4"
|
setconf "add" "bootsize" "4"
|
||||||
setconf "add" "target_part" "2"
|
#setconf "add" "target_part" "2"
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ if test -d /sys/firmware/efi; then
|
||||||
sleep $sleep
|
sleep $sleep
|
||||||
efipart="${dodiskid}-part${index}"
|
efipart="${dodiskid}-part${index}"
|
||||||
index=$(( index + 1 ))
|
index=$(( index + 1 ))
|
||||||
mkfs.vfat "${efipart}" || exit 1
|
|
||||||
else
|
else
|
||||||
echo "BIOS Partition"
|
echo "BIOS Partition"
|
||||||
(echo "o";
|
(echo "o";
|
||||||
|
@ -152,7 +151,8 @@ fi
|
||||||
|
|
||||||
if test -d /sys/firmware/efi; then
|
if test -d /sys/firmware/efi; then
|
||||||
mkdir -p "${dest}/boot/efi"
|
mkdir -p "${dest}/boot/efi"
|
||||||
mkfs.vfat -F32 "${efipart}"
|
mkfs.vfat "${efipart}"
|
||||||
|
sleep $sleep
|
||||||
mount "${efipart}" "${dest}/boot/efi"
|
mount "${efipart}" "${dest}/boot/efi"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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]} /boot btrfs defaults,subvol=bootfs 0 0";
|
||||||
echo "UUID=${cfg[bootuuid]} /var/lib/backup/quelle/bootfs btrfs defaults 0 0"; } >> /etc/fstab
|
echo "UUID=${cfg[bootuuid]} /var/lib/backup/quelle/bootfs btrfs defaults 0 0"; } >> /etc/fstab
|
||||||
fi
|
fi
|
||||||
|
if test -d /sys/firmware/efi; then
|
||||||
|
echo "${efipart} /boot/efi vfat defaults 0 0" >> /etc/fstab
|
||||||
|
fi
|
||||||
|
|
||||||
echo "${cfg[hostname]}" > /etc/hostname
|
echo "${cfg[hostname]}" > /etc/hostname
|
||||||
ln -sf "/usr/share/zoneinfo/${cfg[timezone]}" /etc/localtime
|
ln -sf "/usr/share/zoneinfo/${cfg[timezone]}" /etc/localtime
|
||||||
|
|
|
@ -11,11 +11,13 @@ if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then
|
||||||
fi
|
fi
|
||||||
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
|
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 000 /boot/volume.key
|
||||||
chmod -R g-rwx,o-rwx /boot
|
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
|
||||||
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
|
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"resume=UUID=${cfg[swapuuid]} /" /etc/default/grub
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${cfg[fde_key_store]}" == "initramfs" ]]; then
|
if [[ "${cfg[fde_key_store]}" == "twice" ]] || [[ "${cfg[fde_key_store]}" == "once" ]]; then
|
||||||
mkdir -p /etc/dracut.conf.d/
|
echo "voidluks-${diskid} UUID=${cfg[partuuid]} none luks" > /etc/crypttab
|
||||||
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
|
||||||
|
|
||||||
if ! grep -q "dark-gray/black" /etc/default/grub; then
|
if ! grep -q "dark-gray/black" /etc/default/grub; then
|
||||||
|
|
Loading…
Reference in New Issue