Today, as I intended to perform my regular Time Machine backup, I got welcomed by a very scary message when I connected my external hard disk to my MacBook.
The disk you inserted you inserted was not readable by this computer.
Now, I take pride in having never ever lost any data on my Macs since 1998, so I was concerned this might be the end of my record…
In Disk Utility the drive device was listed, but no volume could be mounted due to a corrupted partition map. Don’t ask me how it got corrupted in the first place. I would guess the disk did not like being unplugged without using the eject command…
Anyway, salvation can come at no cost by using the Terminal in Mac OS X (assuming you have administrative rights):
- Connect your external disk
- Start terminal and use the 3 commands in bold red below (make sure to change the disk number to match your setup based on the first command)
- If the last command was successful, disconnect and reconnect your disk, which should now be OK
IronMan:~ nbalkota$ diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *250.1 GB disk0 1: EFI 209.7 MB disk0s1 2: Apple_HFS IronMan 249.2 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *1.0 TB disk1 1: 0xEE 1.0 TB disk1s1 IronMan:~ nbalkota$ sudo gpt recover /dev/disk1 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: gpt recover: /dev/disk1: recovered primary GPT table from secondary gpt recover: /dev/disk1: recovered primary GPT header from secondary IronMan:~ nbalkota$ diskutil eject /dev/disk1 Disk /dev/disk1 ejected
An alternative to the second command (gpt
) would be diskutil repairDisk /dev/disk1
Note than the manpage for gpt does not cover the recover option whereas the manpage for diskutil does cover the repairDisk option.
Jan 31, 2013 @ 07:09:04
Hi! I did the “diskutil list” command. and then i did the “sudo gpt recover /dev/disk1” command. then it asks for my password. does it mean my computer password? or is the password the third command “diskutil eject /dev/disk1”? either way once i get to that step it won’t let me type in any password. i type and nothing appears. the cursor just disappears…?
Jan 31, 2013 @ 12:14:00
Sarah,
The sudo command stands for Super User DO. That mean that any command on the same line as sudo will be run with admin rights.
If your user is not an admin (aka sudoer) it cannot work, so I assume your user is an admin on your computer (if you can install or update software with your password in Mac OS X then you are good).
Hence the password asked is the one you use for login to your computer.
Note that when you type your password in the terminal app no character will be displayed at all. You must have faith, type your password in blind mode and hit return 😉
May 23, 2019 @ 00:04:01
gpt recover: unable to open device ‘/dev/disk2’: Input/output error
May 23, 2019 @ 02:13:22
Probably a hardware failure…
Jan 31, 2013 @ 17:41:57
I typed in my password successfully, but I ended up getting the message “gpt recover: /dev/disk1: no primary or secondary GPT headers, can’t recover”?
Jan 31, 2013 @ 18:44:49
I see 2 possible explanations:
– /dev/disk1 is not the correct value from the list at step 1
– your disk was not formatted with a GUID Partition Table (maybe old or PC formatted)
Jan 31, 2013 @ 19:21:25
i’m pretty sure disk1 is the right disk. as for the GUID Partition Table. Is there anything I could do about that? two days ago i cleared everything off of it using: http://www.macyourself.com/2008/10/03/reformat-your-usb-flash-drive-to-access-its-full-storage-capacity/ Could that have been the problem? I was able to use the usb after I cleared it though. I opened it at least twice before yesterday when I got the ‘disk unreadable’ message.
Jan 31, 2013 @ 19:33:27
If you followed the instructions as per your link, then you formatted your USB as a FAT volume (compatible with PCs).
Hence gpt cannot help in that instance.
Your may want to try the diskutil repair alternative…
Good luck Sarah.
Apr 26, 2013 @ 19:47:29
I have the same problem but i have a mac formated hdd and i still get this message: gpt recover: /dev/disk2: no primary or secondary GPT headers, can’t recover
Any ideas?
Apr 27, 2013 @ 07:37:57
Hi Dani,
How old is your disk? Did you format it using an old Mac (PowerPC) ?
The GUID partition scheme applies only to recent Macs with Intel chip and was first implemented in Tiger (Mac OS X 10.4.6).
Apr 27, 2013 @ 10:14:07
Hi,
2 years old – max. formated on mac.
anyway, I found this solution and works perfectly for me: http://forums.macrumors.com/archive/index.php/index/t-1140673.html
Thanks for helping people.
Apr 27, 2013 @ 11:37:55
Thanks for the interesting link. We learn new stuff everyday 😉
Found this tech note from apple developer website on the topic of GPT: http://developer.apple.com/library/mac/#technotes/tn2166/_index.html
Jan 31, 2013 @ 20:20:27
Thanks so much for your help! I just ended up erasing everything and reformatting it wish i didn’t have to, but I can get most of the files back.
May 28, 2013 @ 03:35:40
My external hard drive stopped working after plugging into a pc which was usually used on a Mac. Any way to get it working again
May 28, 2013 @ 16:28:48
What do you mean by “stopped working”? A hardware failure (e.g. won’t power up / make any noise)? This post gives tips for still functioning hard drive from a hardware point of view. You may be lucky if you put your hard drive in a new enclosure…
Nov 07, 2013 @ 00:25:39
thank u a lot, this shit makes me scare, happy halloween
Feb 03, 2014 @ 04:03:58
help! after typing in the password, it reads “gpt recover: /dev/disk1: error: device contains a MBR”….
Feb 03, 2014 @ 21:36:26
Janice,
Unfortunately, it looks like your drive is not formatted using GPT, but instead using the older MBR partition scheme.
Could you include the output from the
diskutil list
command, just to give more clues?Have you tried with the
diskutil repairDisk
command as well?Feb 22, 2014 @ 19:53:53
This worked like a charm. Thank you SO much!
Feb 22, 2014 @ 19:56:01
You are welcome. Glad you did not lose your data.
Mar 09, 2014 @ 16:53:22
After typing in the password, the output was “gpt recover: /dev/disk1: error: device contains a MBR”
Mar 09, 2014 @ 19:18:38
Unfortunately, this tip does not work for MBR formatted device. See other comments for more info.
Mar 13, 2014 @ 20:20:27
tried these commands, get the error:
gpt recover: unable to open device ‘/dev/disk4’ : Resource busy
Any ideas?? You would be a life saver
Mar 13, 2014 @ 20:50:03
Hi Laura,
Command gpt can complain about busy resource at times.
Have you tried this command instead?
sudo diskutil repairDisk /dev/disk4
Mar 28, 2014 @ 02:19:02
Will this delete anything ? i can afford to lose ANYTHING!
Mar 28, 2014 @ 11:03:35
Nick, this tip may not recover your disk but it cannot delete any data. Hence worth a try…
Apr 06, 2014 @ 14:43:55
I tried the “sudo gpt recover /dev/disk1” command and input my password. But it just sent me this:
“gpt recover: unable to open device ‘/dev/disk1’: Input/output error”
I’ve also tried doing the alternate “repairDisk” command and it gave me this:
“Error repairing map: POSIX reports: Input/output error (5)”
*Please help! My hard drive has a lot of important files 😦
Apr 06, 2014 @ 14:54:34
Unfortunately, I/O error could mean many things. Consider using specific software for data recovery like DiskWarrior.
Apr 06, 2014 @ 15:19:39
Sorry to bother again, but I tried DiskWarrior and the hard drive I want to repair doesn’t appear. It only shows the startup disk. Would you know what’s wrong?
Apr 16, 2015 @ 16:39:42
have you fixed your Error repairing map: POSIX reports: Input/output error (5) problem? i have same issue
Jul 01, 2015 @ 13:43:29
Hi stiff. I also got stuck at the exact same place. Were you able to find a way to proceed and recover your drive?
Apr 13, 2016 @ 15:52:41
Can solve your problem? because i`m exactly like you… and i can`t do it.
Apr 07, 2014 @ 18:26:54
I just had the exact same problem as @Jet. Any other tips?
Apr 07, 2014 @ 19:20:26
Assuming a controller hardware fault, consider putting the hard drive in a different enclosure. Software wise, you could try something like TechTool Pro.
Apr 14, 2014 @ 07:58:27
No matter what I’ve done, there is no way my external drive can become readable. Any suggestions that don’t require payment?
Aug 12, 2014 @ 15:27:42
Thanks.
I tried this but got the following response.
gpt recover: unable to open device ‘/dev/disk1’: Input/output error
rays-mbp:~ Ray$
Any ideas what I should try next?
Aug 21, 2014 @ 22:49:00
Okay, so I have a hard drive from my old iBook G3. I am trying to access it via my MacBook Pro, and am getting the “/dev/disk1: no primary or secondary GPT headers, can’t recover”
I am at a loss at this point…not sure what to do next…
Aug 21, 2014 @ 23:18:00
Matthew, unfortunately the instructions only apply to drives from Intel Macs. Your old iBook G3 is a PowerPC Mac using the Apple Partition Map (APM), which exists since the Macintosh II in 1987.
I recommend using commercial software like DiskWarrior for these disks using older partition scheme.
Good luck.
Aug 22, 2014 @ 01:33:19
Thanks…
I was hoping there was a way to do it without spending the $99…guess i’ll have to fork it over. Hope it works and that the disk isn’t fried!
Aug 22, 2014 @ 06:02:15
There may be some free alternatives such as a good Linux data rescue live CD (Ultimate Boot CD with gparted magic, testdisk, etc…) but this is very techy (command line interface and risk of losing data). You could book a meeting at the Genius Bar of an Apple Store and they may have the tools / skills to salvage your data.
Feb 05, 2015 @ 06:34:03
I also got:
‘unable to open device ‘/dev/disk1′: Resource busy’
and when I tried ‘sudo diskutil repairDisk /dev/disk4’ like you told Laura, I got this:
‘Error repairing map: POSIX reports: Resource busy (16)’
what could this be?! It was working fine a few days ago!
Feb 05, 2015 @ 23:39:45
Jorge, it is very hard to tell what may be going wrong with “it”. You tried disk1 and then disk4, which is confusing. You should be using only the device number corresponding to your media. Could you at least include the output from the “diskutil list” command?
Mar 15, 2015 @ 14:29:31
I guess my problem is a little different my drive is one of 4 in my MacPro 2008 this is in bay and is listed now as Media in Disk U but it won’t let me verify or repair. it say this The disk you inserted was not readable by this computer. but this is not inserted it is in bay 4 and came with the computer I think but is only used as storage. I was having problem with it just going of line by its self so ran TTP 7 and rebuilt the volume since then it won’t come back online. I tried your instructions but that didn’t solve the problem. Do you have anything you could add to this problem? here is the info disk U
Disk Description : Media Total Capacity : 0 Bytes
Connection Bus : SATA Write Status : Read/Write
Connection Type : Internal S.M.A.R.T. Status : Not Supported
Connection ID : “Bay 4” Partition Map Scheme : Unformatted
Thanks,
Larry
Mar 15, 2015 @ 23:27:05
Larry, I guess your issue is more likely to be hardware (“going offline by itself”) rather than software related (e.g. partition table issue as covered by this post). Have you tried swapping your disk in bay 4 to another bay or an external enclosure and putting a working disk into bay 4? Does the issue tracks the hard disk from your bay 4 or your bay number 4 makes a working disk ill?
Mar 31, 2015 @ 05:09:07
I have a 32 GB Sandisk microdisc HC removed from my broken Mophie Juice pack air and I am trying to recover the data on that card. I inserted it in my card reader and got the “The disk you inserted you inserted was not readable by this computer.” message. So, I used the three commands you outlined above with this result: “gpt recover: unable to open device ‘/dev/disk1’: No such file or directory” Any ideas?
Apr 16, 2015 @ 16:21:53
tried it, it says: Error repairing map: POSIX reports: Input/output error (5)
what does it means
Apr 28, 2015 @ 11:03:54
Hi, when we attempt to use the above command: gpt recover /dev/disk2
i get the following output:
gpt recover: unable to open device ‘/dev/disk2’: Resource busy
And when i try the other command i.e diskutil repairDisk /dev/disk2 i get the following output:
Unable to repair this whole disk: A GUID Partition Table (GPT) partitioning scheme is required (-69773)
Here is the output of my diskutil list command:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *121.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 120.5 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *120.1 GB disk1
Logical Volume on disk0s2
B940B357-9D1E-47FC-B1DA-767FC97B1AE6
Unencrypted
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *500.1 GB disk2
1: Apple_partition_map 32.3 KB disk2s1
2: Apple_HFS FreeAgent GoFlex Drive 500.0 GB disk2s3
Please help.
Jun 01, 2015 @ 09:08:27
thank you very much
You saved my life.
It has occurred to me that with a fusion drive
thanks 🙂
Jun 03, 2015 @ 08:51:09
Hi there, i am trying to repair a usb i use for College which has all my data on it, i have tried both command options and neither have worked for me.
this is the message i get for sudo command:
gpt recover: /dev/disk3: no primary or secondary GPT headers, can’t recover
and for diskutil command:
Nikitas-iMac:~ nikitaschmid$ diskutil repairDisk /dev/disk3
Nonexistent, unknown, or damaged partition map scheme
If you are sure this disk contains a (damaged) APM, MBR, or GPT partition map,
you can hereby try to repair it enough to be recognized as a map; another
“diskutil repairDisk /dev/disk3” might then be necessary for further repairs
Proceed? (y/N) y
Error repairing map: MediaKit reports bad partition or no map found (-5324)
Would greatly appreciate some advice!
Thanks
Jun 25, 2015 @ 04:26:22
Thanks for sharing the way. But i’m stuck on the second steps. when I type sudo gpt recover /dev/disk1, it says :
Arifins-MacBook-Pro:~ arifinfirdaus$ sudo gpt recover /dev/disk1
Password:
Sorry, try again.
Password:
gpt recover: unable to open device ‘/dev/disk1’: Permission denied
Arifins-MacBook-Pro:~ arifinfirdaus$ sudo gpt recover /dev/disk1
gpt recover: unable to open device ‘/dev/disk1’: Permission denied
Can you give another solution? thank you very much.
Jul 09, 2015 @ 04:37:26
Thank you soooooooooooooooooooo much,
The recovery was a success.
Thank you nbalkota Thank you Bro
Jul 10, 2015 @ 08:56:46
Getting “error: device contains a MBR” with my flash drive that was corrupted at kinkos, which only supports PC-formatted drives (note: I DID NOT format for PC, yet appears drive was still corrupted somehow…)
I read all comments, don’t see your advice for what to do re: MBR issue — here is the complete log:
Dennis-Bruckss-iMac:~ UncleArgylesTavern$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.8 GB disk0s2
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *3.9 GB disk1
1: Windows_FAT_32 3.9 GB disk1s1
Dennis-Bruckss-iMac:~ UncleArgylesTavern$ sudo gpt recover /dev/disk1
gpt recover: /dev/disk1: error: device contains a MBR
Dennis-Bruckss-iMac:~ UncleArgylesTavern$ diskutil repairDisk /dev/disk1
NOTE: repairDisk is deprecated, use repairVolume instead.
Error starting filesystem repair for disk1: Unrecognized filesystem (-9958)
You specified a partition map; please specify a volume
Help much appreciated!
Jul 10, 2015 @ 22:07:20
Dennis, based on your log, your flash drive is recognised as a Windows FAT 32 file system. This explains why you get the error about MBR (Master Boot Record) when you run the gpt recover command. The GUID Partition Table is what is used by recent versions of Mac OS X for Macs with Intel CPUs. My fear is that the people at “kinkos” may have accidentally reformatted your flash drive for PC. However, most (all?) flash drives normally come pre-formatted for PC as FAT 32, so maybe my assumption is false.
This command may be able to fix a PC formatted flash drive, as in your case:
sudo diskutil repairVolume /dev/disk1
I hope this will work for you.
Good luck
Jul 11, 2015 @ 17:05:53
No luck:
Dennis-Bruckss-iMac:~ UncleArgylesTavern$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.8 GB disk0s2
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *3.9 GB disk1
1: Windows_FAT_32 3.9 GB disk1s1
Dennis-Bruckss-iMac:~ UncleArgylesTavern$ sudo diskutil repairVolume /dev/disk1
Password:
Error starting filesystem repair for disk1: Unrecognized filesystem (-9958)
You specified a partition map; please specify a volume
Also, I never let the nimrods at kinko’s touch the drive — I just put it in their self-help kiosk machines then saw it didn’t work and that was it. I also should’ve mentioned that even a PC doesn’t recognize it — BOTH prompt me to reformat it leaving me stuck in limbo
Jul 11, 2015 @ 17:31:20
Dennis, one more attempt with this command:
sudo diskutil repairVolume /dev/disk1s1
If this does not work, I am out of options and you may need to rely on expert data recovery software.
Good luck, again.
Jul 12, 2015 @ 17:06:23
No luck again, same “unrecognized filesystem” line…
Thanks so much anyway for helping. I will try that DiskWarrior you recommended earlier.
Jul 12, 2015 @ 17:09:39
DiskWarrior is reputed for Mac formatted disks, so since your flash drive is PC formatted (FAT32) you may find a better tool on the Windows platform.
Sep 03, 2015 @ 07:45:34
Thank you genius!!! You saved me a lot of work and money!!! Thank you
Sep 05, 2015 @ 05:31:47
Im still having some problems..any idea what I should do?
Last login: Sat Sep 5 17:26:39 on ttys000
Macintosh:~ henrycaird$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *750.2 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 599.3 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Microsoft Basic Data BOOTCAMP 150.0 GB disk0s4
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *1.0 TB disk1
1: Windows_FAT_32 1.0 TB disk1s1
Macintosh:~ henrycaird$ sudo gpt recover /dev/disk1
gpt recover: /dev/disk1: error: device contains a MBR
Macintosh:~ henrycaird$
Sep 05, 2015 @ 06:42:09
Henry,
Unfortunately, as some previous commenters, your usb disk is formatted as Windows_FAT_32 and hence has an MBR instead of GUID_partition_scheme. This post is only about fixing Apple GUID formatted disks.
You may want to read some background information on the GUID Partition Table.
On Mac OS X, the free and open source software gdisk may help you with its FixParts feature to repair damaged MBR data structures.
I have found a good tutorial for using FixParts and you may find this Apple Support Communities forum thread useful.
Alternatively, you may find your solution by using data recovery software on Windows or Linux.
Good luck and let us know what worked for you.
Sep 28, 2015 @ 14:53:47
Hi,
I have a 3TB partitioned external HDD, mac formatted. One of the partitions has a TimeMachine backup of my iMac and the other partitions have content/media stored on them.
The disk stopped being recognised by my iMac (or my MBA), so I moved the hard disk to a different enclosure and connected it back to my MBA Now I’m getting the disk not readable error. I tried following the instructions here, but get a “gpt recover: /dev/disk2: no primary or secondary GPT headers, can’t recover” error. (FWIW, I get the same error on my iMac as well)
This is the output from diskutil info –
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 250.1 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *249.8 GB disk1
Logical Volume on disk0s2
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *3.0 TB disk2
1: 0xEE 375.1 GB disk2s1
When I try diskutil repairDisk, I see “Unable to repair this whole disk: A GUID Partition Table (GPT) partitioning scheme is required (-69773)”
I tried looking up the link that @Dani Croitor posted that worked for him, but that just links to the home page, rather than a deep link.
Do you have any suggestions?
Thanks.
Sep 28, 2015 @ 23:29:16
Dear Som, see my reply above to Henry.
I think something went wrong on your external hard disk that caused corruption of your partition table. Your system now believes that disk2 has an FDisk_partition_scheme (an Apple synonym of the Master Boot Record / MBR partition scheme used on Windows).
This original post will only solve issues for disks with a recognised GPT (a.k.a. GUID_partition_scheme).
For more information about GPT, see TN2166 from the Apple developer website.
This insanelymac forum thread will probably also help you get to know more about the gdisk open-source utility (including a link to an up to date tutorial) and how it could help you recover your original partition table.
Good luck and let us know what worked for you.
I will probably need another post specific to fixing MBR or corrupt GPT using Mac OS X.
Sep 29, 2015 @ 06:38:30
Thanks I will give that a try and see where I get. Will let you know.
Oct 20, 2015 @ 04:49:46
After attempting both commands you’ve provided I get the “resource busy” error message. I’ve tried them both several times with no luck. Any suggestions?
Oct 21, 2015 @ 21:37:06
nbalkota, where are you with this? “I will probably need another post specific to fixing MBR or corrupt GPT using Mac OS X.” I see that I have a MBR partition scheme, need help with this. Thanks!
Nov 18, 2015 @ 20:16:11
Thank you very much!!!
Jan 08, 2016 @ 05:07:53
when i try the ‘diskutil repairDisk /dev/disk1’, i got this message
“Error repairing map: POSIX reports: Resource busy (16)”
and when i try the other command which is this one ‘sudo gpt recover /dev/disk1’, i got this message “gpt recover: unable to open device ‘/dev/disk1’: Resource busy”..
what does this mean? please help me, and thank you in advance
Jan 18, 2016 @ 22:25:52
When I use the command diskutil repairDisk /dev/disk1/ I get the following message: Error: -69770: Partition map check failed because no slices were found
Any suggestions?
Jan 28, 2016 @ 02:39:02
I keep getting this after trying the command:
sudo gpt recover /dev/disk1
gpt recover: unable to open device ‘/dev/disk1’: Input/output error
Any thoughts?
Jan 28, 2016 @ 22:04:59
Appreciate seeing someone willing to try and help! So after step one (which worked to bring up the drives) I then got “Permission Denied” on step two. Didn’t seem to have a chance for any password. What am I missing?
This is a drive that I had backed up with a service called Gobbler (specific for recording software) that had a switch requiring me to act. And I didn’t…and then had this failure, of course. Hundreds of hours of work were put into mixing, so I’m hoping this isn’t a lost cause.
Feb 07, 2016 @ 00:38:45
Hello, I’ve playing around with some of the commands listed in the article and in the comments and finally something useful came up I ran the sudo diskutil repairVolume /dev/disk2s3 and I got:
The volume was found corrupt and needs to be repaired
File system check exit code is 8
Updating boot support partitions for the volume as required
Error: -69845: File system verify or repair failed
Underlying error: 8: POSIX reports: Exec format error
Any ideas how I should proceed? I download a free trial of a recovery software and my documents all still appear there. Its just not showing up in finder. I can see the external harddrive in disk utility however the volume is greyed out and listed as “untitled”
thanks for the help!
Mar 26, 2016 @ 02:16:04
Saved my skin and a lot of heartache. Thank you!
May 31, 2016 @ 05:59:10
Hello,
I’m taking your advice and trying to repair my HD that stopped working this morning (after uploading files last night). After putting in my password, I got this message
gpt recover: unable to open device ‘/dev/disk1’: Operation not permitted
Not sure what to do now. Any help would be appreciated.
Thanks,
S
Jun 02, 2016 @ 00:37:43
Awesome, thanks so much man. It took a while tracking comments, mine was stuck due to MBR, but eventually ‘sudo diskutil repairVolume /dev/disk1s1’ worked a treat.
Jun 07, 2016 @ 19:36:51
It claimed it was successful but upon plugging it back into the computer she still no work!
Back to the drawing board. 😦
Jun 07, 2016 @ 20:07:29
Just wanted to follow up. I went back through the process and ran “diskutil repairDisk /dev/disk1” Viola! HD data saved! Thanks so much for this walk through. Definitely going to be bookmarking it.
Jun 09, 2016 @ 08:44:11
When trying to use the Terminal solution described above, to disk4 (the disk I’m having trouble with), I’m getting the following: Error repairing map: POSIX reports: Resource busy (16)
Jun 10, 2016 @ 00:24:43
IT WORKED! Thank you. So much.
Jun 28, 2016 @ 00:15:31
Thank you! You just saved my wife’s archive drive. 😀
Jul 07, 2016 @ 15:55:33
Hi, I got this reply….
gpt recover: /dev/disk2: no primary or secondary GPT headers, can’t recover
Any help would be much appreciated.
Thanks
Jul 07, 2016 @ 21:29:14
Hi again i just tried diskutil repairDisk /dev/disk2….and got this reply
Nonexistent, unknown, or damaged partition map scheme
If you are sure this disk contains a (damaged) APM, MBR, or GPT partition map,
you can hereby try to repair it enough to be recognized as a map; another
“diskutil repairDisk /dev/disk2” might then be necessary for further repairs
Proceed? (y/N) y
Error repairing map: MediaKit reports bad partition or no map found (-5324)
same problem as nikita
any suggestions?
Jul 18, 2016 @ 15:19:41
Neils-MacBook-Pro:~ neilchan$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 250.1 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *2.0 TB disk1
1: Windows_NTFS FUJITSU 2.0 TB disk1s1
Neils-MacBook-Pro:~ neilchan$ sudo gpt recover /dev/disk1
gpt recover: /dev/disk1: error: device contains a MBR
Neils-MacBook-Pro:~ neilchan$ diskutil repairDisk /dev/disk1
Unable to repair this whole disk: A GUID Partition Table (GPT) partitioning scheme is required (-69773)
Hi,
I tried everything I know and I can to save my disk and this is the lines command lines, what can I do. Please help!
Thank you so much for your help!!!
Jul 18, 2016 @ 20:15:32
Unfortunately, your external disk appears to be formatted as Windows_NTFS, so these instructions do not apply.
Sep 10, 2016 @ 03:32:50
Hi,
I tried these instructions, I got through the first two commands, but after the second one, and entering my password, nothing happens. I have the correct disk, although mine does not list anything past “0”.
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: *1.5 TB disk2
When I go to close Terminal it says it will terminate the running processes: gpt, sudo… So is it not working, or doing something very slowly? Any thoughts?
Thanks
Sep 10, 2016 @ 09:47:46
Until the Terminal prompt return, that means the current command is still running in the foreground. Hence something is running, albeit slowly.
Oct 04, 2016 @ 04:19:54
Last login: Mon Oct 3 23:33:10 on ttys000
iMac:~ Fabs$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *320.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS iMac HD 319.2 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *1.0 TB disk1
iMac:~ Fabs$ sudo gpt recover /dev/disk1
Password:
gpt recover: /dev/disk1: error: device contains a MBR
iMac:~ Fabs$ diskutil repairdisk /dev/disk1
Nonexistent, unknown, or damaged partition map scheme
If you are sure this disk contains a (damaged) APM, MBR, or GPT partition map,
you can hereby try to repair it enough to be recognized as a map; another
“diskutil repairDisk /dev/disk1” might then be necessary for further repairs
Proceed? (y/N) y
Error repairing map: MediaKit reports bad partition or no map found (-5324)
iMac:~ Fabs$ sudo diskutil repairVolume /dev/disk1s1
Password:
Unable to find disk for /dev/disk1s1
iMac:~ Fabs$ sudo diskutil repairVolume /dev/disk1s1
Unable to find disk for /dev/disk1s1
iMac:~ Fabs$ sudo diskutil repairVolume /dev/disk1
Error starting file system repair for disk1: Unrecognized file system (-69846)
I believe I know your answer, but I wanted to post my tries.
Any suggestions?
Nov 09, 2016 @ 21:56:45
Hi there!
Well, disaster has struck and at the worst possible time!
When I plug in my Mac-formatted 3 TB WesternDigital hard drive I get a “the drive you inserted is not readable by this computer” error message.
When I do a “sudo get recover” in Terminal, I get “gpt recover: /dev/disk1: no primary or secondary GPT headers, can’t recover”
Doing a pdisk “L” gives me “pdisk: No valid block 1 on ‘/dev/disk1′”
The drive had 4 partitions before the disaster but I cannot see any partitions in Disk Utility or Disk Drill – the drive does not mount but shows up a a 4TB HD.
Please help! What can I do to recover my files? Are the files still there?
I’m a novice at this – what I’ve done is followed instructions from the internet but no luck so far.
Any thoughts will be greatly appreciated,
Thanks.
MF
Nov 09, 2016 @ 22:09:43
Could you share the output from “diskutil list” just to make sure your WD HD is indeed at /dev/disk1?
Nov 09, 2016 @ 23:19:28
Got the disk visible again in Terminal 🙂 Here is the log from diskutil list:
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *3.0 TB disk2
Nov 09, 2016 @ 23:25:12
OK you will need to use the commands with disk2 instead of disk1 to match your setup. Good luck!
Nov 09, 2016 @ 23:45:55
OK – so now I get this:
“gpt recover: unable to open device ‘/dev/disk2’: Resource busy”.
I noticed some other users had the same error but didn’t see a solution to it in the replies. Not sure what this means …