Bug#346148: [Pkg-sysvinit-devel] Bug#346148: checkroot.sh: does not
properly handle fsck exit states
Thomas Hood
jdthood at yahoo.co.uk
Fri Jan 6 11:01:40 UTC 2006
tags 346148 fixed-in-experimental patch pending
severity 342160 critical
merge 346148 342160
found 346148 2.86.ds1-4
stop
Wouter Verhelst wrote:
> I just noticed that my laptop, at bootup, started an fsck for the root
> filesystem, claiming that it was a filesystem with errors. When it was
> about 20% done, it exited, and told me to rerun it manually. I expected
> a prompt for my root password and to be put in single-user mode, but
> this did not happen; instead, my system did a normal boot.
>
> This should _never_ happen! If the fsck fails, all sorts of bad things
> might have happened with the file system; continueing the boot at that
> point is a very good way to lose all your data.
Thanks for reporting the bug.
checkroot.sh in at 2.86.ds1-[46] contains a bug such that the return status
of fsck is ignored. This bug has been fixed in more recent releases (to
experimental).
Additional info:
Reading checkroot.sh I see that it only continues with booting if the fsck
return status is 0 or 1. If the status is 2 or 3 then the system is rebooted
after five seconds. If the status is greater than 3 then a shell is started.
The comment in checkroot.sh says "A return code of 1 indicates that file system
errors were corrected but that the boot may proceed."
The fsck(8) and fsck.ext3(8) man pages say that 1 means "File system errors
corrected".
--
Thomas Hood
More information about the Pkg-sysvinit-devel
mailing list