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 mountPoint: /sys
- device: /dev - device: /dev
mountPoint: /dev mountPoint: /dev
options: bind options: [ bind ]
- device: tmpfs - device: tmpfs
fs: tmpfs fs: tmpfs
mountPoint: /run mountPoint: /run
- device: /run/udev - device: /run/udev
mountPoint: /run/udev mountPoint: /run/udev
options: bind options: [ bind ]
- device: efivarfs - device: efivarfs
fs: efivarfs fs: efivarfs
mountPoint: /sys/firmware/efi/efivars 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: # regenerating the initramfs right now:
if [ "$(mount | grep $CHROOT" " | cut -c -16)" = "/dev/mapper/luks" ]; then if [ "$(mount | grep $CHROOT" " | cut -c -16)" = "/dev/mapper/luks" ]; then
echo "UMASK=0077" > $CHROOT/etc/initramfs-tools/conf.d/initramfs-permissions echo "UMASK=0077" > $CHROOT/etc/initramfs-tools/conf.d/initramfs-permissions
chroot $CHROOT apt-get -y install cryptsetup-initramfs cryptsetup keyutils
fi fi
echo "Running bootloader-config..." echo "Running bootloader-config..."
if [ -d /sys/firmware/efi/efivars ]; then if [ -d /sys/firmware/efi/efivars ]; then
echo " * Installing grub-efi (uefi)..." 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 else
echo " * install grub... (bios)" 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 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