Can I Adjust/Reduce My Partition Size for Ubuntu?
I'm a brand new user to Ubuntu and Linux for that matter. I just installed Ubuntu in a Dual-Boot setup and loaded all the updates I could get.
During installation it asked me to set the partition sizes between Ubuntu and Windows Vista. However, it did not differentiate which partition was which on the screen when I set them, so I gave Ubuntu about 75% of my disk space (about 125GB compared to only 80 for Vista). I was aiming to give Ubuntu 80GB of space, and the rest to the Windows partition. However, I got them backwards and Ubuntu now commands the majority of space.
Is there a way to reduce the partition size and give the majority back to the Windows partition? Can anyone point me in the right direction for giving the partitions the appropriate size also? 80GB was a guess, so that I had room to install apps.
Thanks.
Solution 1:
Yes, there is a way to resize your partitions. However, depending on the different partitions you have and their locations, it might be a long process to resize. Nonetheless, here's what you can do, and what I always do. This method uses a utility called GParted.
Before we begin, it is advisable that you take a backup of your data.
Step 1
Boot up from the USB/CD that you used to install Ubuntu, as if you were installing it from scratch. But instead of choosing to "Install Ubuntu", you'll choose "Try Ubuntu". This will boot into the Ubuntu on your USB/CD, not the one you installed. Connect to the internet, and install GParted. GParted is a utility that helps you partition disks. To install it, open up a terminal using Ctrl+Alt+T and then type:
sudo apt-get update && sudo apt-get install gparted && gksu gparted &
Step 2
GParted should come up. My GParted looks like this:
The top right states the hard drive we're currently viewing. In my case, it's /dev/sda
. In your case, it most probably will say the same thing, or something else like sdb instead of sda. If you have any other external hard disks or USB sticks connected to your computer, they will also be listed in that drop down menu. It is very important that you make sure you choose your internal hard disk from that drop down menu. To be on the safe side, disconnect any other USB device and refresh GParted by hitting Ctrl+R.
Now, the list at the bottom shows the partitions in this hard disk. In my case, /dev/sda2
is my Window's partition, because it is of type ntfs, and it's fairly big in size (180 GB). My Ubuntu partition is the one that says type ext4, which is also the one that has a mount point of /
. So, identify your Windows and Ubuntu partitions the way I did it.
Step 3
Now we do the resizing. It's as simple as right clicking on the partition and selecting "Resize/Move". Do that on your Ubuntu partition, and resize it. Don't worry, the resizing won't actually happen when you hit OK, it'll queue up all the operations so you can "apply" everything in the end. So what you're going to need to do is (1) resize your Ubuntu partition, (2) move the empty space so that it's after your Windows partition, and (3) resize your Windows partition and "expand" it to take over that empty space. Once you're done, take a look at the little diagram showing the partitions and make sure that everything looks okay; that there is no empty space lurking around. If you're satisfied...
As aforementioned, this process can take a LONG time. It's because of the resizing and moving of partitions around. It all depends on how big your partitions are, and how much space is being used. It once took me more than two hours to complete. But, it could only take you 20 minutes. If you want to, you can post a screenshot before applying so we can take a look at it. But again, if you're satisfied and willing to go forwards...
...hit the check mark in GParted to start applying all of these actions. Once done, reboot, and remove the USB/CD, and boot normally into your desired OS.
Solution 2:
Warning: When dealing with partiotion, something might accidently go wrong. It is advisable that you have a complete backup of you system just in case. To have a back up done you can use something like Clonezilla.
To accomplish your task once you get a backup, You can boot from the Ubuntu Live CD, choose try Ubuntu. Once you get to the desktop you need to install Gparted. To do that, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below:
sudo apt-get install gparted
Once installed you can run it, by typing sudo -i gparted
at the prompt, and you should be able to re-size the partition.
Note: To re-size a partition, first make sure the partition is unmounted.