Partitioning problem

Bob ubuntu-qygzanxc at listemail.net
Sat Dec 7 21:31:44 UTC 2013


** Reply to message from Nils Kassube <kassube at gmx.net> on Sat, 07 Dec 2013
21:10:44 +0100

> Bob wrote:
> > As I see the problem the install changed the end of the extended
> > partition to an incorrect value.
> > 
> > During the install I used whatever partitioning program the install
> > uses.  The first partition defined was /home then swap then root, all
> > at the end of the free space.  The following is the output of fdisk.
> > 
> > Disk /dev/sda: 500.1 GB, 500107862016 bytes
> > 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
> > Units = sectors of 1 * 512 = 512 bytes
> > Sector size (logical/physical): 512 bytes / 4096 bytes
> > I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> > Disk identifier: 0xdf5ee111
> > 
> >    Device Boot      Start         End      Blocks   Id  System
> > /dev/sda1   *          63       16064        8001    a  OS/2 Boot
> > Manager Partition 1 does not start on physical sector boundary.
> > /dev/sda4           16065   703309823   351646879+   5  Extended
> > Partition 4 does not start on physical sector boundary.
> > /dev/sda5           16128    10265534     5124703+   7 
> > HPFS/NTFS/exFAT /dev/sda6        10265598    30748409    10241406   
> > b  W95 FAT32 Partition 6 does not start on physical sector boundary.
> > /dev/sda7       781461504   976771071    97654784   83  Linux
> > /dev/sda8       703324160   781449215    39062528   82  Linux swap /
> > Solaris /dev/sda9       625184768   703309823    39062528   83  Linux
> > 
> > The Ubuntu partitions are listed backwards.  Notice that the end of
> > sda4 is the same as sda9, this is wrong.
> > 
> > Why would any program change the end of the extended partition end
> > unless you were purposely changing the size of the extended
> > partition?
> > 
> > I changed the end of sda4 to 976773166 which I think is correct (if
> > not what should it be?) and now gparted can display all the
> > partitions on the disk and I could change the size of the swap
> > partition.
> 
> I think the end value of the extended partition should be the same as 
> the end of sda9, i.e. the original value was correct. After all the 
> extended partition is a container for the logical partitions sda5 to 
> sda9. Now, if you want to change the size of the swap partition which is 
> between sda7 and sda9, you can only reduce the size which may not be 
> what you want to do. Otherwise you should first reduce the size of (the 
> end of) sda7 or (the beginning of) sda9. But if you simply change the 
> size of sda8 after you gave sda4 a wrong value, you may overwrite some 
> part of sda7 or sda9, depending in which direction you increase the size 
> of sda8.

Gparted will not show anything on the disk with the partition that I listed
above.  After my change gparted worked properly.

Notice that fdisk lists the last three partitons out of order (that is the way
they are chained).  The last partition on the disk is not sda9 but sda7.  So as
I see it the end of sda4 should be equal to or higher than the end of sda7. 
There is a small amount of free space after the last partition because of the
way the partition end is calculated so I used the total number of sectors -2,
it may have worked using -1.

-- 
Robert Blair




More information about the ubuntu-users mailing list