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


Click here to return to the 'How to Make a Sparse Image' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to Make a Sparse Image
Authored by: noworryz on Feb 17, '03 08:56:35PM

Here's the executive summary in case the link over at TheMacMind goes away.

You can use the unix utility hdiutil to create and examine disk images, with more options than Disk Copy provides.

One such option is to create a disk image (possibly an encrypted disk image) that is sparse; i.e., the image file is only as large as it needs to be. (However, the image file never shrinks in size once it has expanded.)

For example, suppose you are keeping all your work, mail, etc. on an encrypted disk image. You occasionally eject the image volume and burn the image file to CD-R for backup. With a sparse image, the burning may be much faster because empty space in the volume will not be backed up.

To create an encrypted, sparse disk image, open a Terminal window and cd to the directory in which you want to create the image file. For example:

cd ~/Desktop

Then type the command:

hdiutil create -size thesize -encryption -type SPARSE -fs HFS+ thename

Above, thesize is the maximum size that the volume will ever be able to contain, for example, 660m for 660 megabytes or 1g for one gigabyte. Note that if you want the image file to remain below a certain size (such as the size of a CD) you must allow for approximately 10% overhead. Also above, thename is the name of the image file you want to create, not the volume name.

You will be asked for a password or phase to secure your file. At that time, you should probably uncheck "Remember password (add to Keychain)" because your passphrase will be visible in the Keychain to anyone with physical access to your computer.

The file thename.sparseimage is then created. Double click on the file to mount it (after entering the password again) then click on the mounted volume on the Desktop and hit return to change its name from "untitled."

You can also use the hdiutil program to find out information about any disk image, even those created by Disk Copy. From the Terminal type:

hdiutil imageinfo theimage.ext
where theimage.ext is the name of the image file, for example, myimage.dmg or myimage.sparseimage or whatever.

There is a manual page available; type man hdiutil in the Terminal.

[ Reply to This | # ]

How to Make a Sparse Image
Authored by: novalies on May 27, '04 09:47:21AM

>you should probably uncheck "Remember password (add to Keychain)" because your passphrase will be visible in the Keychain to anyone with physical access to your computer.

I have testet this and on my machine you can open the Keychain Util, see all the entrys, but to display the Passwords, you have to enter first the Keychain-password.



[ Reply to This | # ]
How to Make a Sparse Image
Authored by: jago_lebow on Nov 24, '05 11:02:26AM

Ok so I never get prompted for a password. The only way this works for me is to put the passphrase on the command line, not very secure especially when mounting.

Anyone know any other way to get this to work ?



[ Reply to This | # ]