[systemd-devel] systemd-fsck-root semantics

Lennart Poettering lennart at poettering.net
Wed Jul 2 05:36:56 PDT 2014


On Wed, 02.07.14 12:39, Daniel Drake (drake at endlessm.com) wrote:

> Then the system continues booting, switches root, and then
> system-fsck-root.service starts from the root fs, and runs fsck on /
> again. This is the bit I don't understand - we already checked from
> the initramfs, why check again now?

I think the idea is that the unit is still around, hence won't get
started a second time.

> Also, systemd-fsck-root.service in itself seems a little questionable,
> is it really safe in any context to run fsck on a mounted partition?
> That could modify data structures which have already been cached in
> memory in the kernel fs driver. In fact, e2fsck refuses to run on
> partitions that are mounted, even ones that are ro.

Well this is how things were traditionally done on initrd-less
systems. It's really a horrible thing to do, and people really shouldn't
do it. I certainly wouldn't run my systems like that.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list