Superblock time check causes problems for fsck in initramfs

Ben Hutchings ben at decadent.org.uk
Thu Apr 9 03:02:35 BST 2015


On Wed, 2015-04-01 at 05:59 +0200, Janis Hamme wrote:
> 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.

I've uploaded a new version of clock-setup which creates
/etc/e2fsck.conf if the RTC is set to local time.  Bug #782178 against
release-notes covers documentation of the need to do that on upgrade.

I've also uploaded a version of initramfs-tools to
<https://people.debian.org/~benh/packages/> (version 0.120~bwh.1) which
creates the stamp files:

    /run/initramfs/fsck-root
    /run/initramfs/fsck-usr

If you think you have time to get the init systems using these, please
let me know I should upload these changes to the archive.

Ben.

-- 
Ben Hutchings
I'm always amazed by the number of people who take up solipsism because
they heard someone else explain it. - E*Borg on alt.fan.pratchett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150409/b8e5446c/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list