hydra_sudo_run mount -o bind /dev/pts $WORK/dev/pts
echo LANG=C | $SUDO tee $WORK/etc/default/locale > /dev/null
+if [ "$boot_mode" == "bios" ]; then
+ hydra_sudo_run mount none -t efivarfs $WORK/sys/firmware/efi/efivars
+fi
+
# Resolver configuration.
echo "domain $domain" | $SUDO tee $WORK/etc/resolv.conf > /dev/null
echo "search $hostname.$domain" | $SUDO tee -a $WORK/etc/resolv.conf > /dev/null
# LVM.
if [ "$discards" == "y" ]; then
- $SUDO sed -i -e 's/issue_discards = 0/issue_discards = 1' $WORK/etc/lvm/lvm.conf
+ $SUDO sed -i -e 's/issue_discards = 0/issue_discards = 1/' $WORK/etc/lvm/lvm.conf
fi
# Boot device must be available before installing kernel and initramfs.
fi
if [ "$secure_boot" == "y" ]; then
+ grub_uefi_secure_boot="--uefi-secure-boot"
+
$APT_INSTALL grub-efi-${arch}-signed -y
else
$APT_INSTALL grub-efi-${arch} -y
if [ "$boot_mode" == "bios" ]; then
hydra_sudo_run chroot $WORK/ grub-install --recheck --force $device
else
- hydra_sudo_run chroot $WORK/ grub-install --target=${grub_arch}-efi --efi-directory=/boot/efi $grub_uefi_nvram
+ hydra_sudo_run chroot $WORK/ grub-install --target=${grub_arch}-efi \
+ --efi-directory=/boot/efi \
+ $grub_uefi_nvram $grub_uefi_secure_boot
fi
fi
if [ "$boot_mode" == "uefi" ]; then
hydra_sudo_run umount $WORK/boot/efi
+ hydra_sudo_run umount $WORK/sys/firmware/efi/efivars
fi
if [ "$grub" == "y" ] && [ "$encrypt" != "y" ]; then