So I am dual-booting a Windows 7 laptop and I started Ubuntu with around 30 GB for small projects. Now that I am starting to use Ubuntu more than Windows, I am starting to run out of room. I have seen some tutorials on making partitions larger but I had to manually partition mine because of some weird error (I forgot what it was I did this a couple weeks ago). So I got GParted and it seems to work great (haven't really messed with it yet) but I want to know what partition do I mess with to make the space for Ubuntu larger. (Manually doing this in the first place was stressful enough so I don't want to guess).
2 Answers
First, I advise you against doing this from within your Ubuntu. It would be best if you booted from a live Ubuntu USB drive. (I assume you know how to do this, since you have Ubuntu installed).
Then, using the GParted in the live mode, resize sda4
, the extended partition, to occupy the rest of the available space. And I mean ALL of the unallocated space, since you can only make 3 primary partitions and 1 extended, so you can't add a partition without deleting one, or resizing the extended partition. So keeping any free space outside the extended partition is pointless. You can unmount the swap without worry - the live mode automatically activates swap.
The way I look at it, you can't add space to /
, since you'll have to move the /home
partition, and that might take a long time (but can be done) and maybe risky. It can be done - right click the home and swap partitions, choose Resize/Move, drag the partitions to the end of the free space. Then extend the sda5
to as much as you need. Apply.
I recommend two options with minimal risk:
- Delete the swap space, extend
sda6
(your home partition), add swap back again. -or- - Add a new ext4 partition in the free space within the extended partition.
It looks to me that you will have to edit your /etc/fstab
either way: for re-adding swap in (1) or adding the new partition in (2). I prefer and suggest (2). Before you go about (2), think of where you want this extra space to be. I prefer a directory in my home folder (like /home/muru/devel
). So decide where you want it to be. Let's call it /path/to/some/folder
. In your Ubuntu installation, do:
sudo mkdir -p /path/to/some/folder
This will create the necessary folder(s). Now boot to live Ubuntu and open GParted. To add a new partition:
- Right click on the unallocated space within the extended partition, choose New, select the required size and format (ext4 recommended).
- Apply (the green tick or the Apply All Operations entry in the Edit menu).
- Right click on the newly created partition, choose Information and copy the UUID. It looks like this:
5784865f-7c42-4d8b-b692-2d27e06af9c1
. Open a terminal, and execute these commands:
sudo mount /dev/sda5 /mnt sudo gedit /mnt/etc/fstab
Add this line to
fstab
, after replacing the value with the UUID you copied earlier (andext4
with the filesystem type, if you chose a different one):UUID=5784865f-7c42-4d8b-b692-2d27e06af9c1 /path/to/some/folder ext4 defaults 0 0
I recommend you use a directory that is empty and one you will use a lot for
/some/path
.Save, exit and reboot. You'll find the new partition mounted at
/path/to/some/folder
, but it will likely be owned by root. Do, in your installed Ubuntu,:sudo chown $USER:$USER -R /path/to/some/folder
You'll need to do this since mounting may make
root
the owner of the folder. Here$USER
is a variable that usually automatically contains your username, You can directly use your username in place of it.
Now you have all the space you need in /path/to/some/folder
. You have ~14 GB of free space in your /
, and for most users, that's plenty, especially given a separate /home
.

- 197,895
- 55
- 485
- 740
It depends. I'm not sure if you are using GRUB or not,but Window's bootloader only allows for 4 'primary' partitions, so technically sda5, 6, and 7 are all extended partitions of sda4, and resizing any of the former three will logically expand the latter. sda5 is probably where the system installs new program files, and sda6 is where your documents and downloads will likely be. It's worth knowing that any documents you have in Windows can be accessed through the 'host' folder which I think is placed at the root of the drive if you used WUBI.

- 1
- 1
/home/pico/stuff
). As it is, the commandsudo mkdir /some/path
has made a folder of that name. :D You can change the entry in the fstab to any folder you want to, or add a link to your home directory (or in other folders):ln -s /some/path $HOME/some_directory
, wheresome_directory
is the name you want it to appear as. – muru Jul 07 '14 at 01:01/home/
- like/home/pico
, or/home/muru
. So you want something like/home/pico/Stuff
. You can find out where your home folder is by the commandecho $HOME
in normal mode, or simply looking at folders in/mnt/home
in live mode, since you will likely only have one folder there. – muru Jul 07 '14 at 01:27mkdir -p $HOME/Stuff
so that the folder is created there. – muru Jul 07 '14 at 01:29