[systemd-devel] systemd-fsck-root semantics

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Thu Jul 3 07:03:26 PDT 2014


On Thu, Jul 03, 2014 at 02:23:57PM +0200, Tom Gundersen wrote:
> On Thu, Jul 3, 2014 at 2:14 PM, Zbigniew Jędrzejewski-Szmek
> <zbyszek at in.waw.pl> wrote:
> > On Thu, Jul 03, 2014 at 11:49:20AM +0200, Thomas Bächler wrote:
> >> Am 02.07.2014 14:29, schrieb Daniel Drake:
> >> > If I'm reading things right, actually the default behaviour is (when
> >> > no hints are supplied in kernel cmdline) :
> >> >  1. systemd runs fsck on root from initramfs
> >> >  2. systemd mounts root fs ro
> >> >  3. switch-root onto real system
> >> >  4. systemd-fsck-root runs
> >> >  5. systemd-remount-fs remounts / as rw
> >> >
> >> > Also just noticed another interesting thing -
> >> > systemd-fsck-root.service is only loaded dynamically, when /etc/fstab
> >> > has a non-zero passno for /. So maybe the idea is that anyone running
> >> > a regular and modern dracut/systemd setup sets passno=0 for / in
> >> > fstab, with the knowledge that fsck of / is done by the initramfs.
> >>
> >> Tom and me are thought this through a couple of months ago when I
> >> started looking into using Arch's mkinitcpio with systemd. We submitted
> >> a few changes to fsck handling back then.
> >>
> >> This is the setup we want to support (this is now the default in a new
> >> Arch installation):
> >> 1) fsck in initramfs
> >> 2) initramfs mounts rw
> >> 3) no re-fsck in the system
> > This is what we want.
> >
> > We also want this to work:
> > 1) fsck in the initramfs
> > 2) initramfs mounts ro
> > 3) no re-fsck or remount in the system
> 
> Hm, the only way this would get re-fscked in the system is if it is
> explicitly configured to be in /etc/fstab... Shouldn't we just give
> people what they ask for? Otherwise passno= for the rootfs would have
> no effect at all in this setup (the rootfs is fscked unconditionally
> in the initrd regardless of what /etc/fstab says (obviously)).
Well, passno=1 means it should be checked... once. It would be
rather lame to require the user to set it to 0 because the system
forgets whether it has already checked the fs or not.

Zbyszek


More information about the systemd-devel mailing list