Repository navigation
build: ship fixparts, which runFixparts() calls - #195
Merged
Merged
Conversation
runFixparts() repairs a partition table that sfdisk refuses:
fixparts $disk </usr/share/fog/lib/EOFFIXPARTS >/dev/null 2>&1
No init since 2023-12 has contained fixparts. Buildroot's gptfdisk
package builds gdisk, sgdisk and cgdisk only. FOS carried its own copy
of the package with a fixparts option, and 89c901f deleted that copy
during a Buildroot update. Kconfig then dropped the symbol silently. The
call fails with "command not found", and the task stops at "Could not
fix partition layout (runFixparts)". Verified against the released init
EXP_20261019-150930: /usr/sbin has gdisk and sgdisk, no fixparts.
fs.patch now adds BR2_PACKAGE_GPTFDISK_FIXPARTS to Buildroot's own
gptfdisk package, rather than restoring a full copy of the package that
drifts from upstream. A later Buildroot bump that moves those lines
makes the patch fail loudly at build time. All three fs configs set it.
Verified: fs.patch applies cleanly to pristine Buildroot 2026.02.1. In
the x64 tree the symbol survives olddefconfig, and make gptfdisk
installs output/target/usr/sbin/fixparts. That binary, fed
EOFFIXPARTS, cleared stale GPT data from an MBR disk image and kept the
MBR partition; sgdisk -v reported no problems afterward.
tests/checks/fixparts-binary-present.sh asserts the patch defines the
symbol and the build target, and every config sets it. Proved red
against master: 5 failures. Full suite 29 passed, 0 failed.
Fixes #194
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #194.
Problem. Every init since 2023-12 lacks
fixparts.runFixparts()calls it when sfdisk refuses a table, so the task stops atCould not fix partition layout (runFixparts).Cause. Buildroot's
gptfdiskpackage has no fixparts option. FOS carried its own copy of the package with one; 89c901f deleted that copy during a Buildroot update, and Kconfig droppedBR2_PACKAGE_GPTFDISK_FIXPARTSsilently. The released initEXP_20261019-150930hasgdiskandsgdiskin/usr/sbin, and nofixparts.Fix.
fs.patchadds the fixparts option and build target to Buildroot's owngptfdiskpackage. All three fs configs set it. A Buildroot bump that moves those lines makes the patch fail at build time, not silently.Verified.
fs.patchapplies cleanly to pristine Buildroot 2026.02.1.olddefconfig, andmake gptfdiskinstalls/usr/sbin/fixparts.EOFFIXPARTS, cleared stale GPT data from an MBR disk image and kept the MBR partition.sgdisk -vthen reported no problems.tests/checks/fixparts-binary-present.sh: red against master (5 failures), green here. Full suite 29 passed, 0 failed.🤖 Generated with Claude Code