Feed on Posts or Comments 20 August 2008

apple & rants Ralf on 30 Oct 2007 12:33 am

Converting FileVault images for OS X 10.5.

Just upgraded to Leopard doing a clean reinstall. Before I copied my sparseimage FileVault container (/Users/$USER/$USER.sparseimage) to an external USB drive, after the reinstall I copied it back. Then I remembered that FileVault in OS X 10.5 uses a new format (as reported in FileVault doesn’t use Sparse-Images anymore) and thought better of it. The new format apparently splits the image into 8MB big chunks, called bands which should make deallocation of free space much easier.

After a look into the man page of hdiutil(1) I had located the name for the new SPARSEBUNDLE format and converted the container into the new format using the following command:

hdiutil convert /mnt/$USER.sparseimage -encryption CEncryptedEncoding -format UDSB -o /Users/$USER/$USER.sparsebundle

Note well: your data no longer is accessible with the system-wide FileVault recovery certificate/private key. If this feature is of importance to you (it is to me, in the opposite way: I’m glad that the recovery key now is invalid), look into the -recover and -certificate options of hdiutil(1).

Upon the next login I realized that my UID had changed, meaning I could no longer access the data contained in the FileVault. Argh! Turns out that there’s no more messing around with niutil(1) under Leopard. NetInfo is gone, replaced by Directory Services. The command line utility for Directory Services is surprisingly pleasant: As simple as 1,2,3, I changed my uid…

dscl -change . /Users/$USER UniqueID
 

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply

You must be logged in to post a comment.