Skip navigation

Erasing a drive with a locked partition

873 Views 14 Replies Latest reply: Nov 17, 2012 9:07 AM by Tom Wolsky RSS
Tom Wolsky Level 10 Level 10 (104,630 points)
Currently Being Moderated
Nov 16, 2012 12:04 PM

I have a drive with a locked partition. I can unlock it no problem, but I would now like to erase the whole drive and repartition with only one partition before I pass the computer on to someone else. Does anyone know how to reset the drive to a single unlocked partition. Thanks very much.

 

All the best,

 

Tom

  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Nov 16, 2012 12:09 PM (in response to Tom Wolsky)

    Tom,

     

    You need to unlock the drive depending upon what the nature of the lock is. That aside here's how you repartition and erase the drive:

     

    Drive Preparation

     

    1. Open Disk Utility in your Utilities folder.

     

    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.

     

    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.

     

    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.

     

    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.

     

    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.

     

    Steps 4-6 are optional but should be used on a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.

  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Nov 16, 2012 12:46 PM (in response to Tom Wolsky)

    Tom,

     

    What happens if you boot from an installer disc? How did you "lock" the drive? Do you know how to "unlock" it? Did you unlock it first? Is this your startup volume on the internal drive or is it an external drive?

     

    If this is a startup drive and you are running Lion or Mountain Lion, and if you want to erase the drive, repartition, and reinstall Lion or Mountain Lion

     

    Install or Reinstall Lion/Mountain Lion from Scratch

     

    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.

     

    Boot to the Recovery HD:

     

    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.

     

    Erase the hard drive:

     

      1. Select Disk Utility from the main menu and click on the Continue button.

     

      2. After DU loads select your startup volume (usually Macintosh HD) from the

          left side list. Click on the Erase tab in the DU main window.

     

      3. Set the format type to Mac OS Extended (Journaled.) Optionally, click on

            the Security button and set the Zero Data option to one-pass. Click on

          the Erase button and wait until the process has completed. Now select

          the second partition, click on the Delete [-] button. Grab the sizing handle

          in the lower right corner of the remaining volume and drag it to the bottom

          of the rectangle. Click on the Apply button.

     

      4. Quit DU and return to the main menu.

     

    Reinstall Lion: Select Reinstall Lion/Mountain Lion and click on the Install button.

     

    Note: You will need an active Internet connection. I suggest using Ethernet if possible

                because it is three times faster than wireless.

  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Nov 16, 2012 2:03 PM (in response to Tom Wolsky)

    Tom,

     

    But did you try in DU to just select the "Locked" partition at the bottom then use the Delete [-] button to remove it?

     

    You can use the Terminal by using diskutil:

     

    df

     

    This will list out all mounted drives. In the Filesystem column you will see devnames like /dev/disk3. The disk[3] is used in the following line, but substitute what is shown as the integer after the "disk" part.

     

    diskutil eraseDisk JHFS+ Untitled disk[n]

     

    Where disk[n] is the deviceID such as "disk3".

     

    I hope this works for you. It should result in an empty disk containing one partition, HFS+ Journaled format and named "Untitled."

    iMac, OS X Mountain Lion (10.8.2), MPro, MBPs, MBs, iPods, iPads, ATV
  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Nov 16, 2012 2:15 PM (in response to Tom Wolsky)

    That suggests that the partition is still inaccessible.

     

    Oh, excuse my forgetful mind. Be sure to preceed the diskutil command line with sudo:

     

    sudo diskutil eraseDisk JHFS+ Untitled disk[n]

     

    You will be asked to enter your admin password. It will not be echoed to the screen.

    iMac, OS X Mountain Lion (10.8.2), MPro, MBPs, MBs, iPods, iPads, ATV
  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Nov 16, 2012 3:37 PM (in response to Tom Wolsky)

    Yes, progress indeed.

     

    I suggest you use Disk Utility from your Mountain Lion system:

     

    Drive Preparation and Installation for Mountain Lion

     

    1.  Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button. Select Disk Utility from the main menu and click on the Continue button.

     

    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.

     

    3. See if you can't get the disk to unmount.

     

    If you cannot unmount from above, then in the Terminal try:

     

    sudo diskutil unmountDisk force disk[n]

     

    This should let you format the disk using Disk Utility.

    iMac, OS X Mountain Lion (10.8.2), MPro, MBPs, MBs, iPods, iPads, ATV
  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Nov 16, 2012 7:27 PM (in response to Tom Wolsky)

    Did you use the devname with a number for disk[n]. Remember you should use something like disk1.

     

    Tom, I'm about at the end of my expertise here. If you cannot get everything to unmount then I don't know how to get DU to operate on the disk so you can repartition it.

     

    Maybe this will work:

     

    sudo diskutil mergePartitions JHFS+ not disk[a]s[b] disk[a]s[c]

     

    disk[a]s[b] disk[a]s[c] are the partnames from df, for example, disk3s1 disk3s2.

     

    You should perform this when booted from a different drive. For example, you can connect the two computers using a Firewire cable and booting the problem machine into Target Disk Mode.

    iMac, OS X Mountain Lion (10.8.2), MPro, MBPs, MBs, iPods, iPads, ATV
  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Nov 17, 2012 9:04 AM (in response to Tom Wolsky)

    Normally, if you repartition the drive then all the partitions are removed including the Recovery HD. Anyway, Tom, glad you are back in business.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.