util-linux: restrict libblkid partition probers to gpt/dos - #1006
Open
qianxjcraig wants to merge 1 commit into
Open
util-linux: restrict libblkid partition probers to gpt/dos#1006qianxjcraig wants to merge 1 commit into
qianxjcraig wants to merge 1 commit into
Conversation
qianxjcraig
marked this pull request as ready for review
August 11, 2026 17:22
vigh-m
reviewed
Aug 13, 2026
Comment on lines
+6
to
+16
| Bottlerocket only creates and consumes GPT partition tables (plus the | ||
| DOS/pMBR protective MBR that GPT requires). The Atari prober has no magic | ||
| number and matches purely on structural heuristics, so the pseudorandom | ||
| bytes of a freshly-encrypted EBS volume can produce a phantom "atari" | ||
| partition table. mkfs.xfs then refuses to format BOTTLEROCKET-DATA and | ||
| the node fails to boot (~1/1800 launches on ~1 TB volumes). | ||
|
|
||
| Restrict the top-level prober array to gpt/dos/pmbr and drop the sources | ||
| for the now-unreferenced probers (aix, atari, mac, sgi, sun, ultrix). | ||
| bsd, unixware, solaris_x86 and minix stay compiled because dos.c invokes | ||
| them as MBR sub-probes; aix.h stays because dos.c includes it. |
Contributor
There was a problem hiding this comment.
Suggested change
| Bottlerocket only creates and consumes GPT partition tables (plus the | |
| DOS/pMBR protective MBR that GPT requires). The Atari prober has no magic | |
| number and matches purely on structural heuristics, so the pseudorandom | |
| bytes of a freshly-encrypted EBS volume can produce a phantom "atari" | |
| partition table. mkfs.xfs then refuses to format BOTTLEROCKET-DATA and | |
| the node fails to boot (~1/1800 launches on ~1 TB volumes). | |
| Restrict the top-level prober array to gpt/dos/pmbr and drop the sources | |
| for the now-unreferenced probers (aix, atari, mac, sgi, sun, ultrix). | |
| bsd, unixware, solaris_x86 and minix stay compiled because dos.c invokes | |
| them as MBR sub-probes; aix.h stays because dos.c includes it. | |
| Restrict the top-level prober array to gpt/dos/pmbr and drop the sources | |
| for the now-unreferenced probers (aix, atari, mac, sgi, sun, ultrix). Bottlerocket | |
| only creates and consumes GPT partition tables (plus the DOS/pMBR | |
| protective MBR that GPT requires). | |
| bsd, unixware, solaris_x86 and minix stay compiled because dos.c invokes | |
| them as MBR sub-probes; aix.h stays because dos.c includes it. |
I think we can be more specific about the comment/commit message since we're removing unsupported partitions. The Atari error was just the impetus for this investigation.
qianxjcraig
force-pushed
the
libblkid-strip-atari-prober
branch
from
August 17, 2026 17:59
868ab47 to
68f5738
Compare
Restrict the top-level prober array to gpt/dos/pmbr and drop the sources for the now-unreferenced probers (aix, atari, mac, sgi, sun, ultrix). Bottlerocket only creates and consumes GPT partition tables (plus the DOS/pMBR protective MBR that GPT requires). bsd, unixware, solaris_x86 and minix stay compiled because dos.c invokes them as MBR sub-probes; aix.h stays because dos.c includes it. See bottlerocket-os/bottlerocket#4855 Signed-off-by: Craig Qian <qianxj@amazon.com>
qianxjcraig
force-pushed
the
libblkid-strip-atari-prober
branch
from
August 17, 2026 18:10
68f5738 to
cfdbd35
Compare
Contributor
Author
|
Resolve commitlint failure |
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.
Issue number:
Closes bottlerocket-os/bottlerocket#4855
Description of changes:
EKS worker nodes intermittently fail to boot (~1/1800 launches, more frequent on large ~1 TB volumes) because
mkfs.xfsrefuses to format theBOTTLEROCKET-DATApartition, wrongly reporting that it already contains an Atari filesystem.The root cause is in libblkid. Unlike every other partition-table prober, the Atari prober has no magic number — it identifies a partition table purely from loose structural heuristics. On a freshly-encrypted EBS volume, the pseudorandom bytes that back never-written blocks can coincidentally satisfy those heuristics, so libblkid reports a phantom atari partition table on
BOTTLEROCKET-DATA.mkfs.xfsthen sees an "existing filesystem" and refuses to format, andprepare-local-fs.servicefails, blocking boot. (See also util-linux#1116 and rook#7940.)Bottlerocket only ever creates and consumes GPT partition tables (plus the DOS/pMBR protective MBR that GPT requires). This patch restricts libblkid's partition-prober set to gpt, dos, and pmbr, and stops compiling the now-unreferenced legacy prober sources (aix, atari, mac, sgi, sun, ultrix) from both the automake and meson builds. This removes the Atari false positive at the source and reduces libblkid's attack surface by not building parsers Bottlerocket never uses.
bsd, unixware, solaris_x86, and minix are dropped from the top-level prober array but intentionally kept in the build, because
dos.c's dos_nested[] table invokes them as MBR sub-probes;aix.his likewise retained becausedos.cincludes it for the AIX magic-number check.This adds Patch1: to
util-linux.spec;%autosetup -p1applies it automatically.Testing done:
git apply --checkandpatch -p1 --dry-run).atari_pt_idinfo(and the other removed probers) are absent from the resultinglibblkid.so, while dos/gpt/pmbr remain — with no undefined-reference/link errors, confirming the retained sub-probe sources still link.BOTTLEROCKET-DATApartition seeded with a valid Atari signature that reliably reproduces the failure on stock AMIs). Confirmed the node boots cleanly: nomkfs.xfs ... (atari)error,prepare-local-fs.servicesucceeds,/localmounts, and the system reaches multi-user.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.