Conversation
This change removes the legacy_boot flag from the EFI system partition. We already have a BIOS boot partition which should offer compatibility with legacy bios systems. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
chewi
left a comment
There was a problem hiding this comment.
It looks straightforward, but I'll kick off a Jenkins run against it.
|
Build action triggered: https://github.com/flatcar/scripts/actions/runs/13522976473 |
|
Let me also test it out manually. Will ping back once I confirm if it works. |
|
Converted to draft. While using parted 3.6 (version 3.4 seemed to make the image unbootable - need to investigate) on an existing image did seem to make it work, generating a new image without the hybrid flag seems to:
|
|
I'm surprised by your issues, but I can at least report that CI passed on all platforms except OpenStack and Equinix Metal. I believe those are actually down to availability issues. Brightbox worked, and that uses OpenStack too. |
|
You need to run the tests on a fresh devstack deployment. The change that triggers issues in OpenStack was added in December. The cgpt binary in https://github.com/flatcar/seismograph/tree/flatcar-master/src/cgpt is quite outdated. Newer versions of cgpt (like the one in ubuntu 24.04) can properly set CHS entries (along with other PMBR fields) by running: cgpt boot -p path/to/raw.imgWe then set the bootable flag in the PMBR either via fdisk or by simply flipping the bit at offset 447 in the disk to |
|
to set the bootable flag via fdisk we can run: echo -e "M\na\nw\n" | fdisk flatcar_production_openstack_image.rawor we can do it via python in the def EnsurePMBRBootFlag(options, config=None, partitions=None):
# Set bootable flag
with open(options.disk_image, 'r+b') as fd:
# Seek to partition table offset
fd.seek(446)
# Read the partition entry
partition = fd.read(16)
partition_data = struct.unpack('<B3BB3BII', partition)
if partition_data[0] != 0x80:
new_partition_data = struct.pack('<B3BB3BII', 0x80, *partition_data[1:])
# Go back to offset of start of partition
fd.seek(446)
# write the modified partition data
fd.write(new_partition_data) |
This change pulls in the latest commit of seismograph. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2973faa to
10ce3cc
Compare
the boot flag is not needed. To pass the OpenStack Validation, the CHS values are enough. |
|
seems to pass on OpenStack. @chewi could you kick off another test in the CI as well? |
|
Everything passed except for EM, as expected. |
Fix non conforming partition table
This change removes the legacy_boot flag from the EFI system partition. We already have a BIOS boot partition which should offer compatibility with legacy bios systems.
How to use
Upload the image in a fresh OpenStack devstack deploy and boot.
Testing done
changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc./update-sdk