« prinz vs. kelvin | Main | ricardo auktionen »

resize disk images

Install Mac OS X icon© 2007 Apple Inc.

This post is an add-on to the post about shrinking an OS X DVD from september due to a question I received.

The Problem with the disk image file is the following: it stores the data in a precise logical block. When burning the DMG file, the logical block will become the physical block. If any data resides in the last block of the disk, the hdiutil command is not able to relocate this data onto another, empty block of the disk. Or rather than not being able it is not supposed to relocate any data since the DMG format is supposed to give an exact copy of the original disk.

So what can You do if You still want to resize an OS X DVD disk image? The only way I achieved to resize the file is to delete all the files in /System/Installation/Packages, resize the file, and put the packages back on. It is not absolutely sure this works since it depends on the low level layout of the original disk, but for mine it worked.

If You are interested in further information about file systems, You may want to visit the following pages:
wikipedia.org/HFS_Plus
wikipedia.org/Inode

Post a comment