View previous topic :: View next topic |
Author |
Message |
petlab Apprentice
Joined: 03 May 2004 Posts: 290 Location: Armpit, Oregon
|
Posted: Sat Dec 31, 2005 11:57 pm Post subject: I recovered my partition table with app-admin/testdisk |
|
|
I accidentally messed up my partition table with cfdisk. I deleted / by mistake. I read that "fdisk doesn't do anything to the data, just the partition table." That meant that my data was still okay, it just wasn't listed in the partition table anymore.
I tried qtparted which is gui based, but I couldn't find out how to have it fix this problem. It looks fine for making partitions, maybe resizing them, but that's not what I needed.
Then I tried gpart. Well, it just threw "seek error" at me, even on good disks. Gpart is supposed to do what I want, but somehow no luck atm.
Finally, I tried testdisk. At first, it looked pretty limited. I tried using the /list option:
and it confirmed what I knew, that only my /boot partition was still listed in the table. So, I tried
Now, this is what I call excellent. The screen looked pretty much like cfdisk: partition info at the top, and a text menu at the bottom. I picked [ANALYZE] and it found my root partition (ext3) and my old swap, too. Then I used the [WRITE] item to finish up.
Hope this helps. _________________ Get Serious - Get JAWA CZ |
|
Back to top |
|
|
Cintra Advocate
Joined: 03 Apr 2004 Posts: 2111 Location: Norway
|
|
Back to top |
|
|
syg00 l33t
Joined: 23 Aug 2004 Posts: 907 Location: Brisbane, AUS
|
Posted: Sun Jan 01, 2006 7:00 am Post subject: |
|
|
It's brilliant.
However, go look for NeddySeagoons sig ... |
|
Back to top |
|
|
Cintra Advocate
Joined: 03 Apr 2004 Posts: 2111 Location: Norway
|
Posted: Sun Jan 01, 2006 7:41 am Post subject: |
|
|
syg00 wrote: | It's brilliant.
However, go look for NeddySeagoons sig ... |
ah yes, very true
happy to report I'm not in that situation
the only XP app I still rely on is Acronis True Image (version 8!) _________________ "I am not bound to please thee with my answers" W.S. |
|
Back to top |
|
|
jonner n00b
Joined: 25 Jul 2002 Posts: 42
|
Posted: Sat Jan 28, 2006 10:44 am Post subject: Re: I recovered my partition table with app-admin/testdisk |
|
|
petlab wrote: | Then I tried gpart. Well, it just threw "seek error" at me, even on good disks. Gpart is supposed to do what I want, but somehow no luck atm. |
Were you running this on an amd64 system? I ran into the exact same problem from gpart, then I noticed that the author says he has to test it on 64-bit in the TODO. I moved the disk to a system that's still an i686 system (though it has an Athlon64 and is about to become an amd64 system) and emerged gpart, where it seems to be working. |
|
Back to top |
|
|
petlab Apprentice
Joined: 03 May 2004 Posts: 290 Location: Armpit, Oregon
|
Posted: Sun Jan 29, 2006 5:53 pm Post subject: |
|
|
Yes, amd64. I pretend not to hear when something is unstable on amd64 _________________ Get Serious - Get JAWA CZ |
|
Back to top |
|
|
Hauser l33t
Joined: 27 Dec 2003 Posts: 650 Location: 4-dimensional hyperplane
|
Posted: Sun Jan 29, 2006 6:00 pm Post subject: |
|
|
Still, it's safer to do a Code: | # dd if=/dev/hda of=mbr.bak bs=512 count=1 | Keep the mbr.bak file in a safe place, then if anything bad happens, Code: | # dd of=/dev/hda if=mbr.bak bs=512 count=1 | would bring the partition table back. _________________ AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl
Do I like to compile everything?
Positive definite! |
|
Back to top |
|
|
jonner n00b
Joined: 25 Jul 2002 Posts: 42
|
Posted: Fri Feb 03, 2006 8:22 am Post subject: Backup MBR |
|
|
Backing up the MBR is certainly a good idea, but you have to think of it before you make a dumb mistake, like I did. It seems that tools like gpart are good at saving one from one's own dumb mistakes. Also, most of my filesystems are in LVM volumes (the one I lost was the only one that happened to be in a DOS-style partition), so backing up the MBR doesn't help in recovering them, though backing up LVM metadata might.
Also, I contacted the author of gpart, who told me that he hasn't tried to make it work on x86_64 and that it's almost unsupported. He sent me the newest, unreleased version, which I'll look at. I don't know if I'll make any progress, since it'll be delving into areas that are completely new to me. |
|
Back to top |
|
|
|