Guides:MAME - chdman notes

From Wah!ki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Notes for Compressed Hunks of Data Manager

Example reading an MSDOS hdd

Convert a HD Image

Convert a chd to a hd image/raw

$ ./chdman -extracthd --input <chd> --out <file.hdd>

Inspect the partition table for the disk

# fdisk <file.hdd>

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk file.hdd: 100 MiB, 104857600 bytes, 204800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start     End Sectors  Size Id Type
file.hdd1  *       63 1032191 1032129  504M  6 FAT16

Command (m for help): 


Mount the raw image as a loopback device

# losetup -fP <file.hdd>

-f find first unused loopback device
-P partition scan

See the device created (may auto mount)

# losetup -a | grep <file.hdd>

Providing your OS can mount the fstype

# mount <device> <location>

Convert a VMDK to CHD

Using qemu to convert a pre-existing vmdk to chd

$ qemu-img convert -f vmdk -O raw disk.vmdk disk.raw
$ chdman createhd -i disk.raw -o disk.chd

run an info to pull the chs for the hdd bios config