I am trying to run an app called 'chdman' which can make a CHD file from a HD. First, here is the output of the app:
./chdman
chdman - MAME Compressed Hunks of Data (CHD) manager 0.95u6 (Apr 29 2005)
usage: chdman -info input.chd
or: chdman -createhd inputhd.raw output.chd [inputoffs [cylinders heads sectors [sectorsize [hunksize]]]]
or: chdman -createblankhd output.chd cylinders heads sectors [sectorsize [hunksize]]
or: chdman -createcd input.toc output.chd
or: chdman -copydata input.chd output.chd
or: chdman -extract input.chd output.raw
or: chdman -extractcd input.chd output.toc output.bin
or: chdman -verify input.chd
or: chdman -verifyfix input.chd
or: chdman -update input.chd output.chd
or: chdman -chomp inout.chd output.chd maxhunk
or: chdman -merge parent.chd diff.chd output.chd
or: chdman -diff parent.chd compare.chd diff.chd
or: chdman -setchs inout.chd cylinders heads sectors


Here is my output from diskutil list:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *250.1 GB disk0
1: DOS_FAT_32 UNTITLED 1 250.1 GB disk0s1
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *750.2 GB disk1
1: EFI 209.7 MB disk1s1
2: Apple_HFS Mac OS 749.8 GB disk1s2
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *500.1 GB disk2
1: Apple_HFS External HD 500.1 GB disk2s1



Now, say I want to create a CHD of disk0 from diskutil, I would think I would run:
./chdman -createhd /dev/disk0 gt.chd

but I get this output:
chdman - MAME Compressed Hunks of Data (CHD) manager 0.95u6 (Apr 29 2005)
Invalid file '/dev/disk0'


And, to extract an already created CHD file, I would think I would run:
./chdman -extract gt2005.chd /dev/disk0

but I get this output:
chdman - MAME Compressed Hunks of Data (CHD) manager 0.95u6 (Apr 29 2005)
Input file: gt2005.chd
Output file: /dev/disk0
Error opening output file '/dev/disk0'


I need help here. Thanks in advance... I have attached chdman so you can have it to see what I am doing wrong here...