diff --git a/kerninst b/kerninst index 57d758bf5d88b91798aba0894b8abf994ceffff5..c40d2e36ae8353aa82ef4bd5481378ab1675bc37 100644 --- a/kerninst +++ b/kerninst @@ -167,6 +167,10 @@ function make_initrd() { function update_bootmanager_grub2() { einfo "Updating GRUB2..." + if [ "${MOUNT_BOOT_EFI}" == "yes" ]; then + einfo "Mounting EFI boot directory..." + /bin/mountpoint -q /boot/efi || /bin/mount /boot/efi + fi /usr/sbin/grub2-mkconfig -o "${GRUB2_CONFIG_FILE}" &>> "${LOGFILE}" || die } diff --git a/kerninst.conf b/kerninst.conf index 949fa56ef49703cc303dd95b4ea977dc6643c5da..9238574aa27704f3baa6a43264319961827a9f6a 100644 --- a/kerninst.conf +++ b/kerninst.conf @@ -32,3 +32,6 @@ UPDATE_KERNEL_CONFIG="no" # Included files #INCLUDES="" + +# Whether to mount a separate EFI boot-dir before updating GRUB2 +MOUNT_BOOT_EFI="yes"