lubuntu grub-install puts efi in the wrong directory - could create an unbootable state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calamares-settings-ubuntu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
grub2 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Lubuntu 19.04
grub-install from grub2-common 2.02+dfsg1-
Summary:
The lubuntu installer puts the EFI in EFI/ubuntu. The firmware appears to be hard coded to this path. Lubuntu grub-install puts the EFI in EFI/lubuntu only, and NOT in EFI/ubuntu, which can result in an unbootable state (grub prompt).
Detail:
Long time debian, new lubuntu user. After a fresh install of lubuntu from usb:
$ efibootmgr
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0002,
Boot0000* Windows Boot Manager
Boot0001* Linpus lite
Boot0002* debian
Boot0003* ubuntu
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found Windows Boot Manager on /dev/nvme0n1p1@
Found Debian GNU/Linux 9 (stretch) on /dev/nvme0n1p5
Adding boot menu entry for EFI firmware configuration
done
$ ls /boot/efi/EFI/
Boot debian Microsoft ubuntu
$ sudo grub-install
Installing for x86_64-efi platform.
Installation finished. No error reported.
$ ls /boot/efi/EFI/
Boot debian lubuntu Microsoft ubuntu
#### It installs only to lubuntu and NOT also to ubuntu. See comments below.
$ efibootmgr
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0004,0003,
Boot0000* Windows Boot Manager
Boot0001* Linpus lite
Boot0002* debian
Boot0003* ubuntu
Boot0004* lubuntu
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
$ strings /boot/efi/
/EFI/ubuntu
$ strings /boot/efi/
/EFI/ubuntu
I discovered this when I moved my lubuntu partition to another drive and tried to get grub to reinstall. I also deleted unnecessary EFIs (ubuntu and later both). I only figured out the problem after reinstalling Lubuntu from scratch and observing the state of the EFI partition after install.
If the ubuntu folder is removed (and possibly requiring a partion id change but not likely), attempting to boot lubuntu will go to a grub prompt.
`set` revealed:
`root=(hd1,gpt1)` (my EFI partition)
`prefix=
Lubuntu could be booted with the following commands, where hd1, partition 7 is the new root:
```
set root=(hd1,gpt7)
set prefix=
insmod normal
normal
```
No amount of running `update-grub`, and `grub-install`, creating custom grub entries, or running grub from debian or a rescue disk mattered. The only thing that fixed it was reinstalling as that's the only thing that put the EFI/ubuntu folder back. I probably could have just manually renamed the directory in EFI from lubuntu to ubuntu.
Changed in calamares-settings-ubuntu (Ubuntu): | |
status: | New → Confirmed |
$ diff -r /boot/efi/ EFI/lubuntu/ /boot/efi/ EFI/ubuntu/
$