Macbook Pro Partitions Hosed

Discussion in 'MacBook Pro' started by james1052, Feb 11, 2014.

  1. james1052 macrumors newbie

    Joined:
    Feb 11, 2014
    #1
    I am trying to repair hosed partitions on a Macbook Pro. It has a 500 GB drive and as far as I know, it was a standard install with no Bootcamp. I ran testdisk and it found:

    EFI System 40 409639
    Mac HFS 439566 975533517

    I used gdisk to delete and then recreate the partitions as testdisk showed them but it still won't boot. I then tried every other variation I could think of but have not been able to fix it as of yet. I have tried it with another third partition between the ones shown above. I have tried every possible variation of the partition codes being ef00, af00, af05 and ab00.

    Here's is an example of one of my latest tries:

    40 409639 EF00
    409640 975503598 AF00 (also tried AF05)
    975503599 976773134 AB00 (labeled "Recovery HD")

    Even with that setup I am still getting a question mark at boot and cannot mount or fsck.hfsplus the partitions. I get an error with fsck.hfsplus saying that there are no hfs signatures. Does this partition table look right? Any idea why fsck.hfsplus isn't happy? Does anybody here on the forum have a 500 GB HD in their Mac and could give me their partitioning so I can match it? All the ones I see on google are setup with Bootcamp and that won't help. Can anybody help? Anybody have any ideas at all for restoring this HDD so that I can rescue files or even boot? Thanks!!

    P.S. No backups or install media at all. :eek:
     
  2. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #2
    It sounds like it's probably the drive itself....how old is the MBP? I have a 13" rMBP with a 500GB SSD in it, but it's on loan...If you can't use internet recovery, which should create a standard install for you:


    http://www.apple.com/osx/recovery/

    If you have a good DL speed I'd try this.....if the drive still fails I'd say it's probably gone.
     
  3. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #3
    Instead of gdisk, did you try apple's Disk Utility. I'd agree with Macman though. I'd say the drive has issues.
     
  4. james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #4
    Thanks for the replies. Sorry I didn't reply sooner because it didn't automatically subscribe me to my own thread so I didn't know there were replies. --lame--

    Anyway, this is a MacBook Pro 13 inch, Mid 2009. That means that Internet Recovery is impossible and there are no firmware upgrades available to add that option. The partitions being hosed means one can't go into Recovery Mode at all. I have performed a surface scan on the drive using Seatools which showed no problems with the physical disk itself. However, it went through some extreme physical trauma at the hands of a client, which caused the SATA cable to come partially unplugged. This hosed things pretty badly, as you can imagine. The client of course has no OS X install disk or Time Machine backup to offer. At this point, the goal is to simply reload the OS to factory but that is proving more difficult than previously thought.

    I am able to use PhotoRec to actually recovery flat files from the disk, so I know the data is there! My only hope that I see at this point of actually restoring it into a bootable form would be if someone could tell me the exact partition sizes, type codes, etc. used on a 500GB so that I can make them match. Then perhaps I could do a fsck.hfsplus on the filesystem and get it clean enough to boot again. I live in the middle of nowhere and don't know of anyone who would let me borrow an install disc, either.

    Btw, I have been doing these various diagnostics from a live Lubuntu Linux CD after placing the Mac drive in another chassis.
     
  5. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #5
    In this case, I'd say get a set if the original install media from Apple. The grey ones that used to come with all our Macs. They gave to be the right ones for your model, so take care when purchasing....I've heard folks buying from EBay but make sure they are the right ones....Apple will tell you which ones are right
     
  6. james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #6
    Yeah, that may be the only way...Unless I could convince you to take a quick look at the size and locations of your partitions on that 500GB drive using something like testdisk. :eek: Then I should be able to make mine match...
     
  7. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #7
    I'd be happy to do it, but like I said, the rMBP ( which really is generations newer anyway) is on loan to my ex ( don't ask :)) and I will probably get it back early next week....if you can hang in until then, I will look....it will be erased and ready for just such a fresh install you are trying so might be with it....I still think the media are going to be your best bet. My retina model has a 500GGB SSD in it.
     
  8. james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #8
    I'm gonna see if I can wait 'til then. Thanks a bunch! Look forward to hearing back when you get it...
     
  9. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #9
    Okay, when it returns I will drop you a PM or place a post here...in the meantime, it wouldn't be a bad idea to look around for those disks as I'm pretty sure you are going to need them in the end:)

    Jeff
     
  10. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #10
    My rMBP is on it's way back via AM delivery....it was dispatched on Saturday, so may come Monday, but for sure Tuesday morning.....I will be good to go then.

    What utilities do I need to do a close inspection...I've Been out of the rip it apart and look loop for a while now...just provide me some links here that I can use on the Mac when it returns....it will come back wiped, so I'm guessing I'll need to put a copy of a Mavericks on it first!

    No big deal.I get 125MBS down so the whole process takes about 20 mins tops.
     
  11. james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #11
    That's some nice internet!

    Thanks for being willing to help...

    The tools I have been using are third party tools because I don't have an install disc. They are gdisk, testdisk and gparted.

    testdisk can be found on a number of live CDs, as can gparted but they both can be found on one here and here. Gdisk can be downloaded once you have booted into any number of live CDs if you have an internet connection.

    You may not need any of these tools at all if you are savvy with Mac tools like diskutil and isn't there one called gpt?

    What we are trying to accomplish is finding out the exact size of the partitions: What sector they begin and end on and what type code is used. In gdisk, I would do this by simply typing sudo gdisk /dev/sda and then p for print partition table.

    The Mac I am working on is Lion, I'm pretty sure. So it would be nice if the partition table you were examining was Lion but if it has to be Mavericks then hopefully that will do.

    Thanks again!
     
  12. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #12

    It will have to be Mavericks as I didn't keep a copy of Lion..I'm hoping for this morning, but it could be tomorrow....I'll be in touch as soon as it's here :)

    Jeff
     
  13. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #13
    Mac will be here at 8AM tomorrow morning...give me an hour to install Mavericks and those utilities and then set up a time. I will run the tests and post back with the results....probably around 10AM assuming Parcel Force run to their normal schedule.

    ----------

    That's 10AM GMT or UK time if you prefer:)
     
  14. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #14
    Mavericks is installed so I'm good to go...It's a clean install, but I need to put Aperture and a couple of utilities before we proceed with tests.
     
  15. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #15
    Damn..I need a DVD drive? I do have an Asus but portable it isn't...I also have a 16GB Kingston USB stick, is that enough space?

    Mac is now ready for action apart from some apps and my iTunes library, so I'm ready when you are.
     
  16. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #16
    I'm out all day today ( hospital visit ) so tomorrow will be the next window.:)
     
  17. james1052, Feb 19, 2014
    Last edited: Feb 19, 2014

    james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #17
    For some reason the forum didn't send me notifications that the thread was updated*. So sorry! I finally just opened the thread to check and there were your responses. My apologies. I will start checking this thread manually multiple times a day.

    Actually, I am just using those tools since OS X won't boot. Since you have a working OS X, you should be able to just use diskutil or gpt from the Terminal. The gpt command would be something like:

    gpt show device [disk]

    Let me know if you need help running those tools. Thanks!

    *EDIT: ...even though I am subscribed to the thread!
     
  18. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #18
    Got gives no device error...can you give me a command line? My rMBP 's HDD is called Mac HDD

    ----------

    Disk Util command gives:

    Last login: Thu Feb 20 08:11:39 on ttys000
    Apollo:~ JeffCooper$ diskutil list
    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *500.3 GB disk0
    1: EFI EFI 209.7 MB disk0s1
    2: Apple_HFS Mac HDD 498.8 GB disk0s2
    3: Apple_Boot Recovery
     
  19. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #19


    And the info screen in DU ( GUI Moe) gives the following two tables.
     

    Attached Files:

  20. james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #20
    I've been unavailable nearly all day working on someone's computer so thanks for waiting up!...

    Could you try:

    diskutil info /dev/disk0

    ...and...

    gpt show /dev/disk0

    ...and...

    gpt show -l /dev/disk0

    You may have to try sudo in front of these commands to get them to work. I am getting these command arguments from the man pages here and here.

    This should give more detailed information on the exact beginning and ending sectors. Thanks a bunch, man!!
     
  21. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #21

    Will do so now

    ----------

    Command i gives:

    Device Identifier: disk0
    Device Node: /dev/disk0
    Part of Whole: disk0
    Device / Media Name: APPLE SSD SM512E Media

    Volume Name: Not applicable (no file system)

    Mounted: Not applicable (no file system)

    File System: None

    Content (IOContent): GUID_partition_scheme
    OS Can Be Installed: No
    Media Type: Generic
    Protocol: SATA
    SMART Status: Verified

    Total Size: 500.3 GB (500277790720 Bytes) (exactly 977105060 512-Byte-Units)
    Volume Free Space: Not applicable (no file system)
    Device Block Size: 512 Bytes

    Read-Only Media: No
    Read-Only Volume: Not applicable (no file system)
    Ejectable: No

    Whole: Yes
    Internal: Yes
    Solid State: Yes
    OS 9 Drivers: No
    Low Level Format: Not supported

    ----------

    Command 2 gives errors...not sure about the -I or -i or -1?

    ----------

    Command three gives the output:

    start size index contents
    0 1 PMBR
    1 1 Pri GPT header
    2 32 Pri GPT table
    34 6
    40 409600 1 GPT part - "EFI system partition"
    409640 974156312 2 GPT part - "Customer"
    974565952 1269536 3 GPT part - "Recovery HD"
    975835488 1269539
    977105027 32 Sec GPT table
    977105059 1 Sec GPT header

    ----------

    And fixed command two..gives the output:

    start size index contents
    0 1 PMBR
    1 1 Pri GPT header
    2 32 Pri GPT table
    34 6
    40 409600 1 GPT part - "EFI system partition"
    409640 974156312 2 GPT part - "Customer"
    974565952 1269536 3 GPT part - "Recovery HD"
    975835488 1269539
    977105027 32 Sec GPT table
    977105059 1 Sec GPT header
    Apollo:~ JeffCooper$
    Apollo:~ JeffCooper$
    Apollo:~ JeffCooper$ sudo gpt show /dev/disk0
    start size index contents
    0 1 PMBR
    1 1 Pri GPT header
    2 32 Pri GPT table
    34 6
    40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
    409640 974156312 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
    974565952 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
    975835488 1269539
    977105027 32 Sec GPT table
    977105059 1 Sec GPT header



    Hope it helps

    Jeff
     
  22. james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #22
    Thanks a million! This may do it! I saw your message yesterday but was gone all day again working on someone's network so I wasn't able to reply until now.

    It would be nice if it showed not just the beginning sector but also the ending sector like gdisk does, but with a little basic math based on the size I should be able to figure out the ending sectors. Thanks so much! I will try this tonight and report back...
     
  23. Macman45 macrumors G5

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #23
    Glad to help:)
     
  24. james1052, Feb 24, 2014
    Last edited: Feb 24, 2014

    james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #24
    Strangely enough, I set my partitions to match yours but it didn't work. However!!!... ...I did even more googling and found this link for a 500 GB HDD with Lion:

    http://superuser.com/questions/397738/a-new-startup-disk-was-created-when-trying-to-install-debian-mac-os-x-10-7-3

    (1st column=start sector; 2nd column=sector size)

    So I set my partitions to match that and when I booted it suddenly showed an Apple instead of a question mark!
    ...Which is good news!! The problem now is that will only boot into Recovery Mode. It goes directly to the language screen and from there to the recovery utilities. All I wanna really do is reload the operating system from scratch so I clicked reinstall but when it tried to verify "computer eligibility" with Apple's servers it failed saying that I was not allowed to reinstall. I rebooted and tried it again and again and it finally stopped showing an error when verifying eligibility! (Weird.) ....But when I get to the part of the wizard where you choose a disk, no disk is shown except the Recovery HD (locked). :( Also, I looked at the startup disk utility and it doesn't show any disk at all (empty). I also rebooted while holding option and the only startup disk available is the Recovery HD.

    I think all this points to the fact that I have successfully recovered the 1st partition (EFI) and the 3rd partition (Recovery HD) but not the 2nd partition. I have tried partition type codes AF00 and AF05 on the 2nd partition but it still won't boot. I'm going to try some more stuff on the 2nd partition and will let you know what I figure out. It gave me some hope that I was able to recover the 3rd partition!!!

    By the way, I'm doing all my recovery work with the disk placed in a separate (PC) chassis and booted to Lubuntu 13.10 (Linux). The tool I am using to manipulate partitions is gdisk. I place the HDD back into the MBP every time I am testing booting. Hope to have good news soon!
     
  25. james1052 thread starter macrumors newbie

    Joined:
    Feb 11, 2014
    #25
    Update:

    I noticed that I got errors when verifying the disk from the recovery Disk Utility if the partition was AF05. It only verifies successfully if the partition code is AF00, so that seems to be the correct partition code. Unfortunately, I used the Repair Disk button from Disk Utility and it hosed my 2nd partition so that it would no longer would boot even in to the Recovery HD. I had to go back into my Lubuntu and use gdisk to fix the 2nd partition (again) in order to get it to boot into the Recovery HD once again.

    At this point, my plan is to try to install OS X onto a USB drive, using the Reinstall Mac OS X option from the recovery partition. That would give me a lot more flexibility to install it back onto the original HDD, etc. What do you think? Is this possible?
     

Share This Page