Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'REALLY convert .dmg files to .iso images' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
REALLY convert .dmg files to .iso images
Authored by: crypto7 on Aug 24, '07 08:57:48PM

I think there is some confusion between naming something ".iso" (which, if a .cdr image, is then burnable in Windows) and the actual ISO-9660 *filesystem*, with or without the Joliet extensions, which is an actual burnable, mountable and useable VOLUME in Windows. If you do this:

hdiutil convert /path/to/filename.dmg -format UDTO -o /path/to/savefile.iso

or more properly this:

hdiutil convert -format UDTO -o /path/to/outfile /path/to/source.dmg

You end up with the same thing: A .cdr disc image. Leave the ".iso" off to see. So why not just make a .cdr ("CD/DVD Master") from Disk Utility in the first place (or select a .dmg and pick Convert in Disk Utility) and rename the .cdr to .iso? It's the exact same thing. But the resulting burned CD has only 1 filesystem - HFS+ (Mac OS Extended) that is not very useful in other OSes.

But for Windows compatibility (a CD or volume you can actually mount) you want the ISO-9660 *filesystem*, with or without the "Joliet extensions" to the ISO specification. Or maybe you want UDF for DVDs. But what if you could have HFS+, ISO-9660, Joliet, *and* UDF all on the same image - and have it be smaller than the file created by the above Terminal commands? Well, you easily can - here's the quick and dirty how-to:

1. Drag the .dmg file (the CD, DVD or volume of which you want to use in Windows or Linux) to your Desktop.

2. Then go to the Terminal and type:

hdiutil makehybrid -o ~/Desktop/ ~/Desktop/

3) Press Enter.

That's it! The "example.dmg" which you dragged to your Desktop is , and is just any name for the resulting image file. You can rename later, so don't dork it up - leave out spaces, symbols, etc. DO NOT add .iso, .dmg, .cdr, etc. to the end of . The correct filename extension will be added only if it isn't part of the provided name. Also, the path is case-sensitive. The currently logged-in user likely does NOT have a ~/desktop, but DOES have a ~/Desktop directory.

But wait - it gets better! can be the name of a FOLDER! It does not have to be a .dmg image file. Just get the path correct (does not have to be ~/Desktop if you want to make an image from a folder elsewhere, or a disc image elsewhere) and "viola" - you get a perfect hybrid disc image file useable in virtually *every* modern OS. And can even be a hard-drive! Heck, for all I know can be a very large database file by itself... try it. I'd be interested to know.

To see the 411 on this, type "man hdiutil" in the Terminal. Hit Space or Return until you get down to the VERBS section. Look at "convert", then look at "makehybrid". The "convert" verb is basically all the Disk Utility functionality, but in the Terminal. Boo. But look at the "makehybrid" verb; after the 4 filesystems (-hfs, -iso, -joliet, -udf) under "makehybrid" is this:

"By default, if no filesystem is specified, the image will be created with all four filesystems as a hybrid image. The data area of the image is shared between all filesystems, and only directory information and volume meta-data are unique to each filesystem. This means that creating a cross-platform ISO9660/HFS+ hybrid has a minimal overhead when compared to a single filesystem image." Hizzaa!

DMG Converter (http://sunsky3s.s41.xrea.com/dmgconverter/index.html) can create ISO filesystems, but it cannot CONVERT images to ISO filesystems, only make new images using it. So if you mount the image first and then use DMG Converter on the mounted volume, "converting" the disc image is the same as "making" a new image from the mounted volume. But God help me I'm not that bright, so the menu options are sort of confusing to me... This is 1 instance where using the Terminal is actually easier!

I tried this "hdiutil makehybrid" command on a 458 MB .dmg file and got a hybrid .iso that was 530 MB in size. Using "hdiutil convert" gave me a 592 MB ".iso" file that was actually a .cdr - and only had the single HFS+ filesystem - so it did not work in Windows. I'm much happier w/ the true ISO that is 60 MB smaller and has 4 filesystems! There is no compressed image format for Windows, so if you want a smaller file just zip or stuff your final hybrid image.



[ Reply to This | # ]
REALLY convert .dmg files to .iso images
Authored by: crypto7 on Aug 24, '07 09:08:55PM

Figures it would get stripped out, even in plain text. Nice. Here it is in a form that works w/ the damn "geeklog" system (as opposed to having an "Edit" button...):

1. Drag the .dmg file (the CD, DVD or volume of which you want to use in Windows or Linux) to your Desktop.

2. Then go to the Terminal and type:

hdiutil makehybrid -o ~/Desktop/[outfile] ~/Desktop/[source]

3) Press Enter.

[outfile] is the resulting image. Leave off .dmg, .iso, .cdr, etc. from [outfile]. Include ".dmg" for [source] if it is a disc image. [source] can also be a folder.



[ Reply to This | # ]
Almost there /// REALLY convert .dmg files to .iso images
Authored by: euroskip on Dec 16, '09 12:42:28PM

Crypto, let me say that you are the first person, in hours of research, that really understands this. I'll save you the sob story of what I've been through and just get to the point:

SITUATION:
trying to get a program (Rosetta Stone) installed onto a netbook PC without a CD/DVD drive. i have a mac with a drive. yes, the CD is for both mac/PC

TRIED:
i've tried sharing the disc drive over the network and no luck. i get the workgroup to work and share files/printers, but the drive doesn't seem to want to work. this is why i hate PCs.

WHERE I AM NOW:
i've done your method*, which was successful in getting me the proper filestructure needed. i also got to this point using Toast, but yours was much easier.
on the PC, I am using Alcohol 120% to read the disk image and mount to a virtual drive. i can now mount/read the disk images (proper .iso), but...

THE PROBLEM:
even though i can read the disk properly, i can't run the install/setup files. i can't even see the proper (.exe) files, nor does "autoplay" work to get the disk to run the install utility. is it that since it's burning on the mac it's not burning those files? that doesn't really make sense since the disk image should be an exact copy.


any ideas on how to get the disk (image) to run properly on the PC? any help is much appreciated.

-A

* I think you can also do it with Deeper, which opens up terminal commands in user-friendly manner, and Disk Utility. when you enable "add other formats of disk images" you get a list of: Disk Copy 4.2, NDIF (various kinds), compressed (ADC + bzip2), entire device, iPod image, UDIF stub, sparse, sparsebundle, and the usuals.




[ Reply to This | # ]
Almost there /// REALLY convert .dmg files to .iso images
Authored by: euroskip on Dec 18, '09 10:24:46AM

** update **

OK, so I've got the shared DVD drive to work, but the problem persists. I can only see Mac type files and not the proper PC ones to run the program on the netbook.

Any ideas out there?



[ Reply to This | # ]