I'd like to use Parallels for hobby OS development. I have a bootloader to go into the MBR of an HDD image. I've been using the following script to create the an image of the harddrive. I'm using dd to create the image from the DMG based on several posts on these forums as well as http://kb.parallels.com/en/5403 However, when I try to use the resulting .hdd, Parallels 6 complains that the image is corrupt and the HDD fails to attach when booting the vm. The dmg image looks good using diskutil, fdisk, etc...
Thoughts about what I'm missing?
Thanks!
-- begin mkhdd --
#!/bin/sh
HDDDMG=$1
DIRS=$2
MBR=$3
hdiutil create -megabytes 16 -volname "OZBOOT" -format UDRW -layout MBRSPUD -srcfolder $DIRS -ov -fs MS-DOS $HDDDMG
DEVICE=$(basename $(hdiutil attach $HDDDMG -nomount -noverify | head -1))
echo device is at $DEVICE
echo fdisk -u -f $3 -y /dev/$DEVICE
fdisk -u -f $3 -y /dev/$DEVICE
dd if=/dev/$DEVICE of=oz.hdd
hdiutil detach $DEVICE
Thoughts about what I'm missing?
Thanks!
-- begin mkhdd --
#!/bin/sh
HDDDMG=$1
DIRS=$2
MBR=$3
hdiutil create -megabytes 16 -volname "OZBOOT" -format UDRW -layout MBRSPUD -srcfolder $DIRS -ov -fs MS-DOS $HDDDMG
DEVICE=$(basename $(hdiutil attach $HDDDMG -nomount -noverify | head -1))
echo device is at $DEVICE
echo fdisk -u -f $3 -y /dev/$DEVICE
fdisk -u -f $3 -y /dev/$DEVICE
dd if=/dev/$DEVICE of=oz.hdd
hdiutil detach $DEVICE