You are not logged in.
Hi
I've accidentally cleaned my partition table on my main harddrive using the fdisk o command (create a new empty DOS partition table).
The changes are written but I Haven't rebooted my computer yet so I'm still running arch on the kernels partition table.
Is there any way to undo this? My old partition table looked like this:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26133 209913322 b W95 FAT32
/dev/sda3 26134 48641 180787808+ 5 Extended
/dev/sda5 26134 26632 4000153+ 82 Linux swap / Solaris
/dev/sda6 * 26632 26756 995998+ 83 Linux
/dev/sda7 26756 30403 29294496 83 Linux
/dev/sda8 30403 48641 146497034+ 83 Linux
Thanks
// Lazze
Offline
just rewrite your old partition table exaclty as you had it before and it should be fine. I had my table get messed up a couple of weeks ago (showed only one partition instead of 2), As long as you know how your table was setup you can restore it wouldnt loosing any data or anything.
Offline
Maybe testdisk can help you, if it can sort out where all your partitions are them I guess you can recover from that quite easily.
Writing it by hand (read: recreate it with fdisk) as it was before may be a little prone to a mistake but whatever gets you out of there will make you happy
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Thanksfor the quick replies, I tried rewriting it but fdisk won't let me do it exactly like it was before, as you see in my first post it looked like this:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26133 209913322 b W95 FAT32
/dev/sda3 26134 48641 180787808+ 5 Extended
/dev/sda5 26134 26632 4000153+ 82 Linux swap / Solaris
/dev/sda6 * 26632 26756 995998+ 83 LinuxI guess it wont accept my current
/dev/sda7 26756 30403 29294496 83 Linux
/dev/sda8 30403 48641 146497034+ 83 Linu
When rewriting it manually I can get it like this:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26133 209913291 7 W95 FAT32
/dev/sda3 26134 48641 180795510 5 Extended
/dev/sda5 26134 26632 4008186 82 Linux swap / Solaris
/dev/sda6 * 26633 26756 995998+ 83 Linux
/dev/sda7 26757 30403 29294496 83 Linux
/dev/sda8 30404 48641 146496703+ 83 Linux
If you look at /dev/sda6 for instance it starts at 26633 instead of 26632 as the old one did.
Fdisk wont allow me to start it at the same cylinder as the previous ended as fdisk shown before it was mssed up.
Any ideas why?
Offline
I dont know if it will work any differently but have you tried cfdisk instead of fdisk?
Offline
The old partition table was created using cfdisk when I installed arch so maybe it will work better, but how can I specify size in cylinders when creating a partition in cfdisk, it ask for size in mb even if set units to cylinders.
Offline
you can try to use testdisk, it can recover old partitions ...
(I have already test it and it worked..)
(you can find it in the community repo)
Last edited by akira86 (2009-03-01 17:25:05)
Offline
I'll give testdisk a try, seems to take a while to scan all cylinders, I will return with the result.
Offline
As a last resort you can try sfdisk, its harder to use than fdisk and cfdisk but will let you do everything that you want, even the most stupid things you can think of, but in times of crisis nothing better than a program like that
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I ended up saving my important data an reinstalling arch, after a while it seemed like the fastet way
Offline