I can't seem to get QEMU to boot a hard drive with Ubuntu 16.04.1 that's inside an external USB case. I can mount the drive fine in my host OS as partitions, read files, all good.

I know the drive boots as if I put the drive directly into my PC plugging it into SATA it boots fine. But when I try to get QEMU to boot it from USB it errors out. It makes it to Grub fine, but that's when it dies after that.

This is my QEMU command:

sudo kvm -hdb /dev/sdh

This command brings me to Grub:


Then when I continue with Ubuntu or even Recovery Mode Ubu it gives me this:

kernal panix

It won't get past that. I've also tried this QEMU command, which also fails:

sudo qemu-system-x86_64 -usb -usbdevice disk:/dev/sdh

This commands does the following:



Seems I was missing the memory option in QEMU commandline. If not specified QEMU defaults to 128MB of ram, not enough to boot the kernel.

Solution is to give QEMU enough ram using the -m parameter. My final command that works is:

sudo kvm -m 2G -hdb /dev/sdh

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.