[Bug 966984] New: dracut kernel-network-modules installkernel fails with code 255 because of running_in_qemu
http://bugzilla.opensuse.org/show_bug.cgi?id=966984 Bug ID: 966984 Summary: dracut kernel-network-modules installkernel fails with code 255 because of running_in_qemu Classification: openSUSE Product: openSUSE Tumbleweed Version: 2015* Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: klaus.bitto@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- This originates from https://forums.opensuse.org/showthread.php/513598-Dracut-macht-kein-initrd-I... on 10 February 2016, dracut=044-2.1 got installed on my system. On this and any later day I can no longer create initrds. Default output is e.g.: # mkinitrd -v Creating initrd: /boot/initrd-4.3.3-7.geae9134-default dracut: Executing: /usr/bin/dracut -v --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-4.3.3-7.geae9134-default 4.3.3-7.geae9134-default modinfo: ERROR: Module snd_compress not found. modinfo: ERROR: Module snd_soc_rl6231 not found. modinfo: ERROR: Module irqbypass not found. modinfo: ERROR: Module snd_soc_core not found. modinfo: ERROR: Module videobuf2_v4l2 not found. modinfo: ERROR: Module snd_soc_rt5640 not found. modinfo: ERROR: Module snd_soc_sst_acpi not found. dracut: *** Including module: bash *** dracut: *** Including module: systemd *** dracut: *** Including module: warpclock *** dracut: *** Including module: systemd-initrd *** dracut: *** Including module: i18n *** dracut: *** Including module: network *** dracut: *** Including module: drm *** dracut: *** Including module: plymouth *** dracut: *** Including module: crypt *** dracut: *** Including module: dm *** dracut: Skipping udev rule: 64-device-mapper.rules dracut: Skipping udev rule: 60-persistent-storage-dm.rules dracut: Skipping udev rule: 55-dm.rules dracut: *** Including module: kernel-modules *** dracut: *** Including module: kernel-network-modules *** dracut: installkernel failed in module kernel-network-modules Adding the debug flag: /usr/bin/dracut -v --debug --logfile /var/log/YaST2/mkinitrd.log --force 4.3.3-7.geae9134-default The output ends with: /usr/lib/dracut/modules.d/90kernel-network-modules/module-setup.sh@86(installkernel): running_in_qemu /usr/lib/dracut/modules.d/90kernel-network-modules/module-setup.sh@14(running_in_qemu): type -P systemd-detect-virt //usr/lib/dracut/modules.d/90kernel-network-modules/module-setup.sh@15(running_in_qemu): systemd-detect-virt --vm /usr/lib/dracut/modules.d/90kernel-network-modules/module-setup.sh@15(running_in_qemu): vm= /usr/lib/dracut/modules.d/90kernel-network-modules/module-setup.sh@16(running_in_qemu): (( 1 != 0 )) /usr/lib/dracut/modules.d/90kernel-network-modules/module-setup.sh@16(running_in_qemu): return 255 /usr/lib/dracut/dracut-init.sh@678(module_installkernel): _ret=255 /usr/lib/dracut/dracut-init.sh@679(module_installkernel): unset check depends cmdline install installkernel /usr/lib/dracut/dracut-init.sh@680(module_installkernel): return 255 /usr/bin/dracut@1439(main): dfatal 'installkernel failed in module kernel-network-modules' /usr/lib/dracut/dracut-logger.sh@438(dfatal): set +x dracut: installkernel failed in module kernel-network-modules /usr/bin/dracut@1440(main): exit 1 /usr/bin/dracut@2(main): ret=1 /usr/bin/dracut@3(main): [[ -n '' ]] /usr/bin/dracut@3(main): [[ -n /var/tmp/dracut.yBmtky ]] /usr/bin/dracut@3(main): rm -rf -- /var/tmp/dracut.yBmtky /usr/bin/dracut@4(main): exit 1 So clearly, in /usr/lib/dracut/modules.d/90kernel-network-modules/module-setup.sh, running_in_qemu() returns 255 because systemd-detect-virt --vm returns 0. So far it looks correct. running_in_qemu() is called in the last line of installkernel(): # called by dracut installkernel() { [...] running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci } The debug log shows clearly that the 255 code is handed back to module_installkernel() in /usr/lib/dracut/dracut-init.sh as return value of installkernel(). I believe that this is not intentional! Probably, the last line of installkernel() was merely meant as a condition for the modules "virtio_net e1000 8139cp pcnet32 e100 ne2k_pci", but not for returning a fault code, just because we are not running in qemu. This seems to be an openSUSE bug, since https://www.kernel.org/pub/linux/utils/boot/dracut/ upstream version 044 does not contain running_in_qemu() at all. https://www.kernel.org/pub/linux/utils/boot/dracut/dracut-044.tar.gz -> modules.d/90kernel-network-modules/module-setup.sh There is no 'running_in_qemu()' defined upstream, and the faulty line "running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci" is missing. With my very limited Bash knowledge, I could imagine that 'running_in_qemu && some-command' should rather be expressed with an 'if'. (Should the severity be 'Major'? Can anyone still build initrds if they are not running in a virtual environment?) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=966984
http://bugzilla.opensuse.org/show_bug.cgi?id=966984#c1
--- Comment #1 from Klaus Bitto
http://bugzilla.opensuse.org/show_bug.cgi?id=966984
http://bugzilla.opensuse.org/show_bug.cgi?id=966984#c2
Leonie Philine Bitto
vm=$(systemd-detect-virt --vm 2>&1)
86c86,88 < running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci ---
if running_in_qemu; then hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci fi
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=966984
http://bugzilla.opensuse.org/show_bug.cgi?id=966984#c3
Leonie Philine Bitto
participants (1)
-
bugzilla_noreply@novell.com