This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 514023 - dracut: support booting from KVM virtio devices
dracut: support booting from KVM virtio devices
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
rawhide
All Linux
high Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F12VirtBlocker
  Show dependency treegraph
 
Reported: 2009-07-27 13:01 EDT by Mark McLoughlin
Modified: 2009-07-31 06:47 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-31 06:47:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
dracut-pull-in-virtio-pci.patch (1000 bytes, patch)
2009-07-29 03:24 EDT, Mark McLoughlin
no flags Details | Diff

  None (edit)
Description Mark McLoughlin 2009-07-27 13:01:19 EDT
With dracut-0.7-2.fc12

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

See also:

  http://www.mail-archive.com/kvm@vger.kernel.org/msg08005.html

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
Comment 1 Harald Hoyer 2009-07-28 04:49:41 EDT
> Such a hack is attached, although the way it's done it would only work for block drivers

Missing the attachment :)
Comment 2 Mark McLoughlin 2009-07-29 03:24:34 EDT
Created attachment 355501 [details]
dracut-pull-in-virtio-pci.patch
Comment 4 Mark McLoughlin 2009-07-30 11:38:47 EDT
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
Comment 5 Harald Hoyer 2009-07-31 06:47:21 EDT
pushed to upstream git

Note You need to log in before you can comment on or make changes to this bug.