Accidentally deleted partition table! (solved)

Discussion in 'MacBook' started by boandkris, May 21, 2009.

  1. boandkris macrumors newbie

    Joined:
    May 21, 2009
    #1
    Hi all,

    I recently bought a used MacBook. I used Boot Camp and made a new 32GB partition. I rebooted into my favorite linux Live CD (PCLinuxOS) and looked at the partitions and then left. I later found that the partitions were gone and the hard drive says its "empty" when I'm on the Live CD and I get the flashing question mark on a folder when I boot the Mac. I know that I didn't erase any data. I have worked with partitions quite a bit, and I'm pretty sure that I was working too fast and hit the "clear all" button on accident. There is another program in Linux that will show the partitions called "parted." Here is the code:

    Code:
    # parted /dev/sda
    GNU Parted 1.8.8
    Using /dev/sda
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) print
    print
    Warning: /dev/sda contains GPT signatures, indicating that it has a GPT table.
    However, it does not have a valid fake msdos partition table, as it should.
    Perhaps it was corrupted -- possibly by a program that doesn't understand GPT
    partition tables.  Or perhaps you deleted the GPT table, and are now using an
    msdos partition table.  Is this a GPT partition table?
    Yes/No? y
    y
    Model: ATA ST9320320AS (scsi)
    Disk /dev/sda: 320GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    
    Number  Start   End    Size    File system  Name                  Flags
     1      20.5kB  210MB  210MB   fat32        EFI System Partition  boot
     2      210MB   286GB  285GB   hfs+         Untitled
     3      286GB   320GB  34.2GB  fat32        Untitled
    
    (parted)
    Any idea how to restore the partition table so that it will boot?

    I tried my friends install DVD (don't have my own) and used "Disk Utility." It sees the hard drive, but not the partitions and won't mount it.

    Thanks,
    Kristin
     
  2. spinnerlys Guest

    spinnerlys

    Joined:
    Sep 7, 2008
    Location:
    forlod bygningen
    #2
    I don't know of a way to restore a partition table, but if you have another Mac handy (or an external 2.5" HDD with an empty drive to swap both drives, to install Mac OS X on the empty one, and putting the MB's one into the enclosure), you can use Target Disk Mode and a software called Data Rescue II to recover your data.
     
  3. boandkris thread starter macrumors newbie

    Joined:
    May 21, 2009
    #3
    Thank you for the thoughts.

    I'm not really worried about the data (I hadn't put my files on it yet), but I was really hoping to be able to save myself from having to reload Mac OS X (Leopard). I don't have the original DVD's. The guy I bought it from gave me some copies, but they were DVD+DL and the drive won't read them. I have ordered my own retail set of Leopard DVD's, but they won't be here for a few days and I'm leaving for vacation on Sunday. :( I was hoping to take the MacBook with me. It seems that if "parted" can see the partitions then there should be some way to restore the table?

    Also, I do have an external hard drive if that would help.
     
  4. spinnerlys Guest

    spinnerlys

    Joined:
    Sep 7, 2008
    Location:
    forlod bygningen
    #4
    You could use MRoogle to search for similar topics on this forum, but other than that I can't help.
     
  5. Bill Gates macrumors 68020

    Bill Gates

    Joined:
    Jun 21, 2006
    Location:
    127.0.0.1
    #5
  6. boandkris thread starter macrumors newbie

    Joined:
    May 21, 2009
  7. Diode macrumors 68020

    Diode

    Joined:
    Apr 15, 2004
    Location:
    Washington DC
    #7
    Well if you don't care about the data a simple reinstall would have been done by now :rolleyes:
     
  8. boandkris thread starter macrumors newbie

    Joined:
    May 21, 2009
    #8
    I couldn't get rEFIt to boot? I downloaded the .iso. Burned it, but couldn't get it to boot. Maybe I'm doing something wrong.

    Also, I probably would have reinstalled by now, but like I said earlier I'm waiting on the discs. I just thought that since no data is erased there might be a simple way to restore the partition table.
     
  9. Diode macrumors 68020

    Diode

    Joined:
    Apr 15, 2004
    Location:
    Washington DC
    #9

    Oops didn't read that part my appologies. :eek:
     
  10. boandkris thread starter macrumors newbie

    Joined:
    May 21, 2009
    #10
    I got it!

    I went back into the Linux Live CD (PCLinuxOS - the best Linux OS in my opinion) ran the "parted" (GNU Parted) program again. Looked at a list of its commands. Ran "mklabel" and gave the hard drive a "gpt" label. Then ran "rescue" and it found the partitions. Then the Mac booted up fine!

    It anyone ever deletes the label or partition table on accident this is the trick!
     
  11. jacobzking macrumors newbie

    Joined:
    Mar 27, 2009
    #11
    Boandkris... I just accidentally formatted a volume with a lot of important data but haven't done anything to the drive. I basically need to do what you did and "undo" the format. Can you please contact me at j_king@mac.com and give me some advice. I read your post about mklabel but have no idea what any of it means. Thanks so much!!!!
     
  12. dua macrumors newbie

    Joined:
    Feb 9, 2010
    #12
    similar problem

    boandkris,
    I have a similar problem as yours two days ago. But since I'm not so familiar with Parted I would ask you please to share your solution in a step by step explanation, about how did you solve the problem. I would really apreciate your help!

    Dua
     

Share This Page