0

I am upgrading to 13.10 and discovered my root partition was too small. I used partition editor to shrink my home partition by 2GB. Now I want to take the unallocated space and add it to sda1. I can't figure out how to accomplish this.

(This is an old question where I found an answer - below. It has been suggested that it is a duplicate of How to resize partitions?, but this isn't exactly the case. I was using gparted but my problem turned out to be connected to the swap.)

0

3 Answers 3

1

I found the answer in a brilliant suggestion:

GParted wont resize extended partitions

The problem was that although I hadn't mounted the disk, the swap partition which is inside the extended partition was still being used. I had to boot from the disk on key (as usual) but then right click on the swap partition and turn off the swap.

Then I could resize my extended partition and shrink it by the 2 GB. Since I had 2 GB of unallocated data, it took 30 seconds. Then I could take the unallocated space which was no longer part of the extended partition and add it to sda1 by resizing sda1. That took a minute or so.

The price of shrinking down sda6 by 2 GB I had already paid. That was expensive as it took some 5+ hours. In any case it is done and it works. Gparted is a great tool!

0

It is worthwhile to grow your / partition if you can... but when that's not possible, or if you'd like to put it off for a bit, a workaround is possible. On a couple of my machines I normally mount /var/cache/apt to a folder on a different partition for use during upgrade.

for example, if /home is a different partition

sudo mkdir /home/cache
sudo cp -a /var/cache/apt /home/cache/apt
sudo mount -o bind /home/cache/apt /var/cache/apt

After that dist-upgrade usually works.

1
  • Thanks for the suggestion. In my case I'm only using 50% of my disk so I have loads of space. My mistake was trying to trim down the root directory to the last byte. Now I can see that a good size for the root is 20GB and not 10GB (give some room to breathe).
    – Ilan
    Oct 24, 2013 at 6:14
0

Your unallocated is inside the extended partition. You should be able to move the start of the unallocated to the start of sda6. Then you will have unallocated outside of the extended that you can add to sda1.

But why are you using 12GB with a separate /home? I have my /home inside my / with 10GB used and 2 or 3GB of that is .wine for Picasa. But all my data is in separate data partitions. May be time to houseclean?

Another choice is to shrink /home by 20 or 25GB and create another / partition for your new install.

2
  • Yes, I know. I shrunk the size of sd6 by 2 GB. The next step which I would like to take is move that 2 GB to sda1, but how? The reason for separating the the root from home is that in case of disaster I can reformat sda1 and nothing happens to my home data, which is BY FAR the more important data.
    – Ilan
    Oct 20, 2013 at 5:05
  • BTW I am booting from Ubuntu on a disk on key so that the disks are unmounted. As many comments say, you can't change the size while the disk is mounted.
    – Ilan
    Oct 20, 2013 at 5:18

Not the answer you're looking for? Browse other questions tagged .