[plug] Speaking of kernel panics...

Nick Bannon nick at ucc.gu.uwa.edu.au
Sat Jan 6 15:59:31 WST 2001


On Fri, Jan 05, 2001 at 01:16:22PM +0800, Dennis Plester wrote:
[...]
[how to keep a copy of your partition table]
[how to rebuild one]

Your partition table is kept in the first 512 bytes of your disc - your
master boot record, along with the first little chunk of code your
machine runs to boot an operating system.

LILO keeps a backup automatically, but it's a good idea to make your
own at a "known good" time or a floppy disc or some such - check your
LILO manual or ;
 dd if=/dev/hda of=/floppy/MBR bs=512 count=1 

The last 66 bytes of that are the partition table, but if you ever want
to restore it you can put the whole 512 bytes back, then re-run LILO.

Second, you can simply record the numbers that you put into
diskdrake/fdisk/cfdisk and enter them in a second time.

Third, you can use gpart in an emergency to scan your disc and try to
guess and rebuild your partition table ;
http://www.stud.uni-hannover.de/user/76201/gpart/

Nick.

- 
  Nick Bannon  | "I made this letter longer than usual because
nick at it.net.au | I lack the time to make it shorter." - Pascal



More information about the plug mailing list