[systemd-devel] Second (erroneous) check of rootfs?
Chris Murphy
lists at colorremedies.com
Sun Jan 11 11:45:17 PST 2015
On Sun, Jan 11, 2015 at 4:57 AM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
> В Sun, 11 Jan 2015 04:15:41 -0700
> Does it using systemd *inside* of initrd? From upstream dracut:
>
> if ! dracut_module_included "systemd"; then
> inst_hook cmdline 95 "$moddir/parse-block.sh"
> inst_hook pre-udev 30 "$moddir/block-genrules.sh"
> inst_hook mount 99 "$moddir/mount-root.sh"
> ^^^^^^^^^^^^^ here it does it
> fi
>
> Do you have Fedora specific patches to do it differently?
So the reason it's mounting all file systems ro by default appears to
be strictly because of the ro kernel parameter in the grub.cfg as
created by grub-mkconfig. This is the same on Fedora as it is
upstream, it's hardcoded into /etc/grub.d/10_linux:
Fedora 21:
10_linux:147: ${linuxefi} ${rel_dirname}/${basename}
root=${linux_root_device_thisversion} ro ${args}
10_linux:151: linux${sixteenbit} ${rel_dirname}/${basename}
root=${linux_root_device_thisversion} ro ${args}
Upstream:
http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub.d/10_linux.in
10_linux:132: linux ${rel_dirname}/${basename}
root=${linux_root_device_thisversion} ro ${args}
So systemd is just doing what it's being told. If I manually change
the ro to rw then the first mount is rw and there is no remount unless
there are fstab non-default options.
If the first mount should be rw then I think this needs to be changed
upstream. And at least one other distro does change this, I think it's
opensuse, but it could be Ubuntu (or both).
--
Chris Murphy
More information about the systemd-devel
mailing list