Just some quicknotes on how you can extract files from a vmdk image when on OS X. The tips should also be applicable for other operating systems.
- Convert the VMDK to a raw disk image. You can do this either using the command line tools included with Virtualbox, or you can try using the tools from qemu.
- Alternative 1:
VBoxManage clonemedium disk win98.vmdk win98.raw --format RAW
- Alternative 2, using QEMU:
qemu-img convert - f vmdk win98.vmdk win98.raw
- Alternative 1:
- Get the partition offset, of the partition you want to mount in the disk image.
fdisk -d win98.raw
63,16777089,0x0C,*,0,1,1,1023,63,63
0,0,0x00,-,0,0,0,0,0,0
0,0,0x00,-,0,0,0,0,0,0
0,0,0x00,-,0,0,0,0,0,0 - Using the offset (63), mount the image as a raw block device
hdid -section 63 -nomount -imagekey diskimage-class=CRawDiskImage win98.raw
This told me that a block device was created as /dev/disk2 - Mount the new block device as a file system
Since I wanted to mount a Windows 98 (DOS-based) image, this meant it was a FAT32 partition.
mkdir /Volumes/win98
mount_msdos /dev/disk2 /Volumes/win98 - Browse the files 🙂
ls /Volumes/win98
AUTOEXEC.BAT COMMAND.COM DETLOG.TXT MSDOS.--- NETLOG.TXT Rain SUHDLOG.DAT VIDEOROM.BIN autoexec.sdd
BOOTLOG.PRV CONFIG.SYS FRUNLOG.TXT MSDOS.SYS Programfiler SCANDISK.LOG SYSTEM.1ST WIN98 io32.sys
BOOTLOG.TXT DETLOG.OLD IO.SYS Mine dokumenter RECYCLED SETUPLOG.TXT TOOLS WINDOWS