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

Re: corrupted partition table



On Sat, Apr 21, 2001 at 09:49:20AM -0400, Benjamin Black wrote:
> Disk /dev/hda: 16 heads, 63 sectors, 19590 cylinders
> 
> Units = cylinders of 1008 * 512 bytes
> 
>   Device Boot    Start       End    Blocks   Id  System
> /dev/hda1  *         1      4909   2473978+   b  Win95 FAT32
> Partition 1 does not end on cylinder boundary:
>      phys=(307, 254, 63) should be (307, 15, 63)
> /dev/hda2         4909     19588   7397932+   f  Win95 Ext'd (LBA)
> Partition 2 does not end on cylinder boundary:
>      phys=(204, 254, 63) should be (204, 15, 63)
> /dev/hda5         4909     19588   7397901    b  Win95 FAT32

Hmm,  I have recently installed kernel-image-2.4.2 and kernel-image-2.4.3
locally as well and have had the same partion problems.  Very annoying.
I haven't been able to isolate the cause of the problems yet.

> is there a way to get either fdisk or lilo to fix this problem?  by fix
> i mean correct so that i can still boot and access my files.

The very first thing to do is to take a backup copy of your existing partion
table as any changes to the partition table can be bad. See below...

Once you have taken a backup copy you then need to edit your partition
table to get it back into reasonable shape.  This should not be undertaken
by the faint of heart and ensure that all your data is backed up before you
attempt this.

I used gpart(8) to do the recovery and it seems to be working fine now.

Mark




To quote from the gpart(8) man page:

PRECAUTIONS
       gpart may be of some help when the primary partition table
       was lost or destroyed but it can  under  no  circumstances
       replace  proper disk/partition table backups.  To save the
       master boot record (MBR) including the  primary  partition
       table to a file type
				    
                  dd if=/dev/hda of=mbr bs=512 count=1
					   
       exchanging /dev/hda with the block device name of the disk
       in question. This should be done for all disks in the sys­
       tem.  To restore the primary partition table without over­
       writing the MBR type
									        
          dd  if=mbr  of=/dev/hda  bs=1   count=64   skip=446
                    seek=446
													     
       Warning:  make sure that all parameters are typed as shown
       and that the disk device is correct. Failing to do so  may
       result  in  severe  filesystem  corruption. The saved file
       should be stored in a safe place like a floppy disk.



Reply to: