[TriLUG] Lost Partition Table!

Sinner from the Prairy sinner_prairy at hotmail.com
Sat Sep 8 22:48:24 EDT 2001


>On Sat, 8 Sep 2001, Sinner from the Prairy wrote:

> > Hi,
> > I have recently lost the partition table on my primary disk. My fault. 
>It
> > has ext2, ReiserFS and LinuxSwap partitions. There are primary and 
>logical
> > partitions on the disk. Now I'm running from a second disk.

>many years ago, a company in calgary running sco unix asked if i could
>solve the same problem and, sure enough, there was a simple fix.

>i wrote a short (<1 page) C program that opened the device file for
>the hard drive, and read 1K blocks, looking for a pattern that
>appeared to be unique to the beginning of the sco unix superblock.
>compiled the program, linked it statically, copied it to a sco
>unix boot disk, took it to the client, booted from the disk,
>ran the program and, to the astonishment of everyone there (including
>me), it nailed every filesystem on the disk at exactly the right
>offset.  it was a simple matter to use fdisk to rebuild the table.

>i've never tried this under linux, and it's undoubtedly more
>complicated since you're trying to locate ext2 and reiserfs
>filesystems, as well as swap.  maybe i'll take some time and
>see if i can re-create the program from memory to work with
>linux.  it's really as simple as it sounds.

>rday

If you can make it work, I wil be very grateful. Heck, I'll buy you a beer!

Keep me posted on the results. And, if you want, there's a website that has 
an utility (GPL) that does something similar... although I cannot compile it 
on my system, I dunno why :-/

I have the disc on a computer with a working Linux system (Mandrake 8.0, 
kernel 2.4.7 ), so I can run it.


The URL:

http://www.esiea.fr/public_html/Christophe.GRENIER/


Thank you in advance,
Sinner

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




More information about the TriLUG mailing list