[plug] partition recovery - stupid fdisk mistake

Timothy White weirdit at gmail.com
Thu May 18 08:50:44 WST 2006


On 5/17/06, Mike Holland <myk.list at westnet.com.au> wrote:
> philC wrote:
>
> > In attempting to reformat a ext3 to fat partition I ran the fdisk o
> > option then the w write to disk -Big mistake! I've now got only one
>
> Phil,
> don't turn that computer off!! :-)
> Try  "cat /proc/partitions" and save/write the result. That will tell
> you their size, from which you can calculate the number of cylinders,
> and rebuild the table by hand.  Also 'df' will give sizes and other
> useful info.
>
> If the computer is shut down, you can still boot off floppy or cdrom and
> repair it.  If you have lost the partition sizes, there is probably
> a utility which will scan the disk looking for partition headers.

gpart

Description: Guess PC disk partition table, find lost partitions
 Gpart is a tool which tries to guess the primary partition table of a
 PC-type disk in case the primary partition table in sector 0 is
 damaged, incorrect or deleted.
 .
 It is also good at finding and listing the types, locations, and
 sizes of inadvertently-deleted partitions, both primary and logical.
 It gives you the information you need to manually re-create them
 (using fdisk, cfdisk, sfdisk, etc.).
 .
 The guessed table can also be written to a file or (if you firmly
 believe the guessed table is entirely correct) directly to a disk
 device.
....

I don't know any other way to extract the data, once you have rebooted.

You can use gpart while things are still running IIRC. And it's in Debian ;-)

Tim


-- 
Linux Counter user #273956



More information about the plug mailing list