[Pkg-sysvinit-devel] Bug#468821: e2fsprogs: fsck could print less scary message on exit(1)

Sven Joachim svenjoac at gmx.de
Sat Mar 1 20:08:14 UTC 2008


On 2008-03-01 20:12 +0100, Theodore Tso wrote:

> reassign 468821 initscripts
> thanks
>
> On Sat, Mar 01, 2008 at 06:02:07PM +0100, Sven Joachim wrote:
>> Package: e2fsprogs
>> Version: 1.40.7-1
>> Severity: wishlist
>> 
>> This morning I had a power failure, and on reboot I got told that fsck
>> died with exit status 1, as logged in /var/log/fsck/checkroot:
>> 
>> ,----
>> | Log of fsck -C -a -V -t ext2 /dev/hda9 
>> | Sat Mar  1 08:04:30 2008
>> | 
>> | fsck 1.40.7 (28-Feb-2008)
>> | [/sbin/fsck.ext2 (1) -- /] fsck.ext2 -a -C0 /dev/hda9 
>> | / was not cleanly unmounted, check forced.
>> | /: 10385/60240 files (2.5% non-contiguous), 115168/240940 blocks
>> | fsck died with exit status 1
>> | 
>> | Sat Mar  1 08:04:35 2008
>> | ----------------
>> `----
>
> This isn't a bug with e2fsprogs, it's a bug with the initscripts.  As
> you point out, an exit status of 1 means that filesystem errors are
> corrected, and is a long-standing Unix convention.
>
> /etc/init.d/checkfs.sh does the right thing.
>
> For /etc/init.d/checkroot.sh, if the root filesystem has been modified
> (which is one will generally be true if any filesystem errors have
> been corrected), the appropriate response is to reboot the system,
> since incorrect information may have been cached in the root
> filesystem, and if the root filesystem is remounted read/write without
> first rebooting, the incorrect information could get written back to
> the disk, undoing fsck's good work.

/etc/init.d/checkroot.sh only reboots the system if fsck exits with a
value > 1, which seems in accordance with the fsck manpage.

> So currently /etc/init.d/checkroot is doing the right thing, but it's
> issuing a scary message.

The message comes from fsck, see misc/logsave.c.  There is nothing in
the initscripts with prints it:

,----
| $ grep "died" $(dpkg -L initscripts)
| $ echo $?
| 1
`----

> But /etc/init.d/checkroot is owned by initscripts, not e2fsprogs, so
> this bug needs to be reassigned to the initscripts package.

I'm not convinced, but I let their maintainers decide.

Sven





More information about the Pkg-sysvinit-devel mailing list