How to Use GParted to Partition Your Hard Drive

Creating Linux partitions made easy with GParted

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.

Unfortunately, this gives the wrong impression that Linux is difficult to install. The truth is though that Linux is the only operating system that provides the option for dual booting. It's 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.

GParted screenshot

The best Linux based tool for partitioning your hard drive is GParted and it's 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.

Screenshot of the GParted main screen

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

On a standard laptop, you will only see /dev/sda, which is the single 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 this shows the textual description for each of the partitions and includes the following information:

  • Partition: Partition type
  • Name: Name of the partition
  • File System: Type of file system.
  • Mount Point: Where the partition is mounted.
  • Label: The partition label.
  • Size: The byte size of the partition.
  • Used: How much of the partition is used.
  • Unused: How much of the partition is unused.
  • Flags: Any current error flags for each partition.


On older (before Unified Extensible Firmware Interface or UEFI) systems, Windows would generally use one large partition that took up the entire disk. Some manufacturers put recovery partitions on the drive, 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: Holds operating system and all system files.
  • Home: Location for user files like documents, music, and configuration settings.
  • Swap: Location for the file system to place inactive processes when it runs out of RAM space.

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 installation.

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. The easiest way to do this is to shrink the Windows partition.

On a Windows computer, you would use the Disk Management utility to do this. Right-click on the Windows partition (it's is the large NTFS partition) and select Shrink Volume from the menu.

Screenshot of shrinking windows partition in Windows

A new window will appear with the following options:

  • Total size before shrink
  • Size of available shrink
  • Amount of space to shrink
  • Total size after shrink

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 for a Linux installation.

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.

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

Screenshot of creating a new partition in GParted

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.

Screenshot of Create as in GParted

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 Volume. 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.

Screenshot of deleting a partition in GParted

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.

Screenshot of partition information in GParted

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.