Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Problem: I have a USB key with Mountain Lion on it and I want to install it on my macbook pro. I deleted the existing partition on the laptop and wanted to created a new one were to install the OS but cant because everything in the partition tab for the drive is grayed out.

Basically, I can't do anything until I unlock the partition So the question is: how to unlock a partition from disk utility or the command line.

share|improve this question

migrated from Jul 16 '12 at 14:26

This question came from our site for professional and enthusiast programmers.

up vote 30 down vote accepted

I looked first hand into this problem and the following commands unlocked and formatted the disk, although Disk Utility could not.

$ diskutil list

Should show something like this:

   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            120.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *64.0 GB    disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:          Apple_CoreStorage                         63.2 GB    disk1s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3

Then format the disk in question. In this case, disk1.

$ diskutil eraseDisk JHFS+ name disk1

You should see this:

Started erase on disk1
Unmounting disk
Creating the partition map
Waiting for the disks to reappear
Formatting disk1s2 as Mac OS Extended (Journaled) with name name
Initialized /dev/rdisk1s2 as a 59 GB HFS Plus volume with a 8192k journal
Mounting disk
Finished erase on disk1

The following web pages helped me figure this out and might be of use to somebody else.

share|improve this answer
Thank you. After kicking my head upside the wall, you just worked it out for me. Thanks again. – Stephen Cox Jul 25 '12 at 21:42
This saved me, I had a FileVault enabled MacBook Air that after trying to erase got locked when trying to do a Mountain Lion clean install – agilityvision Jul 29 '12 at 1:17
brilliant!!! I had a corrupt file vault partition and there was nothing I could do. This worked and took seconds. – Richard Sep 23 '12 at 23:43

You must log in to answer this question.

protected by Community Dec 24 '12 at 16:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .