Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedora 25 image is not bootable (virtio hard disk drivers missing) #56

Closed
martinpitt opened this issue Jan 4, 2017 · 6 comments
Closed
Labels

Comments

@martinpitt
Copy link

I'm using mkosi as packaged in Fedora 25 (version 1.fc25):

sudo mkosi -d fedora -r 25 -b -t raw_gpt --password root  -o /srv/nspawn/f25.img

Booting this in QEMU (with -bios /usr/share/edk2/ovmf/OVMF_CODE.fd times out waiting for dev-gpt\x2dauto\x2droot.device

Screenshot

/dev/disk/ only has a symlink for sr0 (the CD drive), there are no /sys/block/* devices other than sr0. It seems the generated initramfs is lacking the drivers for the QEMU virtio hard disks?

@martinpitt martinpitt changed the title Fedora 25 image is not bootable (hard disk missing) Fedora 25 image is not bootable (virtio hard disk drivers missing) Jan 4, 2017
@martinpitt
Copy link
Author

Indeed booting the image without a virtio hard disk works fine.

@martinpitt
Copy link
Author

In an anaconda VM install of F25 I see virtio_{blk,net,scsi} in lsinitrd, while in mkosi's image these are missing. I tried to work around this with

$ cat /etc/dracut.conf.d/virtio.conf 
add_drivers+="virtio_blk virtio_scsi virtio_net"

This is because dracut normally auto-detects required drivers, but this doesn't work when being called in that chroot construction mode of mkosi.

Even with this the image still doesn't boot with virtio, it seems EFI does not even get to the point of starting sd-boot (a bit hard to tell as sd-boot is really quiet).

@fsateler
Copy link
Member

fsateler commented Jan 5, 2017

in the debian path we enable the "fat" dracut that installs all modules (although for a different reason)
https://github.com/systemd/mkosi/blob/master/mkosi#L780

@poettering
Copy link
Member

hmm, so we use "no-hostonly" mode in dracut which would mean the included kernel modules cover all kinds of hw, not just the one used locally on the host. I am pretty sure this should also include virtio stuff, and if it does not I'd assume that's a bug in dracut. @haraldh any idea?

@poettering
Copy link
Member

filed a bug about that now in dracut github:

dracutdevs/dracut#205

vbatts pushed a commit to vbatts/systemd-mkosi that referenced this issue Aug 24, 2017
casync: use sha512/256 as hash function by default
poettering added a commit to poettering/mkosi that referenced this issue Oct 25, 2017
Dracut really should imply that the "qemu" module is used when
"nohostonly" mode is selected (which we select), but it currently does
not, so deal with that.

Fixes: systemd#56
@poettering
Copy link
Member

A work-around fix is now waiting in #180. But I think this should be fixed in dracut anyway.

poettering added a commit to poettering/mkosi that referenced this issue Oct 25, 2017
Dracut really should imply that the "qemu" module is used when
"nohostonly" mode is selected (which we select), but it currently does
not, so deal with that.

Fixes: systemd#56
poettering added a commit to poettering/mkosi that referenced this issue Nov 16, 2017
Dracut really should imply that the "qemu" module is used when
"nohostonly" mode is selected (which we select), but it currently does
not, so deal with that.

Fixes: systemd#56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants