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

Re: partition table corrupted

>> "DEH" == Daniel E Hollis <Daniel.E.Hollis@Dartmouth.EDU> writes:

DEH> Anyone have any advice?  Lilo saves a copy of the mbr, iirc -
DEH> maybe it also saves a copy of the partition table?  (Where?).
DEH> Since I have the starting sector of the lost partition, is there
DEH> data in the beginning of the partition that would let me deduce
DEH> the length of the partition?

You are lucky. 2 Months before, I reinstalled DOS, and it sayed "I
have to rearrange the disk for DOS, shall I continue?". I didn't know
this was M$-speak for "wipe the partition table and create a new
single DOS partition"... Oh well ;-(

Fortunately I remembered about an article ("When is the time for a
backup? Right - the box freezes and after the reboot the disk is
f*cked up") I read about a similar case. Here is the fix:

In /boot you will find the relevant data. The file is named boot.XXYY
with XX beeing the major and YY the minor number of the device.


 device               Major    Minor      filename

1 IDE disk              3        0         boot.0300
1.logical partition     3        5         boot.0305 
3. IDE disk             22       0         boot.2200
2.primary partition     22       2         boot.2202
1.SCSI disk             8        0         boot.0800
3.logical partition     8        7         boot.0807

Check in the kernel source (devices.txt) or with ls -l /dev/

Make a backup of the curent sector:

  dd if=/dev/hda of=/tmp/saved.sector.0 bs=512 count=1

(of couse with the proper devicename)

Restore the old sector:

  dd if=/boot/boot.0300 of=/dev/hda

Reassign the old partition layout

  fdisk /dev/hda

  Command: w

Reinstall lilo


I wish you luck.


Reply to: