[Bug 965477] New: dracut fails to create initrd, makes systems unbootable
http://bugzilla.opensuse.org/show_bug.cgi?id=965477 Bug ID: 965477 Summary: dracut fails to create initrd, makes systems unbootable Classification: openSUSE Product: openSUSE Tumbleweed Version: 2015* Hardware: Other OS: Other Status: NEW Severity: Major Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: lbeltrame@kde.org QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Recent updates made dracut fail when generating the initrd: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "radeon xennet xenblk" /boot/initrd-4.5.0-rc1-3.g088c252-default 4.5.0-rc1-3.g088c252-default I: *** Including module: bash *** I: *** Including module: systemd *** I: *** Including module: warpclock *** I: *** Including module: systemd-initrd *** I: *** Including module: i18n *** I: *** Including module: network *** I: *** Including module: drm *** I: *** Including module: plymouth *** I: *** Including module: kernel-modules *** I: *** Including module: kernel-network-modules *** F: installkernel failed in module kernel-network-modules This causes no initrd to be generated, which means often a kernel panic with unknown filesystem (at least on my machine). Adding a "set -x" to the offending module (/usr/lib/dracut/modules.d/90kernel-modules/module_setup.sh) made me notice that it fails with return code 255: + running_in_qemu + type -P systemd-detect-virt ++ systemd-detect-virt --vm + vm= + (( 1 != 0 )) + return 255 + _ret=255 + unset check depends cmdline install installkernel + return 255 + dfatal 'installkernel failed in module kernel-network-modules' + set +x dracut: installkernel failed in module kernel-network-modules The offending line being line 87 in module_setup.sh: running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci running_in_qemu returns 255 and that makes dracut fail. Commenting out this line allows the generation of the initrd. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c1
--- Comment #1 from Luca Beltrame
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c2
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
Christophe Giboudeaux
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c3
Fabian Vogt
Confirmed, but this is a different bug, unless you're booting from NBD, NFS or iSCSI.
Fix for the main issue is on its way to factory. To fix the other issue (network being added although not needed here AFAICS), can you upload the output of an mkinitd run? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c4
Luca Beltrame
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c5
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c6
Luca Beltrame
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c7
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c8
Ivan Topolsky
The offending line being line 87 in module_setup.sh:
running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
running_in_qemu returns 255 and that makes dracut fail.
Commenting out this line allows the generation of the initrd.
There's a missing "return 0" (=success) statement at the end of the function. Otherwise the function inherits the return status of the last executed statement. In our case - mine and Luca's - we don't run openSuSE Tumbleweed under qemu. So "running_in_qemu" correctly returns 255 as it should (= false) But then "installkernel()" reaches end, while nothing change the return status (Still 255, thus dracut considers it as a failure). If no error happened, status should be 0, hence my patch. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c9
--- Comment #9 from Ivan Topolsky
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c10
--- Comment #10 from Ivan Topolsky
Created attachment 665808 [details]
Alternative to my above patch.
...and in OBS: https://build.opensuse.org/package/rdiff/home:dr-yak:branches:Base:System/dracut?opackage=dracut&oproject=Base%3ASystem&rev=3 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c11
Fabian Vogt
Created attachment 665807 [details] Missing "return 0"
The offending line being line 87 in module_setup.sh:
running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
running_in_qemu returns 255 and that makes dracut fail.
Commenting out this line allows the generation of the initrd.
There's a missing "return 0" (=success) statement at the end of the function.
Otherwise the function inherits the return status of the last executed statement.
That's exactly what's supposed to happen. If instmods fails, installkernel() fails as well.
In our case - mine and Luca's - we don't run openSuSE Tumbleweed under qemu. So "running_in_qemu" correctly returns 255 as it should (= false)
That's already fixed.
But then "installkernel()" reaches end, while nothing change the return status (Still 255, thus dracut considers it as a failure).
If no error happened, status should be 0, hence my patch.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c12
--- Comment #12 from Ivan Topolsky
running_in_qemu returns 255 and that makes dracut fail.
Commenting out this line allows the generation of the initrd.
There's a missing "return 0" (=success) statement at the end of the function.
Otherwise the function inherits the return status of the last executed statement.
That's exactly what's supposed to happen. If instmods fails, installkernel() fails as well.
BUT if "running_in_qemu" returns 255, installkernel fails too. And I strongly suspect that this is NOT the expected behaviour. (It should fail based on the instmods run following that statement).
In our case - mine and Luca's - we don't run openSuSE Tumbleweed under qemu. So "running_in_qemu" correctly returns 255 as it should (= false)
That's already fixed.
Hum...
# zypper refresh # zypper update Nothing to do.
By fixed, you mean "its in the code repository", or you mean "the RPM package is deployed to Tumbleweed" ? Because currently I'm still left with the version of dracut that doesn't make the initrd and leaves the system in an unbootable state. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965477
http://bugzilla.opensuse.org/show_bug.cgi?id=965477#c13
--- Comment #13 from Fabian Vogt
running_in_qemu returns 255 and that makes dracut fail.
Commenting out this line allows the generation of the initrd.
There's a missing "return 0" (=success) statement at the end of the function.
Otherwise the function inherits the return status of the last executed statement.
That's exactly what's supposed to happen. If instmods fails, installkernel() fails as well.
BUT if "running_in_qemu" returns 255, installkernel fails too. And I strongly suspect that this is NOT the expected behaviour. (It should fail based on the instmods run following that statement).
As I said, it's fixed. Look at Base:System or openSUSE:Factory on OBS.
In our case - mine and Luca's - we don't run openSuSE Tumbleweed under qemu. So "running_in_qemu" correctly returns 255 as it should (= false)
That's already fixed.
Hum...
# zypper refresh # zypper update Nothing to do.
By fixed, you mean "its in the code repository", or you mean "the RPM package is deployed to Tumbleweed" ? Because currently I'm still left with the version of dracut that doesn't make the initrd and leaves the system in an unbootable state.
I submitted it to factory last monday, it should be in the next snapshot. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com