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


Click here to return to the 'When a 'corrupt' disk image file really isn't corrupt' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
When a 'corrupt' disk image file really isn't corrupt
Authored by: mantrid on Dec 12, '06 09:51:57AM
I just checked on a computer running Panther, and it has 'bunzip2' installed as a part of the BSD.pkg - I think the BSD subsystem was included in the standard install and would normally have been installed unless explicitly excluded. So if attempting to open a disk image in 10.3 gives a corrupt image error, use
file filename.dmg
and if the output indicates "bzip2 compressed data", then try something like
bunzip2 -k filename.dmg -c > bunzip2edfilename.dmg
to see if it can be converted to something that can be opened normally. I get some "trailing garbage" error during the process, but the output file seems to work ok.

[ Reply to This | # ]
Doesn't work
Authored by: boredzo on Dec 12, '06 01:57:09PM
hdiutil create -format UDBZ -srcdir Interfaces\ for\ Programmers -volname Interfaces\ for\ Programmers Interfaces\ for\ Programmers.dmg
..........
created: /Volumes/RAM Disk/Interfaces for Programmers.dmg
___
bunzip2 < Interfaces\ for\ Programmers.dmg > Interfaces\ for\ Programmers-bunzippped.dmg
bunzip2: (stdin) is not a bzip2 file.


[ Reply to This | # ]
Doesn't (always) work
Authored by: mantrid on Dec 12, '06 03:41:29PM

Some preliminary observations:
Disk images created directly using hdiutil create -format UDBZ don't bunzip properly.
Those converted to UDBZ (originally created using "Disk Utility" or hdiutil without specifying a format) seem to work after bunzip2, but only using Panther's bunzip2 - Tiger's bunzip2 doesn't unzip them properly.

Anyone have any ideas to account for the differences in the UDBZ images created by the two methods, and the different behaviours of bunzip2 under 10.3 and 10.4?



[ Reply to This | # ]