Ticket #6586 (new defect)
Opened 4 years ago
linux loopback mounted disk image != actual hard disk image (linux loop devices)
|Reported by:||6502cpu||Owned by:|
|Version:||VirtualBox 3.1.6||Keywords:||linux loop partition|
I use loopback devices to create disk image files for development (/dev/loop0 for example). If I create a _filesystem_ only on my loop device, virtualbox can boot from it. For example:
dd if=/dev/zero of=diskimage bs=1M count=128 losetup /dev/loop0 mkfs.msdos /dev/loop0 syslinux -s /dev/loop0
(assuming you have a virtualbox disk image file describing loop0).
If I instead however, create a _partiton_, with a filesystem on the partition, I cannot boot for some reason. For example, I would use this process to create a compact flash which I could then boot from either in a real device or with QEMU:
dd if=/dev/zero of=/dev/sdc bs=1M count=128 fdisk /dev/sdc (create a single partition, sdc1, msdos fat16) mkfs.msdos /dev/sdc1 syslinux -s /dev/sdc1
if I use: dd if=/dev/sdc bs=1M of=myimage and then losetup /dev/loop0 myimage
and boot virtualbox with that loopdevice .vdi, it doesn't boot. BUT, qemu has no trouble:
qemu -hda myimage /dev/zero
This small size disk does have 32/sectors per track and not 63 that most others have. Otherwise I can't see how it would be choking since virtualbox otherwise should be insensitive to the 'type' of device (/dev/sd instead of /dev/loop).