Am 01.10.2013 12:15, schrieb Colin Guthrie: > 'Twas brillig, and Thomas Bächler at 01/10/13 10:18 did gyre and gimble: >> Am 01.10.2013 02:58, schrieb Lennart Poettering: >>> Now, if we have the initrd, then I figure root-fsck.service doesn't make >>> much sense, but there's something missing I think: if we use >>> [email protected] for the root device, how do we then communicate to the >>> root-fsck.service on the host that the file system has already been >>> checked? How is that supposed to work? >> >> This is how I imagine things should work: >> >> 1) initrd fsck's the device used for /sysroot. >> 2) initrd mounts /sysroot as rw > > Why is it the initrd's job to do the rw mount? It should likely mount as > ro pretty much always no? It's up to the booted system to remount rw if > so desired (i.e. in the fstab).
Why should I mount the file system ro only to mount it rw a few milliseconds later? The only reason that was ever done is that file system checks are usually impossible on rw file systems. Since we avoid those anyway with initrd setups, there is no reason left. I can pass the file system with root=, the option with rootflags= and optionally the fs type with rootfstype=. This way, I don't even need to configure my root file system in fstab (and I've started omitting it entirely from my fstabs since the line had no effect anyway). >> 3) initrd fsck's and mounts /usr and friends >> 4) switch-root >> 5) the main system only fsck's and mounts whatever isn't mounted yet. > > This is generally OK, but we have to differentiate between initrd boots > and non-initrd boots too - as Lennart said, root-fsck is only really > sensible if and only if no initrd is used. Yes, I think that's what we should go for: systemd-root-fsck is only for initrd-less systems. > I think everyone agrees that systemd-root-fsck is not needed if you have > an initrd. If that is so, I am happy. > It's only meant for initrd-less boots. Perhaps, the initrd > should just drop a masking symlink in /run/systemd/system for that > service to ensure it's not run? I like that. > Likewise the initrd could do the masking > for the remount service too such that someone booting without an initrd > could still get it? Maybe - I personally mask the service on all my systems (it noticably slowed down a non-SSD boot on an old machine). I don't think it should be needed on a properly configured system with initrd. Even on a non-initrd system, all it should change is the rw/ro flag, the rest can be configured properly right from the start.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
