xcat-core icon indicating copy to clipboard operation
xcat-core copied to clipboard

Ubuntu 2X.XX installs fail to find EFI based bootloader partition.

Open karcaw opened this issue 3 years ago • 2 comments
trafficstars

When installing on the new ubuntu 20.X and 22.X on UEFI based systems, the code for creating a default partition sets the grub_device: tag on the device, and not a partition:

https://github.com/xcat2/xcat-core/blob/master/xCAT-server/share/xcat/install/scripts/pre.ubuntu.subiquity#L224

    - {id: disk-detected, ptable: msdos, path: $INSTALL_DISK, wipe: superblock,
      preserve: false, name: '', grub_device: true, type: disk}
    - {id: boot-part, device: disk-detected, size: 512MB, flag: boot,
      type: partition, preserve: false}

Which makes this code fail: https://github.com/canonical/subiquity/blob/main/subiquity/models/filesystem.py#L1565

       elif self.bootloader == Bootloader.UEFI:
            for esp in self._all(type='partition', grub_device=True):
                if esp.fs() and esp.fs().mount():
                    if esp.fs().mount().path == '/boot/efi':
                        return False
            return True

changing the code in pre.ubuntu.subiquity to this:

    - {id: disk-detected, ptable: msdos, path: $INSTALL_DISK, wipe: superblock,
      preserve: false, name: '', type: disk}
    - {id: boot-part, device: disk-detected, size: 512MB, flag: boot,
      type: partition, preserve: false, grub_device: true}

Seems to solve the problem.

References: https://github.com/xcat2/xcat-core/issues/6681

karcaw avatar Aug 01 '22 17:08 karcaw

@karcaw does that change still work under Ubuntu 16 and 18?

khm avatar Feb 17 '23 21:02 khm

subiquity is a new installer method, so it will not apply to the older 16 and 18 versions.

karcaw avatar Feb 24 '23 23:02 karcaw