From Wiki
Jump to: navigation, search

Battling With CoreStorage

Installing OSX Mountain Lion when FileVault is active

Firstly, a disclaimer. I have no way of retrieving and lost FileVault password. It's not my place to guide you through cracking those passwords here.

When I installed my Macintosh I was a complete idiot and enabled FileVault, then got bored of my installation and decided to reinstall mountain lion afresh. (I realise that both statements are idiotic.)

When I went to reinstall my copy of Mountain Lion afresh i.e. without upgrading my initial OS, I ran into all sorts of trouble because FileVault was active. I hadn't realised that FileVaults was just a logical volume and uses LVM to manage and keep track of partitions. This means that FileVault also encrypts the partition table of the disk meaning you have to do some jiggery-pokery to get it working.

You cannot install Mountain Lion on a volume that's encrypted with FileVault without first decrypting the disk. I did not have the requisite 5 hours to decrypt a disk I was going to erase, so I headed to the bowels of Disk Utility. The GUI doesn't let you erase, partition or do anything to the FileVaulted disk. It also doesn't give you an error.

Fortunately for me, in recovery mode (cmd+r when booting your mac) there is a Terminal. From there I managed to do the following to delete my FileVault volume.

diskutil coreStorage list (To list all FileVaults)

diskutil coreStorage unlockVolume UUID 

diskutil coreStorage deleteVolume LVFAMILY-UUID

From there, I popped back into Disk Utility and was able to erase and repartition the disk without any problems.

Hopefully this will jog my memory when I do this again and I won't have to wait five hours for a disk to be decrypted!

These instructions hinted that LVM was present here. Sure enough: This Man knows it too!