How to Use GParted to Partition Your Hard Drive

GParted screenshot

SF007/Wikimedia Commons/Public Domain 

The main issue new users have when installing Linux is handling the concept of partitioning the hard drive. People who try Linux for the first time quite often want to dual boot with Windows so they have a familiar safety net. The trouble is that dual booting is technically slightly more difficult than installing Linux straight to the hard drive as the only operating system.

This, unfortunately, gives the wrong impression that Linux is difficult to install. The truth is though that Linux is the only operating system providing the option for dual booting. It is virtually impossible to install Linux first and then install Windows as the secondary system.

The main reason is that Windows wants to be the dominant party and take up the whole drive.

The best Linux based tool for partitioning your hard drive is GParted and it is available on most live images of Linux distributions.

This guide explains the user interface and provides an overview of the different partition types. 

The User Interface

GParted has a menu at the top with a toolbar underneath.

The main interface, however, has a graphical representation of the selected disk as well as a table listing all of the partitions.

In the top right corner, you will see a dropdown list which defaults to /dev/sda. The list contains a list of available drives.

On a standard laptop, you will only see /dev/sda which is the hard drive. If you insert a USB drive it will be added to the list as /dev/sdX (i.e /dev/sdb, /dev/sdc, /dev/sdd).

Rectangular blocks (some little, some big) stretch across the screen. Each rectangle represents a partition on your hard drive.

The table underneath shows the textual description for each of the partitions and includes the following information:

  • Partition
  • Name
  • File System
  • Mount Point
  • Label
  • Size
  • Used
  • Unused
  • Flags


On older systems (pre-UEFI) Windows would generally take up one large partition that took up the entire disk. Some manufacturers put recovery partitions on the drive and so you might find that older computers had 2 partitions. 

To make room for Linux on pre-UEFI computers you could take the Windows partition and shrink it using GParted. Shrinking the Windows partition would leave an area of unallocated space which you could then use to create Linux partitions.

A fairly standard Linux setup on a pre-UEFI computer would include three partitions:

  • Root 
  • Home
  • Swap

The root partition would be where you would install Linux, the home partition stores all your documents, music, videos and configuration settings. The swap partition would be used to store inactive processes, freeing up memory for other applications.

To dual boot Windows XP, Vista and 7 with Linux you would have the following four partitions (five if you kept a recovery partition):

  • Windows
  • Root
  • Home
  • Swap

On UEFI based systems it is common to have multiple partitions even if you are just running Windows 8 or 10.

On a UEFI based computer, you must have an EFI system partition. (512 MB in size). This is generally where you install the GRUB bootloader to when prompted by the Linux installed.

If you plan on dual booting with Windows then you will need the following partitions:

  • EFI
  • Windows (NTFS)
  • Linux Root Partition (i.e. EXT4)
  • Swap

You might choose to add a home partition as well but this is really non-essential nowadays. The requirement for a swap partition is up for debate as well.

Resizing Partitions

In order to install Linux to its own partition, you will need to make space for it and the easiest way to do this is to shrink the Windows partition.

Right-click on the Windows partition (It is the large NTFS partition) and select Resize/Move from the menu.

A new window will appear with the following options:

  • Free space preceding
  • New Size
  • Free space following
  • Align to

Be very careful when moving partitions. 

The most important thing to note is the message stating the minimum size for the partition. If you go below the minimum size you will destroy any operating system that currently resides on the partition.

To resize the partition enter a new size in megabytes. Generally, you need a minimum of 10 GBs but really you should allow at least 20 GBs and preferably 50 or more GBs.

A gigabyte is 1000 MBs (or 1024 MBs to be exact). To resize a partition which has 100 GBs to be 50 GBs in size and therefore leaving a 50-GB section of unallocated space enter 50000.

All you need to do then is click resize/move.

How to Create New Partitions

To create a new partition you must have some unallocated space.

Click on a partition of unallocated space and click the + symbol on the toolbar or right-click and select new.

A new window appears with the following options:

  • Free space preceding
  • New size
  • Free space following
  • Align to
  • Create as
  • Partition name
  • File system
  • Label

Generally, you are interested in the new size, create as, name, file system, and label.

The new size box defaults to the full amount of unallocated space. If you intend to create two partitions (i.e. a root and a swap partition) you will need to reduce the size to allow for creating the second partition.

The create has three possible types:

  • Primary
  • Logical
  • Extended

On older machines, you can have up to four primary partitions but on UEFI based machines you can have more.

If you already have four primary partitions on an older computer then you can create a logical partition within one of the primary partitions to use with Linux. Linux can boot from logical partitions.

The partition name is a descriptive name for the partition.

The file system can be one of the following:

  • btrfs
  • exfat
  • ext2
  • ext3
  • ext4
  • f2fs
  • fat16
  • fat32
  • hfs
  • hfs+
  • lfs
  • swap
  • lvm2
  • ntfs
  • reiser2
  • ufs
  • xfs

For the main Linux partition it is fairly standard to use an "ext4" partition and obviously, a swap partition would be set to swap.

Deleting Partitions

You can delete an unused partition by right clicking and selecting delete. This is useful if you have installed Linux and you wish to delete it. Alternatively, you can also click the circle with a line through it icon.

After deleting the Linux partition you can resize the Windows partition so that it uses the unallocated space left behind after deleting the partition.

Formatting Partitions

You can format a partition by right-clicking the partition and selecting Format To. You can then choose any of the partition types listed earlier.

Partition Information

You can get more information about a partition by right-clicking a partition and selecting Information.

The information provided is similar to that in the main table but you will also be able to see the start and end cylinders. 

Committing Changes

Creating partitions, shrinking partitions, formatting partitions and deleting partitions all occur in memory until you commit the changes. This means you can play around with the partitions on your drive without breaking anything. If you have made a mistake you can simply select the Clear All Operations menu option from the Edit menu.

To commit the changes either press the tick on the toolbar or choose the Apply All Operations menu option from the Edit menu.