Ubuntu removes CentOS UEFI boot entry on shutdown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Committed
|
High
|
Unassigned | ||
curtin |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When MAAS deploys CentOS 7/8 it boots into the user selected commissioning environment(Xenial, Bionic, or Focal) and runs Curtin. If the system uses UEFI Curtin creates a boot entry with efibootmgr. Adding and ordering the entry is logged and I have manually confirmed it is created properly. Once Ubuntu shuts down to boot into the deployed system it seems to be removing CentOS's UEFI boot entry. I have confirmed this happens during the shutdown process by using the system firmware to select a temporary boot device(Ubuntu LiveCD) and running efibootmgr -v to see only the system default boot entries.
This can cause booting failures when network booting isn't available or a grub bug such as LP:1906344.
Reproduction:
1. Deploy CentOS 7 or 8 using MAAS to a UEFI system.
2. Verify UEFI boot entry was added in installation/Curtin log
3. In deployed system or rescue environment see `efibootmgr -v` does not include CentOS.
Related branches
- Michael Hudson-Doyle: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 40 lines (+9/-2)2 files modifiedcurtin/commands/install_grub.py (+8/-1)
tests/unittests/test_commands_install_grub.py (+1/-1)
Changed in maas: | |
milestone: | none → 2.9.0rc4 |
description: | updated |
Changed in maas: | |
milestone: | 2.9.0rc4 → none |
Changed in curtin: | |
status: | Incomplete → Confirmed |
Changed in maas: | |
assignee: | Lee Trager (ltrager) → nobody |
Changed in maas: | |
milestone: | none → 3.5.0 |
status: | Triaged → Fix Committed |
I'm not sure if the entry is deleted, or indeed, fails to be added.
I'm deploying onto nvme drive and whilst:
chroot /mnt efibootmgr -v --create --write-signature --label centos --disk /dev/nvme0n1 --part 1 --loader /boot/efi/ EFI/centos/ shimx64. efiCould not prepare Boot variable: No such file or directory
fails, (aka using efibootmgr from the chrooted system) whilst booted into ubuntu's v5.4 kernel.
But running the same command from focal environment (i.e. without chroot). Does succeed fine:
efibootmgr -v --create --write-signature --label centos --disk /dev/nvme0n1 --part 1 --loader /boot/efi/ EFI/centos/ shimx64. efi
$ sudo efibootmgr -v --create --write-signature --label centos --disk /dev/nvme0n1 --part 1 --loader /boot/efi/ EFI/centos/ shimx64. efi 0003,0004, 0005,0006, 0001 5023b95c- db26-429b- a648-bd47664c80 12)..BO 0x3)/Pci( 0x3,0x4) /Pci(0x0, 0x0)/MAC( 18c04d711026, 1)/IPv4( 0.0.0.00. 0.0.0,0, 0)..BO 0x3)/Pci( 0x3,0x4) /Pci(0x0, 0x1)/MAC( 18c04d711027, 1)/IPv4( 0.0.0.00. 0.0.0,0, 0)..BO 0x3)/Pci( 0x3,0x4) /Pci(0x0, 0x0)/MAC( 18c04d711026, 1)/IPv6( [::]:<- >[::]:, 0,0)..BO 0x3)/Pci( 0x3,0x4) /Pci(0x0, 0x1)/MAC( 18c04d711027, 1)/IPv6( [::]:<- >[::]:, 0,0)..BO 86ad9d07- 0596-4077- 965b-bded3e4da2 e5,0x800, 0x100000) /File(\ EFI\BOOT\ BOOTX64. EFI)..BO 86ad9d07- 0596-4077- 965b-bded3e4da2 e5,0x800, 0x100000) /File(\ boot\efi\ EFI\centos\ shimx64. efi)
BootNext: 0002
BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0000,0002,
Boot0001* UEFI: Built-in EFI Shell VenMedia(
Boot0002* UEFI: PXE IP4 Intel(R) I350 Gigabit Network Connection PciRoot(
Boot0003* UEFI: PXE IP4 Intel(R) I350 Gigabit Network Connection PciRoot(
Boot0004* UEFI: PXE IP6 Intel(R) I350 Gigabit Network Connection PciRoot(
Boot0005* UEFI: PXE IP6 Intel(R) I350 Gigabit Network Connection PciRoot(
Boot0006* UEFI OS HD(1,GPT,
Boot0000* centos HD(1,GPT,
I wonder if there rhel 8 efibootmgr is compatible with v5.4 ubuntu kernel, w.r.t. nvme drives.