Welcome to Geek Times!
spacer
Mac OS X: Creating 'sparse' encrypted disk images with hdiutil
Find on this site:


home
search
archive
about

.
Making a sparse encrypted disk image with hdutil
Tue 6 May 2003

For personal and business reasons, securing your data is important, especially if you're a PowerBook user and your computer leaves the (somewhat) secure confines of your home. A UNIX tool, hdiutil, will create encrypted disk images for you. We'll also explore making a 'sparse' disk image variant, which takes up only as much room as is necessary to store the data (as opposed to a regular disk image, which takes up the amount of space specified as the maximum capacity of the image).

These UNIX commands have been taken directly from a Terminal window - these are the commands I use - rather than having been composed after the fact. This is *exactly* what worked for me. I've taken pains to choose forms of the commands which should make sense to you even if you're new to UNIX.

The following command builds an empty sparse encrypted disk image, after prompting you for a passphrase. Remember to uncheck the Add to Keychain option, or you'll be defeating the whole point of securing your data.

The example specifies a maximum capacity of five gigabytes (5g) and a volume name of ImageName. Feel free to change these as you feel is appropriate.

% hdiutil create SecureSparse -size 5g -encryption -type SPARSE -fs HFS+ -volname ImageName

This page is copyrighted 1993-2006 by Michael 'Mickey' Sattler, some rights reserved via the Creative Commons License. Questions and comments? Send email to the Geek Times Webmaster. (Domain and web content hosting at 1and1.)
email