[systemd-devel] Second (erroneous) check of rootfs?
n-a-zhubr at yandex.ru
Fri Jan 9 01:55:40 PST 2015
08.01.2015 23:32, Harald Hoyer:
>> Yes, I was about to suggest the same at the end. Where I fill uneasy is
>> hardcoding /dev/root inside of systemd-fsck. In case of dracut this is
>> basically the only thing that we know for sure. Does every initrd
>> implementation use it?
>> Alternative is to always use /dev/root in systemd-fsck and factor out
>> current code that checks for root block device into service/generator
>> that creates it.
> Do not use /dev/root and do not rely on it! Please!
Maybe a very naive idea, but why not add some special (for initrd)
config file (like fstab.rd.conf) in order to explicitely specify host
root location, fstype, options etc. Why try so hard to guess
automatically? Note, that here in my initrd I already see quite a number
of similar config files under /etc, generated by mkinitrd, such as
mdadm.conf, os-release, vconsole.conf, conf.d/systemd.conf, and even
cmdline.d/95root-dev.conf (probably created by dracut).
Besides, while we are at it anyway, wouldn't it be good to be able to
somehow add the necessary filesystem mount options to the initial root
mount command (that very first one from initrd, readonly). I'm not
completely sure if _all_ filesystems can successfully apply _any_ mount
option at subsuquent root remount (probably applying "-o rw" to remount
read-write is guaranteed indeed to work for all filesystems, but tons of
other options... I just don't know).
More information about the systemd-devel