TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:18079] clobbered partition table



If the only thing that was lost was your MBR, then your extended partition
and all it's logical partitions should still be intact, and all you would
have to do is restore the table entries in the MBR.  Hopefully, Hard Drive
Mechanic or some other tool will be able to do this for you.  If that
doesn't work, you could try to do it manually by editing the MBR and putting
the partition information in by hand.  The first sector of the extended
partition has the last two bytes set to 55 AA (actually all boot sectors
have this, I believe).  If you can find this sector, the sector number will
tell you the size of the first partition and the offset of the second
partition, which is all you really need to restore the table entries in the
MBR.  I have never actually done this, so I can't say how feasable it is in
real life.

If your extended partition has been hosed, then things are much more
difficult and I have no idea what to do.

Whenever I do anything that is going to modify the partition table, I run a
script that saves the boot sectors of each partition to disk.  It also dumps
all the fdisk info to a file - there are 3 commands in fdisk for printing
table info and I save all of them.  Between the boot sectors and the fdisk
info, I have everything I need to restore the complete partition table.
This came in handy when I was installing an NT/98/Linux system and each OS
wanted to muck with the table in it's own unique way.  At one point Linux
fdisk wouldn't read the table at all and I was able to fix it by restoring
the sector containing the 7th entry in the extended partition.  Tedious as
hell, but it worked.  There should be, and probably is, a tool to take care
of this kind of thing.

Patrick McCabe

----- Original Message -----
From: David S. Cargo <escargo@anubis.network.com>
To: <tclug-list@mn-linux.org>
Sent: Thursday, May 25, 2000 9:25 AM
Subject: Re: [TCLUG:18079] clobbered partition table


> > From: Brian Dolan-Goecke <Brian@Goecke-Dolan.com>
> >
> > Before we jump off and make suggestions, what exactly happened ?
> >     What does the partition table look like now ?
> >     What do you want it to look like ?
> >     What did it look like before ?
> >     Are you sure the partition are totally gone ?
> >
> > If the partitions were over written with Linux you have no chance beyond
one
> > of the possible expensive solutions.  Other than that I need more info
to
> > help.
>
> The current partition table shows that the entire disk (4GB) is empty.
>
> I want it to look like it did before; before it had a primary FAT32
> partition, and then an extended partition with three more FAT32
partitions,
> a swap partition and five ext2 partitions (if memory serves /, /boot,
/usr,
> /usr/local, and /home).
>
> I guess it depends on what you mean by "totally gone".  I didn't know
> about the possibility of restoring the MBR using fdisk.  (At the
installfest
> I collected five sets of DOS 6.22 install disks and one set of Windows
> for Workgroups install disks.  There's bound to be an fdisk on one of
> them.)
>
> I have a two-year-old copy of the disk (from a previous 1.6GB drive moved
> to the 4GB drive using drivecopy) working on my salvaged P75.  While I
> can't take the sizes from it, the order and number of the paritions should
> be about the same.
>
> Once the accident happened, I folded in shock, and then removed the drive
> from the case.  I haven't tried to install it in anything since then.
>
> I know that if I were developing a program for modifying partitions, I'd
> try to provide a way to undo a change.  I hope to find one out there.
>
> I'll have to take a look for Hard Drive Mechanic.  Certainly $45 beats
what
> I have been quoted for the services.
>
> dsc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
>
>