Repository navigation
build: ship wipefs, which restoreLVM has always called - #188
Merged
Merged
Conversation
restoreLVM() clears stale filesystem and RAID signatures off the target
partition before it recreates the physical volume:
wipefs -a "$part" >/dev/null 2>&1
No FOS image has ever contained wipefs. BR2_PACKAGE_UTIL_LINUX_WIPEFS
was "not set" in all three filesystem configs, and busybox has no wipefs
applet -- verified against the busybox.config Buildroot pins, which does
not mention it. So the call has always been "command not found", with
both the message and the exit status discarded by the redirect, leaving
behind exactly the signatures the line exists to remove. pvcreate -ff
then forces past them, which is why nothing ever looked broken.
It also means wipefs is unavailable to an operator in a debug shell, or
following support instructions that name it. That is how this surfaced
(forum 18253): a reporter was told to wipe a disk's signatures, found no
wipefs in FOS, and fell back to dd.
tests/checks/lvm.sh cannot catch this. It PATH-shadows every external
tool with a logging stub, wipefs included, so it proves the call is made
and is structurally blind to whether the image can make it. The new
check asserts the symbol in all three configs instead, and only while
something under the rootfs overlay still calls the tool. Scoped to
wipefs deliberately: most util-linux applets are correctly "not set"
here because busybox supplies them, so a sweep over every applet FOS
invokes would fail on symbols that are right as they are.
Proved red by reverting the three config lines: 3 failures, one per
arch. Full suite 26 passed, 0 failed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
restoreLVM()infuncs.shclears stale filesystem and RAID signatures off the target partition before it recreates the physical volume:No FOS image has ever contained
wipefs.BR2_PACKAGE_UTIL_LINUX_WIPEFSwas# ... is not setin all three filesystem configs, and busybox has nowipefsapplet — verified against thebusybox.configBuildroot pins, which does not mention it. So the call has always beencommand not found, with both the message and the exit status discarded by the redirect, leaving behind exactly the signatures the line exists to remove.pvcreate -ffthen forces past them, which is why nothing ever looked broken.It also means
wipefsis unavailable to an operator in a debug shell, or following support instructions that name it. That is how this surfaced (forum 18253): a reporter was told to wipe a disk's signatures, found nowipefsin FOS, and fell back todd.The change
configs/fsx64.config:2901BR2_PACKAGE_UTIL_LINUX_WIPEFS=yconfigs/fsx86.config:3013BR2_PACKAGE_UTIL_LINUX_WIPEFS=yconfigs/fsarm64.config:2941BR2_PACKAGE_UTIL_LINUX_WIPEFS=ytests/checks/wipefs-binary-present.shWhy a new check and not a case in
lvm.shtests/checks/lvm.shPATH-shadows every external tool with a logging stub,wipefsincluded, so it proves the call is made and is structurally blind to whether the image can make it. That is the right design for an assertion about control flow, and it is why "is this binary built at all" needs a separate check against the configs.The new check is scoped to
wipefsdeliberately: most util-linux applets are correctlynot sethere because busybox supplies them —mount,losetup,fdisk,blkid— so a sweep over every applet FOS invokes would fail on symbols that are right as they are. It also skips itself if nothing under the rootfs overlay callswipefsany more, rather than pinning a dependency nothing uses.Verification
Proved red by reverting the three config lines — 3 failures, one per arch:
Green with the symbol set, and the full suite is
26 passed, 0 failed.This needs an FOS build and a release pin to reach clients; the config change alone does nothing until then.
🤖 Generated with Claude Code