Thanks Thomas and Pascal for your replies! In the end, it turned out that transferring boot image to my old pendrive multiple times exceeded its durability. With the new one, I was able to boot without any problem with two my warrants as well as yours :).
Thanks Marcin On 2021-11-08 17:23, Thomas Huth wrote: > On 07/11/2021 16.30, Marcin Zajączkowski wrote: >> Hi. Having some (dracut-related) issues with a Fedora LiveCD installed >> on a pendrive, I wanted to play with it using qemu instead of a real >> computer. Unfortunately, while the pendrive boot fine in real, with >> qemu, I ended up with "Booting from Hard Drive..." displayed and 2 >> vCores working on 100% for several minutes (until I interrupted it). >> Most likely, it is a problem with the way I try to achieve that: >> >>> sudo qemu-system-x86_64 -enable-kvm -m 4196 -drive >>> file=/dev/sdb,format=raw,index=0,media=disk -boot menu=on >> >> or more "dangerous" variant: >>> sudo qemu-system-x86_64 -enable-kvm -m 4196 -hda /dev/sdb -boot menu=on > > IIRC that will attach the disk as an IDE drive to your guest. And I > guess the initrd of your guest does not contain the right kernel modules > for this interface. > >> What could be wrong with that approach? What is the best way to boot a >> VM using a bootable disk connected as a USB device (here recognized as >> /dev/sdb)? > > Not sure, but you could try to attach it as (emulated) USB device to > your guest, too, by using something like: > > -drive if=none,id=d1,file=... -device usb-storage,drive=d1 > > HTH, > Thomas >