Superblock time check causes problems for fsck in initramfs
Janis Hamme
lists.oss at hamme.info
Wed Apr 1 04:59:06 BST 2015
On Tue, 31 Mar 2015 03:14:53 +0100 Ben Hutchings <ben at decadent.org.uk>
wrote:
> By the way, Lennart Poettering told me that other distributions have
> done that, though I haven't checked whether it is done with a
> configuration file or a patch to the code.
>
> > it wouldn't be better to just skip the fsck of / (and /usr, if
separate).
> > For that, initramfs-tools could create a flag file for / and /usr in
> > /run and we'd update systemd-fsck-root.service and systemd-fsck at .service
> > and add a Condition= which checks for that flag file.
> > (suggestion, let's call them /run/fsck/root and /run/fsck/usr)
> >
> >
> > The sysv init scripts could do something similar (therefore CCed).
>
> Not easily - they currently rely on the fsck binary to iterate over all
> filesystems, and don't have any logic to do so themselves. (That's why
> initramfs-tools still doesn't mount /usr if it's going to hand over to
> sysvinit.)
Actually it's not so difficult, as long as the following condition
holds: filesystems that are mounted before handing over to the init
system have been checked before. Since initramfs-tools are now
responsible for checking partitions that are mounted prior to init,
duplicate fsck's from sysvinit and systemd should be consequently avoided.
Root partition checking could be disabled in /etc/init.d/checkroot.sh
and systemd-fsck-root.service should be masked.
For all other partitions the fsck tool has the option "-M" to ignore
mounted file systems. It could be applied to /etc/init.d/checkfs.sh and
systemd-fsck internally.
Janis
More information about the Pkg-systemd-maintainers
mailing list