Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Notebooks > MacBook

Reply
 
Thread Tools Search this Thread Display Modes
Old May 21, 2009, 09:29 PM   #1
boandkris
macrumors newbie
 
Join Date: May 2009
Accidentally deleted partition table! (solved)

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

Last edited by boandkris; May 22, 2009 at 08:45 PM.
boandkris is offline   0 Reply With Quote
Old May 21, 2009, 09:35 PM   #2
spinnerlys
Guest
 
Join Date: Sep 2008
Location: forlod bygningen
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.
spinnerlys is offline   0 Reply With Quote
Old May 21, 2009, 09:48 PM   #3
boandkris
Thread Starter
macrumors newbie
 
Join Date: May 2009
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.
boandkris is offline   0 Reply With Quote
Old May 21, 2009, 09:50 PM   #4
spinnerlys
Guest
 
Join Date: Sep 2008
Location: forlod bygningen
You could use MRoogle to search for similar topics on this forum, but other than that I can't help.
spinnerlys is offline   0 Reply With Quote
Old May 22, 2009, 10:08 AM   #5
Bill Gates
macrumors 68020
 
Bill Gates's Avatar
 
Join Date: Jun 2006
I'm not sure if it will help or not, but try running rEFIt's partitioning tool. It may be able to help. http://refit.sourceforge.net/
__________________
Mid-2010 15" MacBook Pro / 2.66GHz / 8GB RAM / 240GB SSD
16GB iPhone 5
Bill Gates is offline   0 Reply With Quote
Old May 22, 2009, 01:04 PM   #6
boandkris
Thread Starter
macrumors newbie
 
Join Date: May 2009
Trying it now. Thanks so much.
boandkris is offline   0 Reply With Quote
Old May 22, 2009, 01:34 PM   #7
Diode
macrumors 68020
 
Diode's Avatar
 
Join Date: Apr 2004
Location: Washington DC
Send a message via AIM to Diode
Quote:
Originally Posted by boandkris View Post
Trying it now. Thanks so much.
Well if you don't care about the data a simple reinstall would have been done by now
__________________
16GB iPhone 4; 2.4 GHZ C2D iMac 4GB Ram; 32GB iPad2; AppleTV2
Diode is offline   0 Reply With Quote
Old May 22, 2009, 02:18 PM   #8
boandkris
Thread Starter
macrumors newbie
 
Join Date: May 2009
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.
boandkris is offline   0 Reply With Quote
Old May 22, 2009, 03:41 PM   #9
Diode
macrumors 68020
 
Diode's Avatar
 
Join Date: Apr 2004
Location: Washington DC
Send a message via AIM to Diode
Quote:
Originally Posted by boandkris View Post
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.

Oops didn't read that part my appologies.
__________________
16GB iPhone 4; 2.4 GHZ C2D iMac 4GB Ram; 32GB iPad2; AppleTV2
Diode is offline   0 Reply With Quote
Old May 22, 2009, 04:08 PM   #10
boandkris
Thread Starter
macrumors newbie
 
Join Date: May 2009
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!
boandkris is offline   0 Reply With Quote
Old Dec 27, 2009, 07:16 AM   #11
jacobzking
macrumors newbie
 
Join Date: Mar 2009
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!!!!
jacobzking is offline   0 Reply With Quote
Old Feb 9, 2010, 05:06 PM   #12
dua
macrumors newbie
 
Join Date: Feb 2010
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
__________________
Dua
dua is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Notebooks > MacBook

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Help, deleted partition Nando777 Mac Basics and Help 2 Jul 11, 2011 11:19 AM
Accidentally Deleted Partition w/ Windows on it. HELP :) angelpeach838 Windows, Linux & Others on the Mac 1 Sep 21, 2010 10:10 PM
Accidental deletion of Mac partition oscarchica Windows, Linux & Others on the Mac 9 Sep 3, 2008 10:32 AM
accidentally deleted windows bootcamp partition GregUofMN Mac Basics and Help 6 Jun 14, 2008 07:12 AM


All times are GMT -5. The time now is 06:55 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC