[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please help: Accidentally wiped off the whole hard disk!!!



Deboo ^ wrote:
On 5/13/05, Marty <martyb@ix.netcom.com> wrote:
Deboo ^ wrote:
> I accideantally fdisked my linux hard disk  and deleted all
> partitions, created one single solaris partition.

If you ever ran lilo on a root partition of the disk, then it probably saved
a copy of the mbr in the /boot directory which can be manually restored with
a disk editor (for example), although I'm not sure about the multiple disk
scenario you describe, or about grub.

Does this mean that lilo is better than grub due to this feature? Is
there such an option configurable in grub?

I'm not familiar with grub, but it probably has similar options.

If all else fails, there are a number of ways to deduce and restore the correct
partition table entries, either manually via inspection of the disk contents,
or using various automatic recovery tools, or even by trial and error.

I'll be interested to know these number of ways, if you could put
these in short, later.

Regards,
Deboo

gpart is one that have mentioned.  From another posting it sounds
like you already have the necessary partition information, in which
case you should probably just replace the partition table with fdisk using
the correct parameters.

The following is just for your information or in case you are unsure of
your existing partition info:  Other tools I've heard of are partition
magic (which I'm unfamiliar with) and the venverable Norton's Utilities.
The latter had a  disk editor with a partition table editing feature.
These and many other tools allow you to backup entire partition table chains.

Debian has a disk editor named LDE, and perhaps others.  I am not familiar
with any of them.

The benefit of a disk editor is that it will enable you to do a
pattern search for the characteristic patterns on the disk marking the
start of the partitions, such as (from memory) the ending 0xAA55 pattern
at the end of the first sector of each partition, which is similar to a
MBR (partition table).  If this has been wiped out, all is not lost,
but you would have to search for other partition markers, such as
the position of the first superblock, or the boot loader, and deduce
the partition offset from that.  The readable ASCII strings help identify
these areas on the partition.

The format of the MBR and the fake partition table sectors is documented
in various books about PC hardware, and probably on the web, except for
the details of logical partition table chains which seem hard to find.
Hopefully you won't have to go there.



Reply to: