Ubuntu – How to create a new partition with mountpoint by splitting an existing partition


How can I split an existing partition (NTFS) to get space for a new partition and create a mountpoint for it?

Best Answer

You need to boot from a live CD or USB and use gparted to partition your drive. It should be called something like Partition Manager in the System->Administration menu.

Read through this tutorial for gparted - it should tell you everything you need to be able to:

  1. Shrink the partition
  2. Create a new partition in the free space created by this action

You should take a note of the device path of the partition you create (eg. /dev/sda5). To mount this drive you can run this command:

sudo mount -t ext4 /dev/sda5 /path/to/mountpoint

Replace ext4 with the file system type, /dev/sda5 with the device path you noted down and /path/to/mountpoint with the file path you want it to be mounted to.

To permanently mount this partition, you need to edit /etc/fstab. Before you do, make a copy to back it up in case you mess it up somehow. To edit /etc/fstab, press Alt+F2 and enter gksudo gedit /etc/fstab. This will prompt you for your password and then open the file in the text editor.

Once opened, add this line to the end of the file:

/dev/sda5       /home           ext4    defaults        0       2

but obviously you need to use your specific information instead. Once you have done this, save and close the file. The partition will now be mounted to the specified path every time you start up the computer.

Related Question