On Sunday 25 February 2007 14:05, JC D wrote:
> Hi!
>
> I think I have a serious problem with my partition table. I did all the
> partitions with fdisk but may be not right, or somewhen screwed my
> partition table up. I want to use a graphical tool like gparted also doing
> some changes on my fat32 partition. But when I installed gparted I got an
> empty partition table with nothing than
>
> unallocated 55.89 GB      (my disk is an 60 GB Hitachi)
>
> nothing else!!!

Did you write/save the partition table after your changes?  Did you reboot 
thereafter?  I make some suggestions below but they come with the health 
warning attached that I have no responsibility if it doesn't work.

>  Here is my outpu from
> # fdisk -l
>
>  fdisk -l
>
> Disk /dev/hda: 60.0 GB, 60011642880 bytes
> 255 heads, 63 sectors/track, 7296 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/hda1   *           1        1913    15361888+   7  HPFS/NTFS
> Partition 1 does not end on cylinder boundary.

This is in itself is not a problem.  If you create/resize partitions based on 
MB you may or may not hit a clean cylinder boundary.  Do your resizing in 
cylinders and the end result will coincide with their boundaries.

> /dev/hda2            1914        4208    18427027+   c  W95 FAT32 (LBA)
> Partition 2 does not end on cylinder boundary.
> /dev/hda3            5100        7296    17637480    f  W95 Ext'd (LBA)
> Partition 3 does not end on cylinder boundary.

Look what has happened here, your extended partition starts at cyl 5100, while 
your first logical partition starts at cyl 4208.  I'd say that neither are 
correct.  I suggest that you resize your extended partition hda3 to start at 
cyl 4209, i.e. straight after the end of the previous primary partition 
(hda2).
 
> /dev/hda4            4208        5099     7164990   83  Linux

Here you need to change the beginning of this partition to be straight after 
the end of the previous primary partition and at the beginning of the 
extended partition.  So, hda4 should start at cyl 4209.

> /dev/hda5   *        5100        5108       68008+  83  Linux

This is good, but you do not need the boot flag.  As a matter of fact it may 
confuse your WinXP bootloader and Linux does not need it.

> /dev/hda6            5108        5173      521608+  82  Linux swap /

This is not good as it overlaps the end of the previous partition.  hda6 
should start at cyl 5109.

> Solaris /dev/hda7            5173        7296    17047768+  83  Linux
>
> Partition table entries are not in disk order

That's because they were created at a chronological sequence which do not 
reflect their physical order on the disk.  Not really important.

> This seems wrong to me. Also parted says something with overlapping
> partitions and its right I think. Is there any chance to repair this
> without destroying the whole installation? I have backuped my installation
> with rsync and also did save my mbr:
>
> dd if=/dev/hda of=/backup/mbr512.img bs=512 count=1
>
> and
>
> dd if=/dev/hda of=/backup/mbr446.img bs=446 count=1

Since you have a backup the worst that can happen is to correct the partitions 
as suggested above and discover that your OS cannot read them!  In that case 
reformat them and use your back up to restore the data.

An alternative approach is to restore your partition table to a previous 
version and with it the previous boundaries of your partitions.  After I was 
faced with a borked partition table too, I used testdisk to recover and 
restore previous partition table entries.

http://www.cgsecurity.org/wiki/TestDisk

HTH.
-- 
Regards,
Mick

Attachment: pgprodZnu3apP.pgp
Description: PGP signature

Reply via email to