[systemd-devel] Second (erroneous) check of rootfs?

Andrei Borzenkov arvidjaar at gmail.com
Sun Jan 11 03:57:58 PST 2015


В Sun, 11 Jan 2015 04:15:41 -0700
Chris Murphy <lists at colorremedies.com> пишет:

> On Sun, Jan 11, 2015 at 4:11 AM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
> > В Sun, 11 Jan 2015 13:43:34 +0300
> > Nikolai Zhubr <n-a-zhubr at yandex.ru> пишет:
> >
> >> >
> >> > Uh. Why not simply mount rootfs rw in initrd then?
> >>
> >> I'm not against generally. But it'd mean that this first mount is
> >> actually a real mount, the fs will start up in full. Then I'd suppose it
> >> is definitely a must to supply all necessary mount options (from fstab)
> >> at this stage already. I don't easily see how to do this currently, at
> >> least on my opensuse system.
> >>
> >
> > By adding all needed options to rootflags="..." (modify
> > GRUB_CMDLINE_LINUX_DEFAULT and possibly GRUB_CMDLINE_LINUX_RECOVERY
> > in /etc/default/grub; you can use yast for it).
> >
> > Otherwise it is functional gap between non-systemd and systemd
> > enabled dracut. Without systemd dracut will actually mount root
> > read-only, then fetch mount options from real root /etc/fstab and then
> > remount real root read-write using correct options. This all got lost
> > when converting to systemd.
> 
> 
> Not true on Fedora even still with 21. The kernel parameter ro is
> present, so dracut mounts root read-only, then reads fstab, then does
> a remount. Fedora is a systemd OS of course.
> 
> 

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?


More information about the systemd-devel mailing list