Second (erroneous) check of rootfs?
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20150108004352.GA22800@gardel-login
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Nikolai Zhubr
08.01.2015 4:12, Cristian Rodríguez:
Quoted 5 lines · Lennart Poettering
Quoted 2 lines
Maybe suse forgot to include this service file in the initrd or so?
Correct. It appears to be a bug in the dracut package. I wonder why ..
Ok. So should I file a report to opensuse bugtracker? I have no idea if the issue is suse-specific actually... Although I know that dracut is very new for suse, that might explain it...
Hrmm.. looking at the dracut upstream sources.. this service is not included in the required file list. so it is an upstream problem.
Attached is a patch to fix the problem.
From 81b8f407d84cb60e9d4df0e2f68b4bd3850448f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <[email protected]>
Date: Wed, 7 Jan 2015 23:22:00 -0300
Subject: [PATCH] 98systemd: Include systemd-root-fsck.service too
--- modules.d/98systemd/module-setup.sh | 1 + 1 file changed, 1 insertion(+)
modules.d/98systemd/module-setup.sh +1 -0
@@ -91,6 +91,7 @@ install() { $systemdsystemunitdir/systemd-reboot.service \ $systemdsystemunitdir/systemd-kexec.service \ $systemdsystemunitdir/[email protected] \ + $systemdsystemunitdir/systemd-fsck-root.service \ $systemdsystemunitdir/systemd-udevd.service \ $systemdsystemunitdir/systemd-udev-trigger.service \ $systemdsystemunitdir/systemd-udev-settle.service \
Signature · 1 line
2.2.1
В Wed, 07 Jan 2015 23:23:27 -0300
Cristian Rodríguez <[email protected]> пишет:
Quoted 8 lines · Nikolai Zhubr
Quoted 7 lines
08.01.2015 4:12, Cristian Rodríguez:
Quoted 5 lines · Lennart Poettering
Quoted 2 lines
Maybe suse forgot to include this service file in the initrd or so?
Correct. It appears to be a bug in the dracut package. I wonder why ..
Quoted 10 lines
Quoted 3 lines
Ok. So should I file a report to opensuse bugtracker? I have no idea if the issue is suse-specific actually... Although I know that dracut is very new for suse, that might explain it...
Hrmm.. looking at the dracut upstream sources.. this service is not included in the required file list. so it is an upstream problem.
Attached is a patch to fix the problem.
Are you sure? Where this service is called in initrd then? Note that fsck for root *did* run. dracut runs generator for root in 98systemd/rootfs-generator.sh which does
echo "RequiresOverridable=systemd-fsck@${_name}.service"
echo "After=systemd-fsck@${_name}.service"And initrd cannot use systemd-fsck-root.service because this service assumes current root is "/" which is of course wrong in initrd.
So options are
a) somehow dynamically disable systemd-fsck-root.service from within initrd
b) pretend systemd-fsck-root.service did run. Which probably is the same as it means overriding service definition
c) allow passing real root device to systemd-fsck-root.service. Very ugly hack is
[Service]
ExecStart=@rootlibexecdir@/systemd-fsck $__REAL_ROOT_DEVICE__
where __REAL_ROOT_DEVICE__ is added by drop-in in initrd, by rootfs-generator.sh
[Service]
Environment=__REAL_ROOT_DEVICE__=${_name}"
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20150108155548.GA23263@gardel-login
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): CAPWNY8X2X=V2u46fLgvARDbiFws9VkgJVevpFs54FdnsgGcNVg@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CAJCQCtTpHAozdGuNXP2bSfB=+ooVLPHa0Bd0BjqU6J7eT2Wn1A@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
В Sun, 11 Jan 2015 13:43:34 +0300
Nikolai Zhubr <[email protected]> пишет:
Quoted 9 lines
Quoted 2 lines
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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Andrei Borzenkov
В Sun, 11 Jan 2015 13:43:34 +0300
Nikolai Zhubr <[email protected]> пишет:Quoted 9 lines
Quoted 2 lines
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_DEFAULTand possiblyGRUB_CMDLINE_LINUX_RECOVERYin/etc/default/grub; you can use yast for it).
Quoted 5 lines
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/fstaband 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.
Signature · 1 line
Chris Murphy
A message that is not in the archive (sent off-list or not yet received): CAJCQCtS1tGwp4iELnNp8R3gHY=uS+HFnk_J7k_CUxNX3Ga6upQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
В Sun, 11 Jan 2015 04:15:41 -0700
Chris Murphy <lists-zXQU9YWDTqjmlV4oE/1sFAC/[email protected]> пишет:
Quoted 25 lines · Andrei Borzenkov
Quoted 17 lines
В Sun, 11 Jan 2015 13:43:34 +0300
Nikolai Zhubr <[email protected]> пишет:Quoted 9 lines
Quoted 2 lines
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_DEFAULTand possiblyGRUB_CMDLINE_LINUX_RECOVERYin/etc/default/grub; you can use yast for it).Quoted 5 lines
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/fstaband then remount real root read-write using correct options. This all got lost when converting to systemd.
Quoted 5 lines
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?
Quoted 1 line · Andrei Borzenkov
Does it using systemd *inside* of initrd?
I don't know how to find the answer to this. There is an initramfs and systemd-journald is the first thing (other than kernel) to be found in dmesg after the initramfs is unpacked, well before root is mounted.
From upstream dracut:
Quoted 9 lines
if !
dracut_module_included"systemd"; then
inst_hookcmdline 95 "$moddir/parse-block.sh"inst_hookpre-udev 30 "$moddir/block-genrules.sh"inst_hookmount 99 "$moddir/mount-root.sh"
^^^^^^^^^^^^^ here it does it
fiDo you have Fedora specific patches to do it differently?
No idea.
Signature · 5 lines
Chris Murphy _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Quoted 8 lines · Andrei Borzenkov
Does it using systemd *inside* of initrd? From upstream dracut:
if !
dracut_module_included"systemd"; then
inst_hookcmdline 95 "$moddir/parse-block.sh"inst_hookpre-udev 30 "$moddir/block-genrules.sh"inst_hookmount 99 "$moddir/mount-root.sh"
^^^^^^^^^^^^^ here it does it
fi
In Fedora systemd is used in the initramfs.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
В Sun, 11 Jan 2015 15:22:54 +0300
Nikolai Zhubr <[email protected]> пишет:
Quoted 11 lines
Hi,
11.01.2015 14:11, Andrei Borzenkov:
[...]Quoted 3 lines
By adding all needed options to rootflags="..." (modify
GRUB_CMDLINE_LINUX_DEFAULTand possiblyGRUB_CMDLINE_LINUX_RECOVERYin/etc/default/grub; you can use yast for it).Ah, indeed.
Although it feels a bit ugly because the consistency between fstab and GRUB_CMDLINE_* will have to be verified manually forever then.
It's no more ugly than using privately patched distribution package. I did not suggest it as long term generic solution.
Quoted 8 lines
Quoted 5 lines
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/fstaband then remount real root read-write using correct options. This all got lost when converting to systemd.Hmm, can not find any dracut-specific mailing list to ask. Apparently there is none :(
There is; you keep removing it from Cc.
Quoted 3 lines
Anyway, generally, why not pack a real fstab from the host into initrd then? Or at least one line ("/") from it? Something prohibits this?
Dracut does pack /etc/fstab in initrd if run in host-specific mode, but right now systemd-fstab-generator will never parse /etc/fstab for /sysroot mounts. Pre-systemd dracut would actually merge options from rootfs /etc/fstab and rootflags.
Even if you add additional parsing of in-initrd /etc/fstab, it still means you need to regenerate initrd every time you change /etc/fstab so you still have the same problem as when explicitly adding rootflags - keeping both in sync :)
_______________________________________________
systemd-devel mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Hi,
11.01.2015 15:54, Andrei Borzenkov:
Quoted 2 lines
It's no more ugly than using privately patched distribution package. I did not suggest it as long term generic solution.
Yes, absolutely. Therefore I'm reading all the answers to find a reasonable workaround and avoid whatever ugly patching.
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
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/fstaband then remount real root read-write using correct options. This all got lost when converting to systemd.Hmm, can not find any dracut-specific mailing list to ask. Apparently there is none :(
There is; you keep removing it from Cc.
Oh. Sorry! :(
[...]
Quoted 4 lines
Even if you add additional parsing of in-initrd
/etc/fstab, it still means you need to regenerate initrd every time you change/etc/fstabso you still have the same problem as when explicitly adding rootflags - keeping both in sync :)
Well, doing "mkinitrd" is not a problem? It has to be rerun in case of some other changes too. And Yast anyway has to know when it is necessary to run mkinitrd in order to apply changes I'd suppose? (I'm trying to check this now; I think I recall Yast used to be quite smart about it)
Thank you,
Nikolai
Quoted 2 lines
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel