Backport some Debian stuff

This commit is contained in:
Aleksey Samoilov 2024-03-07 00:18:07 +04:00
parent 75110c8ff7
commit 8d7e5d42cb
2 changed files with 9 additions and 4 deletions

View file

@ -22,13 +22,13 @@ extraMounts:
mountPoint: /sys
- device: /dev
mountPoint: /dev
options: bind
options: [ bind ]
- device: tmpfs
fs: tmpfs
mountPoint: /run
- device: /run/udev
mountPoint: /run/udev
options: bind
options: [ bind ]
- device: efivarfs
fs: efivarfs
mountPoint: /sys/firmware/efi/efivars

View file

@ -8,14 +8,19 @@ CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc
# 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
chroot $CHROOT apt-get -y install cryptsetup-initramfs cryptsetup keyutils
fi
echo "Running bootloader-config..."
if [ -d /sys/firmware/efi/efivars ]; then
echo " * Installing grub-efi (uefi)..."
DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get -y install grub-efi-amd64 cryptsetup keyutils
DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get -y install grub-efi-amd64
else
echo " * install grub... (bios)"
DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get -y install grub-pc cryptsetup keyutils
DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt-get -y install grub-pc
fi
# Re-enable os-prober:
sed -i "s/#GRUB_DISABLE_OS_PROBER=false/# OS_PROBER re-enabled by TileOS Calamares installation:\nGRUB_DISABLE_OS_PROBER=false/g" $CHROOT/etc/default/grub
chroot $CHROOT /usr/sbin/update-grub