2023-07-01 02:02:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
|
|
|
|
|
2023-07-01 02:56:06 +00:00
|
|
|
# Set secure permissions for the initramfs if we're configuring
|
2023-07-01 02:02:49 +00:00
|
|
|
# full-disk-encryption. The initramfs is re-generated later in the
|
|
|
|
# installation process so we only set the permissions snippet without
|
|
|
|
# regenerating the initramfs right now:
|
|
|
|
if [ "$(mount | grep $CHROOT" " | cut -c -16)" = "/dev/mapper/luks" ]; then
|
|
|
|
echo "UMASK=0077" > $CHROOT/etc/initramfs-tools/conf.d/initramfs-permissions
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Running bootloader-config..."
|
|
|
|
|
|
|
|
if [ -d /sys/firmware/efi/efivars ]; then
|
|
|
|
echo " * Installing grub-efi (uefi)..."
|
2023-07-01 02:56:06 +00:00
|
|
|
DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get -y install grub-efi-amd64 cryptsetup keyutils
|
2023-07-01 02:02:49 +00:00
|
|
|
else
|
|
|
|
echo " * install grub... (bios)"
|
2023-07-01 02:56:06 +00:00
|
|
|
DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get -y install grub-pc cryptsetup keyutils
|
2023-07-01 02:02:49 +00:00
|
|
|
fi
|