How would I partition my main disk?
256 GB — 109 GB free (57.5% full)
Because when I am running my OS (Ubuntu) It is mounted, but to partition it I need to unmount it.
How would I partition my main disk?
256 GB — 109 GB free (57.5% full)
Because when I am running my OS (Ubuntu) It is mounted, but to partition it I need to unmount it.
I'd shutdown|restart your system, and then boot up a live system, such as your installer disk|flash-drive, then re-partition from there.
note: if you move your /boot partition; or the data it contains; your may find your grub will fail. if so you'll have to enter commands to boot manually & fix, or reboot your live system and fix that way (Recovering GRUB after installing Windows 7? for this option). I'd not bother fixing grub though until its a problem.
The Ubuntu you have installed already probably was installed on an Ext4 file-system and this file-system can easily be shrunk to a smaller size with not need to relocate any data - assuming you regularly perform disk-defragmentation Operations. If you don't, you can use the e4defrag
tool in Ubuntu to perform the defragmantation.
For example, to defragment the /dev/sda1
partition, you can do the following:
sudo umount /dev/sda1
then after dismounting the partition, you can go ahead and perform the defragmentation. Since you are attempting to defragment the filesystem of you OS while it's running is a risky and possibly impossible job. You need to dismount your file-system before proceeding. Since you can not dismount the filesystem of the Ubuntu you are running, you need to make a live boot flash drive and boot from that. Use unetbootin
to make the live-boot drive - makes it much more reliable.
After booting from your live USB, open a root terminal and
sudo e4defrag /dev/sda1
## assuming the Ubuntu distro is on /dev/sda1
then wait for the process to finish, it's a bit time consuming so go get a cup of coffee;
after the defragmentation is complete, you can now go ahead and perform the shrinking the existing partition and creating an additional, new one.
N.B. the e4defrag
utility might report that there were some failures in the defragmentation operation; leave it be, in every filesystem, there are some files that simply can not be moved, because they should not be moved.
You now need to shrink your existing partition. To do this, open gparted
and Choose the disk /dev/sda
on the upper right hand corner of you gparted
window. After this right click on /dev/sda1
in the main window area and in the context menu that appears, choose Resize/Move
. Then use the button circled in the image below to resize the partition to a smaller size and after you choose a size you are comfortable with, i.e. leaving some free space for the already existing Ubuntu to work with, you can go on and click on the Resize/Move
button. After doing this you will return to the main gparted
window and from there click on the edit
menu and Choose Apply All Operations
.
You now have shrunk your existing partition and can create a new additional partition. To create a new partition on the unallocated space, click on the partition
menu in the gparted
window. Then choose New
. In the window that follows, configure the partition with the filesystem type, size and label that you want and Click on Add
. Then goto the edit
menu and Choose Apply All Operations
.
Voila, you now have two partitions.