Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: partition alignment on disks with 4k sectors #10109

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

smira
Copy link
Member

@smira smira commented Jan 9, 2025

Fixes #10097

See siderolabs/go-blockdevice#121

I added an option to QEMU provisioner to create disks with custom block sizes (supported for some disk types).

Unfortunately, this case can't be built as a regression as QEMU's firmware boots fine with ESP partition at 256/1024/2048 LBA.

Fixes siderolabs#10097

See siderolabs/go-blockdevice#121

I added an option to QEMU provisioner to create disks with custom block
sizes (supported for some disk types).

Unfortunately, this case can't be built as a regression as QEMU's
firmware boots fine with ESP partition at 256/1024/2048 LBA.

Signed-off-by: Andrey Smirnov <[email protected]>
@smira smira added this to the v1.10 milestone Jan 9, 2025
@smira
Copy link
Member Author

smira commented Jan 9, 2025

With --disk-blocksize=4096:

spec:
    dev_path: /dev/nvme0n1
    size: 5368709120
    pretty_size: 5.4 GB
    io_size: 4096
    sector_size: 4096
    readonly: false
    cdrom: false
    model: QEMU NVMe Ctrl
    serial: deadbeef
    wwid: nvme.1b36-6465616462656566-51454d55204e564d65204374726c-00000001
    bus_path: /pci0000:00/0000:00:0b.0/nvme
    sub_system: /sys/class/block
    transport: nvme

@smira
Copy link
Member Author

smira commented Jan 9, 2025

With 4k sector size:

/ # fdisk -l /host/dev/vda
Note: sector size is 4096 (not 512)
Found valid GPT with protective MBR; using GPT

Disk /host/dev/vda: 12582912 sectors,     0
Logical sector size: 4096
Disk identifier (GUID): 6d5a4b04-45da-47d7-afbb-d35c9c6ae13a
Partition table holds up to 128 entries
First usable sector is 256, last usable sector is 1572858

Number  Start (sector)    End (sector)  Size Name
     1            1024           26623  100M EFI
     2           26624           26879 1024K BIOS
     3           26880          282879 1000M BOOT
     4          282880          283135 1024K META
     5          283136          308735  100M STATE
     6          308736         1572607 4937M EPHEMERAL

@smira
Copy link
Member Author

smira commented Jan 9, 2025

/m

@talos-bot talos-bot merged commit bbd6067 into siderolabs:main Jan 9, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Proposed
Development

Successfully merging this pull request may close these issues.

1.9.1 installer creates invalid/unbootable GPT partition table
3 participants