[arch-general] mkinitcpio: fsck - Does it actually make sense?

Tom Gundersen teg at jklm.no
Tue Apr 9 17:41:26 EDT 2013


On Mon, Apr 8, 2013 at 10:45 PM, Karol Babioch <karol at babioch.de> wrote:
> I'm wondering whether it makes actually sense to include the fsck hook
> into the initial ramdisk.syt

In case your filesystem needs fsck before being mounted (i.e., it is
not btrfs), then the sane thing to do is to first fsck it, and then
mount it; not to first mount it read-only, then fsck it and then
remount it rw.

As Jan pointed out, one reason is to avoid reboots. I think an equally
important point is that in case there is a problem, it might mean you
can't even mount your filesystem read-only, or even if you can do that
using a fsck binary (and libraries) from a possibly broken filesystem
might not work as the binary itself might be what needs to be fixed.

All of this can easily be solved by just doing the fsck'ing from the
initramfs before mounting the filesystems :-)

> With the "current" switch to systemd
> filesystems get fsck'ed by default anyway, so it seems to be sort of
> redundant.

Not sure if I follow this. systemd should detect which filesystems
were fsck'ed in the initramfs and not fsck them again.  Are you
experiencing something else? If so, we should probably fix that,
nothing should be fsck'ed twice.

Cheers,

Tom


More information about the arch-general mailing list