[Pkg-sysvinit-devel] Bug#757083: initscripts: please treat /usr (if separate) the same as /

Simon McVittie smcv at debian.org
Tue Aug 5 08:23:11 UTC 2014

The patch I attached does not apply cleanly to current initscripts
master; there are (relatively simple) conflicts.

However, looking at the patch in detail to resolve the conflicts, I'm

> +       if [ "$fs" = "/" ] ; then
> +               fs="root"
> +       else
> +               MNT_CHECK="no"
>         fi

Doesn't that defeat the purpose of some of the rest of the patch by not
fsck'ing /usr even though checkfs has been generalized to allow fsck'ing
any filesystem?

The logic to try to use /dev/root for fsck also seems odd; I would
expect it to only have that special case when fsck'ing the root filesystem.

Also, the initramfs-tools patchset includes closing #708000 by fsck'ing
/ and /usr before mounting them. So I'm not sure why initscripts would
ever need to fsck the root or /usr filesystems any more?

I suppose it could conceivably need to fsck the root filesystem, because
we might not have an initramfs on a system where /usr is on the root
filesystem; but as it stands at the moment, it would. Shouldn't it have
pseudocode more like this?

    during boot:
        if root filesystem is read-only:
            fsck it
            remount it rw
            # previously, we would mount ro, fsck, mount rw
            # now, we assume it was fsck'd by the initramfs
            # and do nothing

    during shutdown (does not appear to have been implemented yet):
        in umountfs:
            do not unmount /usr
        in umountnfs.sh:
            do not unmount /usr
        in umountroot:
            remount /usr ro, the same as /

More information about the Pkg-sysvinit-devel mailing list