Re: mkinitcpio: fsck - Does it actually make sense?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Apr 8, 2013 at 10:45 PM, Karol Babioch <karol@xxxxxxxxxx> 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


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux