diff --git a/0208-no_forced_virtnet.patch b/0208-no_forced_virtnet.patch new file mode 100644 index 0000000..68014e6 --- /dev/null +++ b/0208-no_forced_virtnet.patch @@ -0,0 +1,62 @@ +From: Fabian Vogt +Subject: Don't include qemu network modules without reason + +virtio-net without other network tools does not make sense +and causes various bugs, like bsc#960669. + +--- + modules.d/90kernel-network-modules/module-setup.sh | 24 ++++++++++++++++++++- + modules.d/90qemu-net/module-setup.sh | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) + +Index: dracut-044/modules.d/90kernel-network-modules/module-setup.sh +=================================================================== +--- dracut-044.orig/modules.d/90kernel-network-modules/module-setup.sh ++++ dracut-044/modules.d/90kernel-network-modules/module-setup.sh +@@ -10,6 +10,25 @@ depends() { + return 0 + } + ++running_in_qemu() { ++ if type -P systemd-detect-virt >/dev/null 2>&1; then ++ vm=$(systemd-detect-virt --vm >/dev/null 2>&1) ++ (($? != 0)) && return 255 ++ [[ $vm = "qemu" ]] && return 0 ++ [[ $vm = "kvm" ]] && return 0 ++ [[ $vm = "bochs" ]] && return 0 ++ fi ++ ++ for i in /sys/class/dmi/id/*_vendor; do ++ [[ -f $i ]] || continue ++ read vendor < $i ++ [[ "$vendor" == "QEMU" ]] && return 0 ++ [[ "$vendor" == "Bochs" ]] && return 0 ++ done ++ ++ return 255 ++} ++ + # called by dracut + installkernel() { + # Include wired net drivers, excluding wireless +@@ -63,6 +82,8 @@ installkernel() { + =drivers/net/ethernet \ + ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet + hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs ++ ++ running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci + } + + # called by dracut +Index: dracut-044/modules.d/90qemu-net/module-setup.sh +=================================================================== +--- dracut-044.orig/modules.d/90qemu-net/module-setup.sh ++++ dracut-044/modules.d/90qemu-net/module-setup.sh +@@ -2,6 +2,7 @@ + + # called by dracut + check() { ++ return 255 + if type -P systemd-detect-virt >/dev/null 2>&1; then + vm=$(systemd-detect-virt --vm >/dev/null 2>&1) + (($? != 0)) && return 255 diff --git a/dracut.changes b/dracut.changes index d86ac73..a101bb3 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 26 11:08:04 UTC 2016 - fvogt@suse.com + +- Add 0208-no_forced_virtnet.patch: + Don't include qemu-net modules without reason. + Fix for bsc#960669 + ------------------------------------------------------------------- Fri Jan 22 13:18:33 UTC 2016 - fvogt@suse.com diff --git a/dracut.spec b/dracut.spec index 22bbbcc..f4ed4ea 100644 --- a/dracut.spec +++ b/dracut.spec @@ -114,6 +114,7 @@ Patch204: 0204-mkinitrd-fix-monster.patch Patch205: 0205-mdraid_ignore_hostonly.patch Patch206: 0206-nfs_dns_alias.patch Patch207: 0207-handle_module_aliases.patch +Patch208: 0208-no_forced_virtnet.patch ## SUSE-specific fixes Patch300: 0300-dracut_dont_use_dpkg_defaults_on_SUSE.patch @@ -262,6 +263,7 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh %patch205 -p1 %patch206 -p1 %patch207 -p1 +%patch208 -p1 %patch300 -p1 %patch301 -p1