Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Thing is, the main /sbin/fsck binary may use bitwise OR to combine exit codes coming from different filesystem-specific fsck binaries; for this operation to make sense, there really should be some common interpretation for these exit codes. fsck.fat not using these standard codes is a bug, which presumably will be fixed in some future release. Commented Aug 25, 2019 at 16:58
  • Yes, I agree it’s a bug; unfortunately that doesn’t change the fact that you can’t rely on the codes having a common meaning, you need to check first. (And yes, I think all fscks you’d use on a root file system do follow the main fsck expectations.) Commented Aug 25, 2019 at 18:48
  • If the only sensible action in that case is to reboot, why doesn't fsck just invoke reboot(2) on its own, or send SIGINT to PID 1? The reboot must be for some reason other than 'because I said so'. Commented Sep 3, 2019 at 8:31
  • One tool, one job. fsck’s job is to check and fix file systems, not to handle rebooting. Arguably the documentation assumes too much; it would be more accurate to say “2 indicates that a mounted file system was altered” (which in practice means the system should be rebooted). Commented Sep 3, 2019 at 9:06