Partition outside disk?
Author Message
Posted : Tue, 13 January 2009 23:39:25
Subject : 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: [code=xml] ====================== libparted : 1.8.9 ====================== Can't have a partition outside the disk! [/code] 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 [code=xml] sudo fdisk -l [/code] returns this: [code=xml] 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 [/code] 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). [url]http://74.125.77.132/search?q=cache:MIg8KoFrVckJ:ubuntuforums.org/archive/index.php/t-352723.html+gparted+Can%27t+have+a+partition+outside+the+disk!&hl=en&ct=clnk&cd=1[/url] 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
Rubberman
Posted : Wed, 14 January 2009 20:24:07
Subject : Re: Partition outside disk?
Possibly this is a gparted problem? You are using a VERY out-of-date version I think. They are currently at 4.1-2. Download the current version from their web site: www.gparted.org [Modified by: Rubberman on January 14, 2009 02:24 PM]
Rubberman
Posted : Wed, 14 January 2009 20:27:43
Subject : Partition outside disk?
Doh! I see the version is from libparted, not the executable. You might still want to check to see if you need to update, if you haven't lately.
blinky
Posted : Wed, 14 January 2009 22:08:04
Subject : Re: Partition outside disk?
Have fixed this once myself. Managed to wipe out first sector of my hard disk a couple of years ago. The remembered that the partition table was still proc filesystem:) Yes you need to use fdisk (command line). Delete partitions 7, 6, 5 then 4 Recreate 4 with the same starting cylinder and [b]correct end cylinder[/b] (38913) and remembet to set the partition type. Recreate the partitions 5,6 & 7 (eg starting and ending one the cylinders as now) Then you can create partition 8 starting at 38404 and ending at 38913. Check the partitions look like following when you list them, [b]before[/b] writing it back to the disk! /dev/sda4 13316 38913 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 /dev/sda8 28404 38913 ? 82 Linux swap / Solaris It worked fine for me, but you might want to backup any important data
blinky
Posted : Wed, 14 January 2009 22:11:03
Subject : Re: Partition outside disk?
Forgot to add, make sure you set the partition types (NTFS etc) and unless it looks like the example (in the starting and ending cylinders), just ctrl+C and start again until you get it right.