1

Topic: Partition outside disk?

Hi,
I have a problem when I try booting GParted from a live cd or running it in Ubuntu I get this error:

======================
libparted : 1.8.9
======================
Can't have a partition outside the disk!

GParted then opens but declares my hd as 300gb of unallocated space. I believe this is because I have corrupted the partition table.

fdisk from within ubuntu

sudo fdisk -l

returns this:

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0009b837

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        2432    19535008   83  Linux
/dev/sda2            2433       10718    66557292   83  Linux
/dev/sda3   *       10719       13315    20860396+   7  HPFS/NTFS
/dev/sda4           13316       38914   205623967+   f  W95 Ext'd (LBA)
/dev/sda5           13316       15865    20480000    7  HPFS/NTFS
/dev/sda6           15866       28613   102398278+   7  HPFS/NTFS
/dev/sda7           28614       38403    78638143+   7  HPFS/NTFS

Briefly:
sda1 is an Ubuntu installation
sda2 is my /home
sda3 is a windows xp installation
sda5 is a Windows 7 beta installation (I was curious - I think it was the built-in partition editor that caused this problem =S)
sda6 and sda7 contain media and work documents
*sda8 was a 4gb logical swap  partition but I deleted it as it was ending outside the 38913 cylinders. (I thought I might be able to resize sda4 after removing it then recreate the swap partition).

All the OS installations boot (with GRUB) and run fine. The only thing that is concerning is that GParted wont read my hard disk. After a few hours of Googling i am pretty sure the problem is to do with my disk having 38913 cylinders and the extended partition (sda4) ending on 38914. Is there a way I can correct the boundaries of sda4 without losing any data from the logical partitions within it? Or is this even a serious issue? It would be nice to get a swap partition again in any case =P

I found this post in ubuntu forums: (excuse the google cache, the forums have been down all day).

http://74.125.77.132/search?q=cache:MIg … k&cd=1

The above post seems to be about a similar problem. User houseam suggests deleting the extended partition with fdisk then creating a new one within the cylinder boundaries. I am unsure whether it is safe to do this however as I am not too keen on unnecessarily losing the logical partitions.

If anyone can offer me some advice it would be greatly appreciated.
Thanks,
Tom

2

Re: Partition outside disk?

The solution you found in the ubuntu forum seems plausible.

Before deleting the partition that extends beyond the end of the drive, I would suggest you document the partition layout using:

     fdisk -l -u

That way you will have the exact sector numbers if you need to completely recreate the partition table.

It is always advisable to have backups of your data whenever you are manipulating partitions.

3

Re: Partition outside disk?

Thank you very much.

Would I be correct in assuming that if I delete a partition with fdisk, its entry would just get removed from the partition table? The file structure is still there until it gets formatted i.e: it could be recovered?

4

Re: Partition outside disk?

If it is any interest to anyone, my problem was solved over in the ubuntuforums here > http://ubuntuforums.org/showthread.php?t=1038943

Thanks for the responses.
thegreat