Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

partition table creation improvements#19

Open
learmj wants to merge 2 commits into
raspberrypi:mainraspberrypi/rpi-fastbootd:mainfrom
learmj:idp_devlearmj/rpi-fastbootd:idp_devCopy head branch name to clipboard
Open

partition table creation improvements#19
learmj wants to merge 2 commits into
raspberrypi:mainraspberrypi/rpi-fastbootd:mainfrom
learmj:idp_devlearmj/rpi-fastbootd:idp_devCopy head branch name to clipboard

Conversation

@learmj

@learmj learmj commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Two important bug fixes:

  1. Reject a valid but all-zero disk label (aka identifier) at dos or GPT creation via RPIparted::createPartitionTable(). This is critical to avoid libparted rewriting it with a non-zero ID before commencing on-device resize, and therefore breaking any subsequent reliance on the prior value. The API will now reject an attempt to create a partition table with an ID of all-zeros. The ID is still optional in the API, so if not provided, one will be created automatically based on the type of partition table being created.
  2. The partition table ID captured by the JSON parser was only propagating the ID down to rpiparted for GPT. This meant that IDs specified in the IDP JSON for dos/MBR images were not being written to the device, therefore not creating the partition table as the JSON description intended.

Fixes #17

learmj added 2 commits July 23, 2026 12:34
libfdisk accepts an all-zero disk ID for dos or GPT, but libparted
rewrites it on probe when doing on-device resize, invalidating any
PARTUUID= references. Validate the ID libfdisk actually applied and
reject it if all-zero rather than trusting the caller-supplied string
verbatim.
Disk ID capture in the parser was gated on GPT, and a dos ID never
propagated down to partition table creation at all. Fix that, and add
some additional checks on the incoming data in the parser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MBR signature not preserved

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.