VirtualBox, RAW-disks and boot0

Eugene Grosbein eugen at kuzbass.ru
Mon Mar 29 11:25:23 UTC 2010


Hi!

I've built FreeBSD 8.0-STABLE "LiveUSB" image using nanobsd script,
it works with real hardware. I'd like to test it with VirtualBox
to avoid rebooting too often. So, I've installed
virtualbox-ose 3.1.4 from ports and tested it:

- it boots Windows XP guest installed to VDI-disk just fine;
- it boots FreeBSD "LiveCD" I've built as ISO image fine too;
- virtual machine hangs just after reading first 512 bytes
from RAW-dist made this way (/dev/da0 is USB flash drive):

# VBoxManage internalcommands createrawvmdk \

   -filename $HOME/.VirtualBox/HardDisks/usbdisk.vmdk \

   -rawdisk /dev/da0 -register

I've copied first 512 bytes from VDI image containing WinXP
to file 'mbr' and installed it to USB flash drive
using 'fdisk -B -b mbr da0' command and now VirtualBox
boots and runs this "LiveUSB" with FreeBSD from real USB flash
just fine too.

nanobsd uses BootEasy as boot0 loader and I use
this configuration to build it:

NANO_BOOTLOADER="boot/boot0"
NANO_BOOT0CFG="-o packet -s 1 -m 3 -t 36"

So there is something wrong in BootEasy+VirtualBox+"RAW-disk" triple.
How do I debug this?

Eugene Grosbein


More information about the freebsd-stable mailing list