Mounting VMDK images on OS X

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.

  1. 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 QEMUqemu-img convert - f vmdk win98.vmdk win98.raw
  2. 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
  3. 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
  4. 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
  5. 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

Legg igjen en kommentar

Fyll inn i feltene under, eller klikk på et ikon for å logge inn:

WordPress.com-logo

Du kommenterer med bruk av din WordPress.com konto. Logg ut / Endre )

Twitter picture

Du kommenterer med bruk av din Twitter konto. Logg ut / Endre )

Facebookbilde

Du kommenterer med bruk av din Facebook konto. Logg ut / Endre )

Google+ photo

Du kommenterer med bruk av din Google+ konto. Logg ut / Endre )

Kobler til %s

%d bloggers like this: