How to manage disk partitions without losing data in GParted

Last update: 28/01/2026
Author Isaac
  • GParted uses file system-specific tools (such as e2fsck and resize2fs) to resize and move partitions while minimizing the risk of data loss.
  • Operations accumulate in a queue and are only applied upon confirmation, allowing you to review, undo, or cancel changes before writing to disk.
  • Using a Live CD/USB with GParted makes it easier to modify system partitions and repair problems. Boot, relying on TestDisk and PhotoRec if partitions or data are damaged.
  • Alternatives like EaseUS Partition Master offer similar features in WindowsHowever, a prior backup is still essential in any partition manager.

Partition management with GParted

When we start tinkering with partitions, many of us have the same question: How is this possible? Shrink or move a partition with GParted without losing dataAt first glance it sounds crazy, because we associate “cutting” a partition with “deleting” its contents, but the trick is in how the data blocks and file system metadata are managed.

In this article we will see How to manage disk partitions with GParted while minimizing the risk of data lossWhat the tool actually does underneath, how to use it from an installed system or from a Live CD/USB, what problems can occur (including messing up GRUB) and how to solve them, and also what alternatives exist when GParted falls short or you don't feel comfortable using it.

What is GParted and what can it do for your discs?

GParted Partition Editor

GParted (GNOME Partition Editor) is a graphical partition editor designed to create, reorganize, and delete partitions on hard drives and SSD without having to fight with the line commandsIt works in graphical mode (GUI) and can also be launched from the console by specifying which devices you want to manage.

A single physical disk can be divided into several partitions, and GParted allows you to change that organization while keeping the content whenever possible.: resize, move, copy, create, delete and forma tear partitions on the fly, plus managing flags, tags, and UUIDs.

The interface consists of two main display areas: an upper bar graph and a lower tableIn both, you'll see the partitions, unallocated space, file system, size, used and free space, and the mount point if available. Left-clicking selects a partition or free space; right-clicking opens a context menu with the most common actions.

As with many GNOME programs, Almost all actions can be launched from the menu, the icon bar, or via keyboard shortcutsIn addition, GParted can work with multiple disks at once: from the device list you choose /dev/sda, /dev/sdb, etc., and the partition scheme of the selected disk is updated in the main window.

Another important detail is the handling of pending operations: GParted doesn't apply anything immediately; it accumulates changes in a queue.Only when you press the "Apply" button are all the operations executed in order, allowing you to review, undo the last action, or empty the queue before actually touching the disk.

Why GParted can shrink a partition without losing data

The big question is how does GParted manage to work its magic and shrink a partition while keeping the data intactThe key is that GParted does not work directly on the low-level structure of the file system, but rather delegates to tools specific to each type of file system.

For ext2, ext3 and ext4 systems, for example, GParted relies on utilities such as e2fsck, resize2fs, and e2imageEach one fulfills a very specific function within the process of safely resizing the partition and the file system it contains.

The typical simplified sequence would be something like this: first, the file system is checked with e2fsck, Then its size is adjusted with resize2fs and, if necessary, the data blocks are relocated. so that they fit within the new partition boundary before modifying the partition table.

In essence Reducing does not mean arbitrarily deleting data, but rather moving used blocks towards the beginning of the partition and ensure that the new size respects the internal metadata (inodes, bitmaps, superblock, etc.). Only when the file system is already "compacted" is the partition shortened in the partition table to match that new size.

Where does e2image fit into all of this? This tool can Save a copy of the critical metadata of an ext2/3/4 file system to an image fileIt is very useful as an extra layer of security if you are going to perform delicate operations, because it allows you to recover internal structures if something goes wrong during a resizing or data movement.

Key tools: e2fsck, resize2fs, and e2image

To truly understand how data loss is prevented, it is helpful to review what each of the utilities that GParted relies on does when working with ext file systems.

e2fsck It's the utility for checking and repairing ext2/3/4 file systems. Before resizing, GParted usually calls it so that Verify the integrity of the file system, repair logical errors, and mark bad sectors.This greatly reduces the risk of resize2fs working on corrupted structures or damaged blocks.

resize2fs It is the tool responsible for resizing the ext file system. It can expand or shrink unmounted file systems on a device, adjusting both the metadata and the block distribution. When you shrink, it ensures that there is no data beyond the new limit before shortening.

For its part, e2image generates a snapshot of critical metadata (superblocks, inode tables, etc.) of the file system in an image file. It is not mandatory to use it, but it is highly recommended in critical scenarios, because it allows you to rebuild the file system in case of disaster using advanced tools.

When GParted works with other file systems (NTFS, FAT, XFS, etc.), Use the equivalent tools for each projectFollowing the same principles: check, reorganize, resize, and only then adjust the partition table. That's why "shrinking" doesn't automatically mean "losing data."

Booting GParted: from the system or with Live CD/USB

GParted can be run as an application installed on your GNU/Linux distro, or boot from a Live CD/USB that already includes itMany Live environments integrate it, and there is also an official "GParted Live" image ready to burn to CD or USB.

  Easy methods to Cut back Transparency on Mac

Using a Live has several clear advantages: The installed system is not using (or mounting) the partitions you want to modify.This allows for much safer operations on /, /home or even the entire disk without conflicts of files in use.

In general, the process for working with GParted Live would be:

  • Download the GParted Live ISO image from the official website or from a reliable mirror.
  • Create the boot medium (CD/DVD or USB) burning the ISO.
  • Start the team from the middle and select the “GParted Live (default settings)” option in the start menu.
  • Choose the keyboard suitable for your language.
  • Select the session language (default is US English, but you can choose Spanish without any problem).
  • Select operating mode, where the normal thing is to leave the GUI mode (usually option 0).

Once the GParted Live graphical environment has loaded, All detected disks and partitions will appearThere you can start resizing, moving, creating or deleting whatever you need, always taking care to double-check before applying the changes.

Understand the interface and select the correct disk

In the top right of the main window you have a device selector that allows you to switch between /dev/sda, /dev/sdb, /dev/sdc, etc. Each one represents a physical disk (internal or external, IDE, SATA, SCSI or USB) that the system has detected.

In the graphical section above you will see colored blocks representing partitions and unallocated spaceJust below, the table details for each entry the file system, size, used and free space, partition identifier (/dev/sda1, /dev/sda2, …) and active flags.

En LinuxDiscs are often seen as /dev/sda, /dev/sdb, etc., and partitions like /dev/sda1, /dev/sda2…For example, in a typical dual-boot configuration you might have:

  • / Dev / sda1: Windows reserved partition (NTFS).
  • / Dev / sda2: Windows main partition (NTFS).
  • / Dev / sda3: Linux root partition (ext4).
  • / Dev / sda4: extended partition to contain logical partitions.
  • / Dev / sda5: swap partition (logical within the extended partition).

In the view, mounted partitions that you cannot easily modify are shown with a key iconTo operate on them you will have to unmount them or deactivate the swap area in the case of the swap.

Create, delete, format, and name partitions

Before getting into moving or reducing, it's important to understand how the basic operations are performed. Create, delete, and format partitions It's as simple as selecting the corresponding area and using the context menu.

To delete a partition:

  • Select the partition in the graphic bar or in the table.
  • Right-click and choose “Delete”.
  • The partition will appear as “unallocated” but The change will only be a pending operation until you press “Apply”.

To format a partition with a different file system (NTFS, FAT32, ext4…):

  • Select the partition you want to format.
  • Right-click > “Format to”.
  • Choose the new file system.
  • Check that there is no important data, because it will be lost. when formatting.

If you would like to create a new partitionYou need space marked as “unallocated”:

  • Click on the unallocated free space area.
  • Right click > “New”.
  • Configure partition type (primary or logical), file system, size, position, and label.
  • Add the operation to the queue and press "Apply" when you have everything ready.

In addition to creating and formatting, you can assign a name to the partition, set a file system label, and change the UUIDIt is recommended to use labels or UUIDs to mount partitions in fstab, because device names (/dev/sdaX) can change if you modify the partition table or add new disks.

Mount, unmount, and manage partitions in use

A very common mistake when starting with GParted is to try resize or delete partitions that are mounted and in useThe program itself warns you by blocking many operations and displaying the key icon on those partitions.

To be able to act on a partition, you will normally have to:

  • Unmount it from GParted (right click > Unmount) or manually from the command line.
  • In the case of the swap partition, use the option to deactivate it (right click > “Swapoff”).
  • Avoid using /home with logged-in users If you want to modify that partition from the running system; in some cases it's advisable to log in as root so that /home is not in use.
  • To access the root partition /, The best option is to use a Live CD/USB. so that the installed system is neither started nor mounted.

Once you dismantle everything necessary, GParted lets you resize, move, or delete without system interference.However, any error or power outage in the middle of a data transfer can leave you with an incomplete file system, so backups are still essential.

Resize: requirements, alignment, and partition details

To resize a partition correctly, it is essential to understand several physical and logical limitations. You can only extend a partition using contiguous free spaceIf the gap isn't glued, you'll have to move other partitions first.

In the resize/move dialog, GParted allows Adjust the partition size by entering numerical values ​​or dragging the block edges which represents the partition. When you modify it, you'll see how the "free space before", "new size", and "free space after" fields change.

The option of “Align to” It allows you to choose how the partition will be aligned on the disk: by default, it's usually aligned to MIB, which is recommended for performance and SSD compatibility. There is a "None" option that You should only use it if you have a thorough understanding of partitioning and boot structures.because it could leave no room in critical areas such as the starting area.

You can also specify in that same dialog whether the partition will be primary, logical or extended (in the case of creation), as well as the partition name, the file system type and the label you want to appear when mounting it.

  CleanMyMac X Tutorial: Clean, Speed ​​Up, and Protect Your Mac

Changing these parameters can affect how the operating system detects and mounts the partition, so It's not advisable to do this lightly if you already have a system installed and working.In particular, tampering with the partition where /boot or the Windows boot process is located can prevent the computer from booting until the boot loader is repaired.

How to shrink or expand partitions without losing data

The operation of Resize a partition (Resize/Move) combines resizing and, if necessary, moving data.GParted can do both in a single operation, although several steps are executed internally.

In the case of wanting shrink a partitionThe approximate flow is:

  • Check the file system (for example with e2fsck on ext4).
  • Use the specific resizing tool (resize2fs, ntfsresize, etc.) to Adjust the file system to a smaller size, ensuring that no used blocks are left out. of the new limits.
  • Once the file system has been compacted, shorten the partition in the partition table up to that new size.

If what you want is extend a partitionThe process is somewhat simpler when the free space is contiguous: first the partition is extended and then The file system expands to occupy the new capacityAgain, GParted pulls the appropriate utility depending on the file system.

The greatest risk comes when Data needs to be moved within the partition to compact it before shrinking it.This process can be lengthy, especially with large, full disks, and it's critical that it isn't interrupted. If there's a power outage or system crash during the migration, you could end up with an inconsistent file system.

Therefore, although GParted is designed to minimize data loss, It's a huge mistake to start resizing without a prior backup.If something is left unfinished (due to a crash, power outage, or physical disk failure), you can end up with an unrecoverable partition without professional recovery tools.

Practical example: redistributing space between / and /home

A very common case is that of someone who installed their Linux distro by distributing the space "haphazardly" and, after There, It finds that /home is full while / has plenty of space, or vice versaFortunately, with GParted you can fix that distribution without reinstalling the system.

Imagine a dual-boot disk where you have:

  • / Dev / sda1- Reserved for Windows encryption.
  • / Dev / sda2: main partition of Windows 7.
  • / Dev / sda3: extended partition containing swap, /, /home and 30 GB unallocated.

If /home is running out of space but You have 30 GB unallocated within the same extended partitionYou could follow a strategy like this (simplifying steps):

  • Expand the extended partition to include the 30 GB of free space.
  • Add part of that space to /home, provided the gap is adjacent.
  • If necessary, move /home inside the extended so that the rest of the space is right next to the root /.
  • Extend the root partition / with the space that has been left adjacent after moving /home.

The order and specific details depend on how the partitions are physically positioned, but the basic idea is that You can only add space that is adjacent to the target partitionWhen it is not, you have to move entire partition blocks, a slower operation but equally possible with GParted.

As a final touch, it's always good to use the option of “Check” (Verify) the partitions you have touched so that GParted can launch the file system verification tools and ensure that everything is in order after the partitioning process.

Flag handling, checking, and operation queuing

Beyond size, GParted allows manage partition flags such as “boot”, “esp”, “lvm”, etc. From the context menu of a partition you can open the flags dialog and check or uncheck options depending on what you need (for example, to indicate a boot partition).

The option of “Check” It attempts to locate and correct problems in the file system, and in some cases, it expands the file system to fill the entire partition if it wasn't already doing so. It's useful for maintenance and especially recommended after resizing or moving operations.

Regarding the operations queue, remember that Every action you take (create, delete, move, resize) is added to a list of pending operations.. You may:

  • Undo the last operation (“Undo last operation”) if you regret a change.
  • Clear all operations (“Clear all operations”) to return to the original state without touching the disk.
  • Apply the entire glue (“Apply all operations”) so that they are executed in order.

During execution, GParted displays a progress dialog box. If operations are slow or stuck, after a few seconds A “Force Cancel” button appearsUsing it is very tricky: it forces cancellation and can leave operations unfinished. The program itself then offers to continue the rollback steps or cancel them, which can further complicate the situation.

After completing all operations, You can save a detailed report of what has been done in a text file. Clicking “Save Details” closes the dialog box, GParted rescans all disks, and updates the view to reflect the new partition layout.

Using Live CDs and recovery tools (TestDisk and PhotoRec)

Un A Live CD (or Live USB) is a bootable medium that contains a complete, ready-to-use operating system without installation.Many Live installations come with GParted, and the official GParted Live image itself is a prime example. Booting from there, the system disk can be manipulated even when it's not in use.

The great advantage of this approach is that You can operate on partitions that would be mounted during a normal boot., such as /, /boot, or even Windows partitions in use. It also usually includes extra tools designed for disk emergencies and data recovery.

If you ever corrupt the partition table or Entire partitions disappear due to an errorOne of its best assets is TestDisk. This utility, available in many Live systems, is designed for Recover lost partitions and rebuild damaged partition tables analyzing the disk for coherent remnants of partitioning structures.

  Command Keyboard Guide: How to Undo or Redo Actions in Word Text

When there is no longer a usable partition table, or when the partitions are so damaged that they cannot be mounted, you can resort to PhotoRec, specializing in recovering files of many types (photographs, documents, etc.) searching for data patterns on the raw disk without relying on the logical structure of the file system.

Both TestDisk and PhotoRec are usually included in the same Live images that incorporate GParted, so You have tools in the same environment for partitioning, repairing, and attempting to recover lost data. if things go wrong.

Boot problems: repair GRUB after modifying partitions

When moving or resizing partitions, It's not uncommon for the system to stop booting.This can happen if you change the boot location of a partition where the boot manager was installed, if the partition order is altered, or if GRUB itself is moved.

If your computer uses GRUB as its boot loader, the first thing to know is whether Are you using GRUB 2 or GRUB Legacy?Most modern distributions (Debian, Ubuntu and derivatives, Fedora, openSUSE, etc.) use GRUB 2 by default.

To Restore GRUB 2 From a Live environment (simplifying steps) you usually do something like this:

  • Create a mounting point, for example /tmp/mydir.
  • Mount the partition where the system is located at that point (let's say /dev/sda5).
  • If there is a separate /boot partition (for example /dev/sda3), mount it in /tmp/mydir/boot.
  • Bind mount /dev, /proc and /sys to their equivalents within /tmp/mydir.
  • Enter a chroot environment on /tmp/mydir.
  • Run grub-install / dev / sda (or grub2-install, depending on the distro) to reinstall the loader on the disk.
  • Exit chroot and reboot.

In the case of GRUB LegacyThe process is different: the grub interpreter is launched from the console, and the command “find /boot/grub/stage1” or “find /grub/stage1” is used to locate the boot partition, The appropriate root (hd0,0) is defined and setup (hd0) is executed to reinstall GRUB on the MBR (or in the partition, depending on what you want).

Once reinstalled and with the partitions in place, The system should restart normally.If you use a boot manager other than GRUB, you'll need to consult its specific documentation to see how to restore it after partitioning changes. Also, keep in mind the potential need to manage the EFI/ESP partition when working with UEFI systems and Windows boot.

Delete all partitions on a disk to recycle it

In environments such as educational centers or companies, it is common Recycle hard drives from broken computers to install them in other computersIn that case, the normal thing is to want to delete everything: data, OS and partition scheme, leaving the disk clean for a new installation.

With GParted, the procedure is very straightforward when the disk It has a single partition:

  • Start GParted and select the disk in the device selector.
  • You click on the partition (for example /dev/sda1) and choose “Delete”.
  • The record will now be displayed as “unallocated”.
  • You confirm the operations with the apply changes button.

If the disc It has several partitions (Let's say two NTFS partitions, one ext4 partition, and one Linux-swap partition), you can delete them one by one, starting with the one furthest to the right in the graphical representation. Like this:

  • Select the last partition (for example, the swap partition), right-click > “Delete”.
  • Repeat with the next one (for example /dev/sda3), and so on until you remove /dev/sda1.
  • You will see that pending deletion operations accumulate at the bottom.
  • When you press “Apply”, GParted Perform all deletions and leave the disk completely unpartitioned..

Once this is done, The disk appears as unallocated space ready to create the new partitioning scheme that best suits the intended use: a single large partition, separate system and data, etc.

Alternatives to GParted: EaseUS Partition Master and others

Although GParted works on Linux, Windows, and macOS through its Live version, It is not always the most convenient tool for Windows users who prefer an environment fully integrated into their system.Additionally, certain operations (such as expanding partitions on NFS or very large systems) can sometimes be slow.

A fairly popular alternative in the Windows world is EaseUS Partition Master FreeThis free graphical tool allows you to:

  • Resize and move partitions quite intuitively.
  • Create and delete partitions without too many complications.
  • Convert disks between MBR and GPT according to the needs.
  • Migrate or transfer the system to another disk, and facilitate the transition from HDD to SSD.

The strong point of EaseUS is that It is very much geared towards Windows users who don't want to boot from an external Live environment.However, for GNU/Linux environments and for more advanced tasks, GParted remains a very solid reference, especially when combined with the low-level utilities of each file system.

In any case, whether you choose GParted or an alternative manager, The philosophy should always be the same: understand what you're doing, plan operations, use verification tools, and have backups. before touching on anything serious on the album.

Mastering GParted and the utilities behind it allows you to manage disk partitions without losing data in the vast majority of situationsFrom redistributing space between / and /home to recovering a disk for use on another computer or fixing a broken boot; it's enough to follow good practices, be patient when moving large amounts of data and, above all, never forget that a backup Timely intervention is worth more than any partition editor, no matter how powerful.

clone disks and partitions
Related article:
How to clone hard drives with multiple partitions easily and safely