You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to unlock a locked drive?

Partial output from diskutil list:


/dev/disk5

#: TYPE NAME SIZE IDENTIFIER

0: FDisk_partition_scheme *1.0 TB disk5

1: 0xEE 1.0 TB disk5s1


Partial terminal session:


Macintosh:~ harv$ diskutil mount /dev/disk5

Volume on disk5 failed to mount; if it has a partitioning scheme, use "diskutil mountDisk"

Macintosh:~ harv$ diskutil mountDisk /dev/disk5s1

Volume(s) mounted successfully

Macintosh:~ harv$



Disk Utility can't do anything with this disk.

Drive Genius sees the drive, but says it must

be unlocked before I can initialize it.


How do I unlock it?


Thanks,


Harv

Mac Pro (Early 2008), Mac OS X (10.7.4)

Posted on Jul 8, 2012 5:15 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 8, 2012 5:17 PM

Try:


Fix Permissions for a Locked Drive


Open Terminal in the Utilities folder. Paste the following commands at the prompt. Press RETURN after each. The first command will prompt for you to enter your admin password. It will not be echoed to the screen. After entering your password press RETURN again.


sudo chflags 0 /Volumes/*

sudo chmod a+rx /Volumes/*

killall Finder


An alternative is to download BatChmod and use it to fix the permissions.

23 replies
Question marked as Top-ranking reply

Jul 8, 2012 5:17 PM in response to harv47

Try:


Fix Permissions for a Locked Drive


Open Terminal in the Utilities folder. Paste the following commands at the prompt. Press RETURN after each. The first command will prompt for you to enter your admin password. It will not be echoed to the screen. After entering your password press RETURN again.


sudo chflags 0 /Volumes/*

sudo chmod a+rx /Volumes/*

killall Finder


An alternative is to download BatChmod and use it to fix the permissions.

Jul 10, 2012 8:26 AM in response to Kappy

Here's the current situation. Repeated attempts to erase and re-partition have left

the drive as shown here.


User uploaded file

Note the Write Status is now Read/Write, and the Format is now Mac OS Extended (Journaled).

So we're making progress.


However, attempting to erase the drive gives this error:

User uploaded file

It's repeatable. Any suggestions?


Thanks,


Harv

Jul 8, 2012 6:41 PM in response to Kappy

Thanks, Kappy. Here's the terminal session:


Last login: Sun Jul 8 20:34:44 on ttys000

Macintosh:~ harv$ sudo chflags 0 /volumes/*


WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.


To proceed, enter your password, or type Ctrl-C to abort.


Password:

Sorry, try again.

Password:

Sorry, try again.

Password:


I DO know my admin password. What's going on here?

Will this work better if I log in as admin?


Harv

Jul 8, 2012 10:23 PM in response to harv47

That drive is configured for Windows, not Macs, which is why DU can't do anything with it. You need to do this:


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.

Jan 14, 2015 5:40 AM in response to harv47

Hi,


### BEFORE YOU BEGIN, THIS WILL ERASE ALL YOUR DATA! YOU WILL NOT GET THIS DATA BACK! ###


For anyone who has the same issue, here a perhaps more in detail way of what to do:


1) Boot into recovery mode (option +r when you power on computer or press alt and choose recovery disk)

2) Open terminal from utilities

3) Format the volume where OS X is installed, example in my case where OS X was installed on disk02s:

# diskutil reformat /dev/disk0s2

4) Now you can erase the volume / partition with following command where OS X is in my case the name of the partition:

# diskutil eraseVolume JHFS+ OS X /dev/disks02

5) Go to disk utility, erase or format the whole disk (that is what I did anyways)

6) Go to reinstall OS X and hopefully you can select your disk as target


If not working, drop me a line @ http://christian.langfors.fi and I'll try to help & update this how-to.


Best Regards,

Christian

Jul 15, 2016 7:30 AM in response to Kappy

Hi, I have WD My Passport external hard drive 2 Tera Ultra.

It don't appear on finder nor on Utilities.

I guess it locked, I have use "sudo chflags 0 /Volumes/*" to see:

WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.


To proceed, enter your password, or type Ctrl-C to abort.


Password:


I don't want to lose my data, this will delete my data? if No I proceed.

How to unlock a locked drive?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.