disk space expansion

Colin Law clanlaw at googlemail.com
Thu Feb 21 10:52:54 UTC 2013


On 20 February 2013 22:35, Joep L. Blom <jlblom at neuroweave.nl> wrote:
> On 20/02/13 13:28, Colin Law wrote:
>>
>>
>> I think you have to boot off the live CD or a gparted CD and shrink
>> and move the partitions inside sda2 so that there is a gap at the end
>> of sda2.  Then you can shrink sda2 and move it up, then expand sda1.
>>
>> Backup first of course.
>>
>> Colin
>>
> Colin,
> Thanks for the speedy reply!
> Do you mean that I, using a live CD, can shift sda2 e.g. 10 GiB up? I have
> never had the need to use gparted for this purpose. A possibility I think of
> is to move /dev/sda5 (which is then mount-point for /root) after swap
> (dev/sda8). I then should have ample space for the expansion of /dev/sda1
> (/boot).
> Again, thanks and I keep you posted,

You have
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *        2048      194559       96256   83  Linux
> /dev/sda2          196606   996286463   498044929    5  Extended
> /dev/sda5          196608   195506175    97654784   83  Linux
> /dev/sda6       195508224   781443071   292967424   83  Linux
> /dev/sda7       781445120   976754687    97654784   83  Linux
> /dev/sda8       976756736   996286463     9764864   82  Linux swap

If I read it correctly, then sda5, 6, 7 and 8 are all inside the
extended partition sda2.  I had missed the fact that you have lots of
unused disk above this.  I don't know whether it is possible to move a
partition from inside sda2 to a new primary partition.  Try it and
see, if gparted will let you do it then fine.  Also I don't know
whether you can just tell gparted to move the whole of sda2 up.  If
you can then that would be the easiest solution.  Again try it and
see, if gparted allows it then it will work.  Otherwise I think the
best way may be to extend sda2 to give empty space inside it at the
top, then move sda5 up past sda8 as you suggested, then move the start
of sda2 up to the start of sda6 and extend sda1 into the empty space.

Does that make sense?

Colin




More information about the ubuntu-users mailing list