Thursday, 12 February 2015

Oooooer - "The disk you inserted was not readable by this computer."

I had a rather nasty, heart-rending moment with an external USB drive this morning.

When I plugged it into my Mac, I saw this: -

The disk you inserted was not readable by this computer.

I decided to leave things as-is until I got home this evening, and then looked into it more fully.

Alas Disk Utility failed to provide me with the Get Out Of Jail card, via First Aid Verify Disk and Repair Disk, instead showing me disk2s1 rather than the more friendly name of DaveHay.

Rather than panicking, I did a bit of Googling, as one does, and also made some use of the diskutil command: -

diskutil list

/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *500.1 GB   disk2
   1:                       0xEE                         500.1 GB   disk2s1


I've highlighed the partition with which I had problems, which, by the way, contains all my data :-(

I then tried to verify the offending partition: -

diskutil verifyDisk disk2

Unable to verify this whole disk: A GUID Partition Table (GPT) partitioning scheme is required (-69773)

Again, a trip to Mr Google later, and I found this: -


which led me to gpt ( GUID partition table maintenance utility ), as per the following: -

sudo gpt recover /dev/disk2

gpt recover: /dev/disk2: recovered primary GPT table from secondary
gpt recover: /dev/disk2: recovered primary GPT header from secondary

That looked to be a good sign and, when I checked Disk Utility and Finder, I can HURRAH HURRAH HURRAH see my disk, as now evidenced by diskutil : -

diskutil list

/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS DaveHay                 499.8 GB   disk2s2

Note that the EFI partition has now turned up on disk2s1, and that the bulk of the disk is now assigned to the second partition, disk2s2.

In addition, the verifyDisk option now works: -

diskutil verifydisk /dev/disk2

Started partition map verification on disk2
Checking prerequisites
Checking the partition list
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Checking all HFS data partition loader spaces
Checking booter partitions
Checking Core Storage Physical Volume partitions
The partition map appears to be OK
Finished partition map verification on disk2


Right, off to backup my disk to my other disk, and then perhaps also back up my Mac's internal disk :-)

6 comments:

Daniel Croitoru said...

tried this but i get>

gpt recover /dev/disk2
gpt recover: unable to open device '/dev/disk2': Permission denied

could you please help?

Dave Hay said...

Daniel

You MAY need to run the gpt tool via sudo as it likely needs superuser ( root ) access.

However, please please use caution, and only do this if you're sure that you can afford to lose the data if it all goes horribly wrong.

Bottom line, YMMV so caveat emptor :-)

Dave M. said...

gpt recover unable to open /dev/disk1 resource busy

Dave Hay said...

Hi Dave, hmmm, I didn't see that, but a quick Google search found me this Get rid of “Resource Busy” message on Mac OS X. Perhaps that'll help ? Cheers, Dave

Dave M. said...

Thank you so much for your reply, unfortunately it didn't work for me but Im gonna keep searching, Cheers! :)

Dave Hay said...

Hi Dave, sorry to hear that, if/when you do crack it, please come back and let me ( us ) know :-)