Re: Invalid partition table, 1st entry [OFFTOPIC]

Richard B. Johnson (root@chaos.analogic.com)
Sat, 23 Oct 1999 19:30:51 -0400 (EDT)


On Sat, 23 Oct 1999, bert hubert wrote:

> On Sat, Oct 23, 1999 at 02:11:06PM -0400, John Kacur wrote:
>
> > Does anyone know how to restore a hard drive's partition table. I messed
> > it up, trying to put FreeBSD on hda, with Linux already on hdb. When I
> > run /sbin/lilo to install lilo on hda, I get the message.
>
> There are several tools out there which attempt to recover your partition
> table. http://www.google.com and http://freshmeat.net may be of assistance.
> I presume that this recovery is done by scanning the disk and looking for
> appropriate magic values.
>

If you are able to mount your file-system, i.e., you booted with a
floppy, look in /boot/ for a file called /boot/boot.####, where ####
is the major/minor number of the device used to boot. This is the
first 512 bites that existed on your boot drive the first time you
installed LILO. If the partition(s) were not extended, and if
they were not changed since then, just do:

cp /boot/boot.#### /dev/boot_device

The boot device is the boot device shown in /etc/lilo.conf,
__NOT__ the root partition.

Then execute lilo with no command-line parameters. It should no longer
complain and the machine should be bootable. If you have multiple
extended partitions, this won't work. In any event, you won't
hurt the rest of the file-system so recovery tools can still be
used.

Cheers,
Dick Johnson

Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/