I just created an USB drive and would like to check if it's correctly bootable without rebooting my actual computer. How should I do?
Asked
Active
Viewed 2.7k times
2 Answers
7
Under Linux, you have to know which device path got the drive with for example with dmesg | tail
after insertion, let's assume it's /dev/sdb
.
Qemu
sudo qemu -hda /dev/sdb
or sudo qemu-system-x86_64 -hda /dev/sdb
for 64 bits.
VirtualBox
VBoxManage internalcommands createrawvmdk -filename ~/usb.vmdk -rawdisk /dev/sdb
sudo chmod 666 /dev/sdb*
then add ~/usb.vmdk as a disk in a VM and boot on it
Don't hesitate to add other ways to do.

lolesque
- 10,693
- 5
- 42
- 42
-
Note: qemu can wrongly finish on "fatal authentication error", then "init: respawning too fast: disabled for 5 minutes." but it doesn't happen on real machines. – lolesque Jan 30 '13 at 15:39
-
You can also use the windows version of QEmu, if you only have windows. – Jeremy Salwen Feb 20 '14 at 09:09
-
Not sure why but the 'qemu' command doesn't work for me, I need: qemu-system-x86_64 or qemu-system-i386 depending on whether you want to boot a 64-bit or 32-bit VM (hint: you want 64-bit) – Paul Jun 30 '19 at 17:08
7
While it won't show if the stuff on the filesystem is capable of handling the whole boot thing you can check the boot flag with fdisk -l <drive>
from a shell on a reasonably good *nix. (Which essentially tells the bios if it should try to boot the thingie or not.)

Wolfer
- 891
- 2
- 12
- 21