Comment 6 for bug 1906379

Revision history for this message
Lee Trager (ltrager) wrote :

I can produce this using a couple of the machines in our CI and KVM. The KVM uses /usr/share/OVMF/OVMF_CODE.secboot.fd and all virtio devices[1]. The attached Curtin log is deploying the latest CentOS 8 image to KVM running UEFI. You can see the UEFI entry is successfully created and verified.

Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp41l7sf8c/target', 'efibootmgr', '--create', '--write-signature', '--label', 'centos', '--disk', '/dev/vda', '--part', '1', '--loader', '/boot/efi/EFI/centos/shimx64.efi'] with allowed return codes [0] (capture=True)

Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp41l7sf8c/target', 'efibootmgr', '-o', '0003,0007,0004,0001,0002,0006,0000,0005'] with allowed return codes [0] (capture=False)
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0007,0004,0001,0002,0006,0000,0005
Boot0000* UiApp
Boot0001* UEFI Misc Device
Boot0002* UEFI Misc Device 2
Boot0003* UEFI PXEv4 (MAC:52540084334D)
Boot0004* UEFI HTTPv4 (MAC:52540084334D)
Boot0005* EFI Internal Shell
Boot0006* UEFI QEMU DVD-ROM QM00001
Boot0007* centos

I manually verified this by SSHing into the VM while it was deploying, preventing rebooting with `sudo touch /tmp/block-reboot`, waiting for MAAS to receive the Curtin log, and then verifying in the Focal ephemeral environment with `sudo efibootmgr -v` that centos was added to the boot order.

# efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0007,0004,0001,0002,0006,0000,0005
Boot0000* UiApp FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI Misc Device PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)N.....YM....R,Y.
Boot0002* UEFI Misc Device 2 PciRoot(0x0)/Pci(0x2,0x5)/Pci(0x0,0x0)N.....YM....R,Y.
Boot0003* UEFI PXEv4 (MAC:52540084334D) PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(52540084334d,1)/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.
Boot0004* UEFI HTTPv4 (MAC:52540084334D) PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(52540084334d,1)/IPv4(0.0.0.00.0.0.0,0,0)/Uri()N.....YM....R,Y.
Boot0005* EFI Internal Shell FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)
Boot0006* UEFI QEMU DVD-ROM QM00001 PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)N.....YM....R,Y.
Boot0007* centos HD(1,GPT,950e1d23-47b8-4c55-9180-41012f34861b,0x800,0x100000)/File(\boot\efi\EFI\centos\shimx64.efi

Once I rebooted the machine to allow the deployment to finish I checked `efibootmgr -v` in CentOS8 and now I see

# efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0004,0001,0002,0006,0000,0005
Boot0000* UiApp FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI Misc Device PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)N.....YM....R,Y.
Boot0002* UEFI Misc Device 2 PciRoot(0x0)/Pci(0x2,0x5)/Pci(0x0,0x0)N.....YM....R,Y.
Boot0003* UEFI PXEv4 (MAC:52540084334D) PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(52540084334d,1)/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.
Boot0004* UEFI HTTPv4 (MAC:52540084334D) PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(52540084334d,1)/IPv4(0.0.0.00.0.0.0,0,0)/Uri()N.....YM....R,Y.
Boot0005* EFI Internal Shell FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)
Boot0006* UEFI QEMU DVD-ROM QM00001 PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)N.....YM....R,Y.

[1] https://pastebin.canonical.com/p/kzdRB2DqGM/