Red Hat Bugzilla – Bug 514023
dracut: support booting from KVM virtio devices
Last modified: 2009-07-31 06:47:21 EDT
On a KVM guest using a virtio drive for its root filesystem:
$> dracut --force /boot/dracut-$(uname -r).img $(uname -r)
W: Possible missing firmware tehuti/firmware.bin for module tehuti.ko'
W: Possible missing firmware ql8100_fw.bin for module qla2xxx.ko
W: Possible missing firmware aic94xx-seq.fw for module aic94xx.ko
On reboot with that initrd, you get:
"No root device found"
The reason is clear - there is no virtio-pci driver included in the initrd.
See bug #444155 for the hack we needed to add to mkinitrd
Background here is that we pull in the virtio_blk.ko in 90kernel-modules/installkernel because it uses blk_init_queue, and we pull in virtio.ko because virtio_blk.ko requires it
However, we still may potentially need a module for the actual virtio bus implementation - for e.g. lguest and kvm=s390, this implementation is built into the kernel, but for KVM it's the virtio-pci module. Nothing requires virtio-pci, so there's nothing to pull it in automatically
Only solution that I see is including all virtio bus implementations (i.e. modules that call register_virtio_device) if any virtio driver is to be included (i.e. modules that call register_virtio_driver). Such a hack is attached, although the way it's done it would only work for block drivers
> Such a hack is attached, although the way it's done it would only work for block drivers
Missing the attachment :)
Created attachment 355501 [details]
would that work for you as well?
Yep, that'll work ... except:
1) You only need register_virtio_device ... register_virtio_driver will
cause it to pull in e.g. virtio-net and virtio-console
2) You also need eth_type_trans|register_virtio_device in
40network/installkernel or virtio NICs won't work under KVM
pushed to upstream git