YB-FSCK(1)
π YB-FSCK(1) β like, the fsck manual page, bestie
okay so real quick β this is page one of the manual, section one, User Commands, and the tool is literally called fsck. yes, that fsck. no cap. let's get into it π«Ά
β¨ NAME β¨
fsck β filesystem check, aka dump store metadata πΎ (yes, it's giving "the name is scarier than the job")
πΈ SYNOPSIS πΈ
fsck [-v|--verbose] [--nvm] [--check-key] [-h|--help]
π¦ DESCRIPTION π¦
So what does it actually do? It reports the state of your YubiKey β think PIN and PUK, management key, store slot β and then it reads the store header plus all the PIV objects without decrypting any blob. Then it verifies every single blob's ECDSA signature and prints an integrity summary. Iconic behaviour, honestly. β¨
No PIN is required for any of thatβ¦ except with --check-key, which checks that the key in the store slot matches its certificate. That one's gonna want the PIN. π
fsck runs on any YubiKey β including a factory-fresh one, or one that doesn't even have a store. Very "works on my machine, and yours too" of it. πββοΈ
β οΈ exit status tea: it exits with status 1 when the report shows an error, and 0 otherwise. Warnings (like factory-default credentials) do not change the exit status. Periodt.
What counts as an error, you ask? Glad you did π β it's status 1 for:
- blocked PIN
- unsupported management key mode
- key/certificate mismatch
- a certificate without an EC P-256 key
- an unreadable store
- a
CORRUPTEDblob
Also, when the YubiKey does not keep its management key, you get a hint telling you how to have it kept (yb rotate-management-key). Thoughtful queen behaviour. π
π big caveat, do not skip:fsckdoes not repair damage. At all. It's a look-don't-touch situation. Useyb removeto clean up corrupt blobs.
π OPTIONS π
-v,--verboseβ prints the full per-object dump on top of the summary. Maximum detail, maximum main character energy π--nvmβ scans all PIV objects to report NVM usage (store/other/free). Heads up: it issues ~290 read-only APDUs, so it may take a few seconds on real hardware. πβ¨--check-keyβ asks for the PIN and checks that the key in the store slot matches its certificate π-h,--helpβ prints help. the classic. the icon. π
π OUTPUT π
the default output (no flags, bestie)
YubiKey <serial> β firmware <version>
PIN ok (3/3 tries left)
PUK ok (3/3 tries left)
Management key 3DES, kept on the YubiKey, unlocked by the PIN
Slot 0x82 EC P-256, generated on card, certificate CN=YBLOB ECCP256
Key/certificate not checked (use --check-key)
Store: <n> objects, slot 0x<xx>, age <n>
Blobs: <n> stored, <n> objects free (~<n> bytes used by store)
blob-name-1 VERIFIED
blob-name-2 UNVERIFIED
old-blob CORRUPTED
Integrity: <n> verified, <n> unverified, <n> corrupted
π possible per-blob verdicts
VERIFIEDβ ECDSA signature is present and cryptographically valid. slay. βUNVERIFIEDβ no signature trailer (that's the olderyb0/yb1format) or the certificate is unreadable. π₯²CORRUPTEDβ signature present but verification failed, or the payload is truncated. π¨
with --nvm
An additional NVM breakdown line gets printed right after the integrity summary, showing bytes attributed to the yb store, to other PIV objects, and the estimated free space. Again for the people in the back: this issues approximately 290 read-only APDUs and may take a few seconds on real hardware. β³
with --verbose
Structural warnings (orphaned continuation chunks, duplicate blob names β yes those are the two, that's the whole list) get printed after the integrity summary, followed by a raw per-object dump showing all metadata fields. Everything. All of it. π
π EXAMPLES π
Integrity audit:
yb fsck
Audit with NVM breakdown:
yb fsck --nvm
Full object dump for debugging:
yb fsck --verbose
Also check the store key against its certificate (asks for the PIN):
yb fsck --check-key
π SEE ALSO π
yb(1), yb-list(1), yb-format(1), yb-remove(1)
okay and that's the whole page, mwah π β this little masterpiece lives in the yb manual, dated 2026-03, and it's the YB-FSCK(1) entry, so now you know your way around it fr fr π¦β¨
π¦ where this page comes from
- nixpkgs unstable: yb 0.5.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms