Ubiquity installs GRUB to EFI/ubuntu/ on removable disks on EFI-mode installs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubiquity (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When installing Ubuntu in EFI mode to removable disks, Ubiquity installs GRUB to EFI/ubuntu/
1) If the ESP chosen is on an internal disk and if the user unplugs the USB drive and tries to boot, the boot will fail. (This specific issue is a subset of bug #1567534.)
2) Some EFIs "forget" NVRAM-stored boot manager entries when a USB drive is unplugged, so if the ESP used is on the USB drive and the user unplugs that disk and then tries to boot, the USB drive will become unbootable the next time the user tries to boot from it.
3) If the ESP used is on the internal disk, the USB drive will be unbootable on another computer (except via rEFInd or something similar), since GRUB will not exist on the USB drive.
3) If the ESP used is on the USB drive, the USB drive will be difficult to boot on another computer, because the fallback filename of EFI/BOOT/
I've seen several questions related to these issues in online forums, and I believe Ubiquity can do a better job about placing GRUB on UEFI-based systems when installing to a USB drive (or other removable disk). As a first pass, I recommend:
* Installing GRUB to the ESP on the same disk as the Ubuntu root (/) partition (or /boot, if it's separate) -- including creating such a partition, if one doesn't already exist.
* Installing the boot loader to the EFI/BOOT directory on the ESP, rather than EFI/ubuntu, if the ESP is on a removable disk.
* Installing Shim as bootx64.efi, rather than shimx64.efi, if the target directory for GRUB is EFI/BOOT.
* Continue to create an NVRAM entry (via efibootmgr) when installing in this way. This should keep GRUB and Ubuntu in charge of the boot process if the removable disk is an external but permanently-
These changes should help with cases where a user is trying to create an easily-transported Ubuntu installation on a USB flash drive (or similar). They would also help with bug #1567534 in many (perhaps most) situations. Drawbacks to this proposed change include:
* Some users who Really Know What They're Doing might want to split GRUB off to some other partition. For such users, a way to override the default behavior should exist. (This, really, is the topic of bug #1466367, which exists whether or not my suggestion is implemented -- my suggestion would just change the circumstances in which an override would be desirable.)
* If the target removable disk is small, allocating space for the ESP may reduce the size of the main Ubuntu partition too much. Perhaps an exception to the preceding suggested rules could be included for such cases.
Status changed to 'Confirmed' because the bug affects multiple users.