ZFS Install boot disk GPT check is broken for UEFI

Bug #2001687 reported by Jonathan Heathcote
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
New
Undecided
Unassigned

Bug Description

When performing a ZFS-based installation, curtin checks to see if the boot disk has a GPT-based partition table. On UEFI platforms, where the "grub_device" storage setting is set on the partition and not the disk, this check fails erroneously causing the installation to fail with a message such as:

    ValueError: zfsroot requires bootdisk with GPT partition table found "None" on disk id="uefi_boot_part"
    zfsroot requires bootdisk with GPT partition table found "None" on disk id="uefi_boot_part"

The offending code snippet appears to be commands/block_meta.py:1954

    # validate that the boot disk is GPT partitioned
    bootdevs = [d for i, d in storage_config.items() if d.get('grub_device')]
    bootdev = bootdevs[0]
    if bootdev.get('ptable') != 'gpt':
        raise ValueError(
            'zfsroot requires bootdisk with GPT partition table'
            ' found "%s" on disk id="%s"' %
            (bootdev.get('ptable'), bootdev.get('id')))

A correct implementation ought to check if the entry is a partition and, in that case, check the 'ptable' entry of the named disk (and not the partition entry of course).

For others encountering this issue, as a work-around you can add "grub_device: true" to your disk definition in addition to the relevant partition. On UEFI systems, the GRUB installation process silently ignores the disk-level flag making this workaround fairly harmless.

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.