GParted: Complete Guide to Partiating Disks in Linux

GParted is a libparted-based graphic partitioning tool that allows you to create, remove, resize, move and copy partitions safely on hard drives, SSD and external drives.

What is GParted?

GParted, an acronym of GNOME Partition Editor, runs from a live environment or installed in the distribution and offers an intuitive interface that shows the real-time partition scheme. It follows the MBR and GPT partitioning standards and supports file systems such as ext4, NTFS, FAT32, exFAT, Btrfs and many more.

Installation

In most Debian / Ubuntu-based distributions it is enough to run:

  • sudo apt update
  • sudo apt install gparted

In Fedora and Red Hat derivatives:

  • sudo dnf install gparted

In Arch Linux and its variants:

  • sudo pacman -S gparted

It is also possible to download an ISO live GParted image from your official website and start it from USB or CD to work on computers without an installed operating system.

Main interface

When you launch GParted you will find a window divided into three main areas: the top menus bar, the device panel on the left and the partition display area in the center.

Each partition is shown with its file system type, size, used space and assembly points if appropriate.

The changes made appear in grey until applied, which allows you to review before confirming.

Common operations

  • Reedit / move: Drag the edges of the partition or specify new start and end values to increase or decrease its size.
  • Create new partition: select unassigned space, choose the file system and assign an optional label.
  • Remove partition: right click and choose the delete option; space becomes free.
  • Copy and paste: useful for migrating partitions between disks or creating backup.
  • Check: runs a file system integrity check before applying changes.
  • Formatting: changes the file system type of an existing partition.

Precautions and good practices

  • Always back up your important data before handling partitions.
  • Avoid redimensioning partitions containing the operating system in use; start from a live USB to work on them.
  • Verifies that the disk does not have physical errors by running tools likesmartctlbefore you split.
  • When working with GPT disks, make sure that the UEFI start base plate if you need to maintain the boot capacity.
  • Apply the changes only after reviewing the summary of outstanding operations; GParted shows a confirmation table that summarizes everything that will be done.

Advanced use and scribing

Although GParted was designed primarily as a graphic tool, its backend is based on libparted, which allows to run certain operations from the terminal by means of the commandpartedo scripts calling GParted in batch mode.

  • parted /dev/sdx resizepart N start endto resize a partition without a graphical interface.
  • gparted --helpshows the options available to run the GUI with debugging parameters.
  • You can create scripts that invoke GParted with the option--applyto apply previously saved changes to a status file.

Another advanced use is the alignment of partitions for SSD units. GParted allows to set a multiple start size of 1 MiB (2048 sectors) which improves the performance and life of the disk.

It is also possible to clone whole partitions using the copy and paste function within the interface, or byddif a copy is required at block level.

For production environments, it is recommended to test changes in a virtual machine or a test disk before applying them to critical servers.

FAQ

  • Can GParted resize NTFS partitions from Windows?Yes, as long as the file system is unmounted and has no errors; it is recommended to runchkdskbefore.
  • Is it safe to use GParted on discs with BitLocker or LUKS encryption?Not directly; you must first decipher the volume or work with the deactivated encryption layer.
  • What's the difference between GParted and the commandfdisk?GParted offers a graphic interface and handles more file systems, whilefdiskis a low-level line tool primarily oriented to MBR partitions.

These answers cover the most common doubts; for specific cases, see the official GParted documentation or the forums of its distribution.

Remember that constant practice and backup are the best allies when handling partitions.

This work is under aCreative Commons License Attribution 4.0 International for Francesc Roig francesc @ vivaldi.net.

EnglishenEnglishEnglish