[UEFI] GRUB 2 installation method

Bug #924591 reported by Andrew Gunnerson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debian-installer (Ubuntu)
New
Undecided
Unassigned

Bug Description

With more UEFI based systems now, it's pretty important that GRUB 2 is installed correctly on those systems.

The way Ubuntu installs GRUB 2 on UEFI systems puts the GRUB 2 configuration files in EFI_PARTITION/efi/ubuntu/grub.cfg. I'm not sure how it actually is installed, but the behavior can be replicated by installing GRUB 2 with:

grub-install --boot-directory=/boot/efi/efi --bootloader-id=ubuntu --force --recheck

The problem with this is that the configuration files are inconsistent with the BIOS version GRUB 2, making all scripts that depend on the /boot/grub directory structure useless.

If GRUB 2 UEFI is installed this way:

grub-install --bootloader-id=ubuntu --force --recheck

GRUB 2 will continue to use /boot/grub, just like the BIOS version and generates a grubx64.efi file in EFI_PARTITION/efi/ubuntu/ that will ALWAYS load /boot/grub/grub.cfg from the /boot partition, which the grub-install script identifies during installation. This is exactly the same behavior in the BIOS version, where GRUB 2 in the MBR always boots from the /boot partition that was mounted during installation.

Not only does this method make things more consistent, it can also shave off a little bit of the boot time, because the EFI partition will no longer need to be mounted every boot.

Tags: grub uefi
Revision history for this message
Andrew Gunnerson (cxl) wrote :

This bug was marked as a duplicate of 879858, but I don't think that they're the same bugs. The other bug is about a kernel error when using efibootmgr while installing GRUB EFI. This bug suggests a better command that can be run to install GRUB EFI (more of a feature enhancement).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.