Subiquity crashes trying remove duplicate UEFI entries

Bug #2025910 reported by Minamoto Sewa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

--Related bug reports--
+ Invalid BootEntry while reordering boot entries on some UEFI implementations
    https://bugs.launchpad.net/subiquity/+bug/2018280

--System--
Dell Inspiron 14 3443 (Intel Core i5-5200U) with 1 HDD reformatted (no zeroing) and previously used for dualbooting KDE neon and Windows 10. UEFI boot entry scrubbed clean through `efibootmgr` (i.e. delete everything then let the BIOS(?) restore the default boot entries ("Onboard NIC (IPV4)" and "Onboard NIC (IPV6)"). Legacy booting disabled in BIOS.

-- Base ISO used for installation--
ubuntu-23.04-live-server-amd64.iso, acquired normally from Ubuntu Server's download page

--Subiquity used for installation--
Manually built from commit 54465d16fabdccd3a49b77f5244a2961750f8596 on a fresh 23.04 Server in a VM and injected into base ISO using instruction from README.md (see Notes, entry 1 & 2).

--Procedure for installation (as performed locally before the crash)--
1. Prepare a USB with Ventoy.
2. Build the Subiquity installer and inject into the 23.04 ISO.
3. Boot into the USB, ensuring it's booting from UEFI mode.
4. Select the patched ISO, boot in normal mode.
5. Select "Ubuntu Server" and "Search for third-party drivers". No drivers should be detected.
6. Select manual partitioning with the following scheme
    (auto) fat32 /boot/efi 1.049G
            ext4 /boot 5.000G
            ext4 / 300.000G
            ext4 /home 610.000G
            swap 15.460G
7. Add OpenSSH server installation option, import SSH key from own GitHub account

--Expected behaviour--
Installer proceeded to finish normally

--Actual behaviour--
Installer crashed at "installing grub to target devices". Logs dumped from the installer environment's `/var/crash` and `/var/log/installer` are attached. Preliminary reading of the error report shows the installation fails while trying to de-duplicate UEFI entries by accessing "current entry", which is "1003" at the time of writing immediately after the failure. (see Notes, entry 3). Manual booting at this point can be done, but no credentials and system name's set as "localhost"

efibootmgr's output immediately after installation failure (entries in {} are abbreviated):

BootCurrent: 1003
Timeout: 0 seconds
BootOrder: 0000,0001,0002
Boot0000* ubuntu HD(1, GPT, {UUID}, 0x800, 0x200000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Onboard NIC (IPV4) {PCI slot, MAC, IP}
Boot0002* Onboard NIC (IPV4) {PCI slot, MAC, IP}

--Note--
1. Installation has been attempted before on the original 23.04 Server ISO. These attempts failed at UEFI boot entry reordering, which has been addressed in pull request 1671 (https://github.com/canonical/subiquity/pull/1671), hence attempting at building.
2. The workaround is to use the legacy 20.04 ISO, installing, then manually `sudo do-release-upgrade` to 23.04. Considering this is using a 5400RPM HDD, one single `do-release-upgrade` could take anywhere from 45-60 minutes. Yes, I don't have to babysit it, but it's painful.
3. Attempts using the original ISO somehow yield "100A" as the boot entry.
4. I could just keep the power running on the thing to keep the state since I don't know what other logs is needed, but electricity bill is a thing.

Revision history for this message
Minamoto Sewa (mnmtsw) wrote :
Revision history for this message
Minamoto Sewa (mnmtsw) wrote :

Workaround found. Following https://bugs.launchpad.net/subiquity/+bug/2018280/comments/3, setting

    "remove_duplicate_entries": False,

along with "reorder_uefi" did it.

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.