DevOps · K8s · Volleyball · Travel  •  DevOps · K8s · Volleyball · Travel  •  DevOps · K8s · Volleyball · Travel
Explore NY Stream

How To Resize And Create Partitions With Gnome Partition Editor (GParted)

— ny_wk

How To Resize And Create Partitions With Gnome Partition Editor (GParted)

GParted (the GNOME Partition Editor) is a free, graphical tool for resizing, moving, creating, and deleting disk partitions on Linux without reformatting the whole drive. This guide walks through shrinking a partition to free space, growing a partition into that space, and carving out a brand-new partition the safe way: from a bootable live medium, after a verified backup.

Editing a partition table rewrites the metadata that tells your computer where every filesystem begins and ends. Done carefully, it is routine. Done on a mounted, in-use system partition, it can corrupt data or leave a machine unbootable. The single most important habit is simple: back up first, then never touch a partition that is currently mounted.

The Problem: You Need More Space (or Fewer Partitions)

Disk layouts rarely stay ideal. A few months in, you discover your root partition is nearly full while a neighboring data partition sits half empty, or you want to dual-boot a second operating system and have no unallocated space to install it into. Reinstalling everything to fix the layout is a waste of a day. Resizing partitions with GParted lets you reshape the disk in place, preserving the filesystems and the data inside them.

Typical jobs GParted handles cleanly:

  • Shrink a large partition to release unallocated space.
  • Grow an adjacent partition into freshly freed space.
  • Move a partition along the disk so free space lands where you need it.
  • Create a new partition (for data, swap, or another OS) in unallocated space.
  • Delete, label, set a new UUID, or copy and paste a partition.

GParted understands a wide range of filesystems, including ext2, ext3, ext4, btrfs, xfs, fat16, fat32, ntfs, linux-swap, lvm2 pv, and more. The catch is that it can only safely resize a filesystem when nothing is using it, which is why the preparation below matters as much as the clicking.

Why You Must Never Resize a Mounted or System Partition

When a partition is mounted, the kernel and running programs are reading and writing to it constantly. If GParted moves the block where a file lives while the OS still thinks that file is somewhere else, you get silent corruption. Worse, your root (/) and boot partitions are mounted the entire time the system is running, so you can never safely shrink or move them from inside that same running system.

The reliable solution is to operate on the disk while the operating system on it is not running. You do that by booting from a separate GParted Live USB (or CD/ISO). The live environment runs entirely in RAM, leaves every partition on your hard disk unmounted, and gives GParted full, exclusive access to the disk.

  • Resizing/moving the root or boot partition: always use a live USB. No exceptions.
  • Resizing a non-system data partition: you can sometimes do it live by unmounting that one partition first, but a live USB is still safer.
  • Creating a new partition in unallocated space: lower risk, but a live USB removes the chance of touching anything mounted by accident.

Step 1: Prepare Before You Touch Anything

Preparation is where you prevent disasters. Do not skip it because the task looks small.

  1. Back up your data, verified. Copy everything irreplaceable to an external drive or cloud storage, then open the backup and confirm the files actually open. A backup you have not tested is a guess, not a safety net.
  2. Note your current layout. From a terminal run lsblk -f and sudo fdisk -l and write down each partition's device name, size, filesystem, and mount point. You will recognize your partitions instantly in GParted instead of guessing.
  3. Know your partition table type. Run sudo parted /dev/sda print and look at the Partition Table line: it will say msdos (that is MBR) or gpt (GPT). This affects how many partitions you can create (see pitfalls).
  4. Create the GParted Live medium. Download the GParted Live ISO from the official project, then write it to a USB stick with a tool such as balenaEtcher, Rufus, or dd. You need a machine with at least 128 MB of RAM to use every feature.
  5. Close down and unmount. If you must work without rebooting (data partitions only), unmount the target first with sudo umount /dev/sdaX. For root or boot partitions, do not try; reboot into the live USB instead.
  6. Make sure you are on mains power. A laptop that dies mid-write to the partition table can leave the disk in a half-modified, unbootable state.

Step 2: Boot Into GParted Live and Launch the Editor

With the live USB created, reboot the machine and tell the firmware to boot from it.

  1. Insert the GParted Live USB and restart. Press the boot-menu key during startup (commonly F12, F10, F2, Esc, or Del depending on the vendor) and select the USB device. On VMs, attach the ISO to the virtual machine and reboot so it boots off the virtual CD.
  2. At the GParted Live boot menu, choose the default option to boot the live image.
  3. Accept the prompts for keymap and language (the defaults are fine for most people), then choose to start the graphical session. GParted opens automatically.
  4. In the top-right corner of GParted, use the device dropdown to select the disk you want to edit, for example /dev/sda. The main window shows a colored bar of every partition plus a table listing size, used space, filesystem, and flags.
  5. Confirm nothing has a key icon (the key means the partition is mounted). If a partition shows a key, right-click it and choose Unmount before doing anything else. You cannot resize a mounted partition.

Step 3: Shrink a Partition to Free Up Space

To grow one partition or create a new one, you usually need unallocated space first. You get it by shrinking an existing partition that has room to spare.

  1. Right-click the partition you want to shrink and choose Resize/Move.
  2. In the dialog, drag the right edge of the partition bar inward, or type a smaller value into the New size (MiB) field. The Free space following field shows how much unallocated space you are creating.
  3. Leave a comfortable margin. Never shrink a partition down to its exact used size; keep headroom so the filesystem stays healthy.
  4. Click Resize/Move. GParted queues the operation but does not execute it yet, so you can still cancel.

Important: shrinking moves the boundary of where data can live. GParted handles this safely only when the partition is unmounted, which is exactly why you booted the live USB.

Step 4: Grow a Partition Into Free Space

To enlarge a partition, the unallocated space must sit directly next to it. If the free space is on the wrong side, you may need to move the partition first (a slower operation that physically relocates data).

  1. Right-click the partition you want to enlarge and choose Resize/Move.
  2. Drag the edge of the partition bar outward into the adjacent free space, or increase the New size (MiB) value to consume the unallocated area.
  3. Keep the partition aligned to MiB (GParted's default), which keeps it on proper boundaries for modern drives and SSDs.
  4. Click Resize/Move to queue it.

Step 5: Create a Brand-New Partition

Once you have unallocated space, you can turn it into a usable partition.

  1. Right-click the gray unallocated block and choose New.
  2. Set the New size (drag the handles or type a value), and leave Align to: MiB selected.
  3. Choose Create as: Primary Partition, Extended Partition, or Logical Partition. On MBR disks you are limited to four primary partitions, so use an extended partition to hold additional logical ones. On GPT this distinction does not apply.
  4. Pick a File system from the dropdown (see the table below).
  5. Optionally type a Label so the partition is easy to recognize later.
  6. Click Add to queue the new partition.

Choosing the Right Filesystem

FilesystemBest for
ext4General-purpose Linux root and data partitions; the safe default.
btrfsSnapshots, checksums, and advanced volume management.
xfsVery large files and high-throughput workloads.
linux-swapDedicated swap space for memory paging and hibernation.
fat32Cross-platform USB drives and EFI system partitions.
ntfsPartitions shared with Windows.

Step 6: Apply Your Changes

Nothing has been written to disk yet. Everything you queued lives in a pending operations list at the bottom of the window. This is your last chance to review.

  1. Read the pending operations list carefully and confirm every line is what you intended.
  2. Click the green Apply All Operations checkmark in the toolbar (or Edit > Apply All Operations).
  3. Read the confirmation warning and click Apply only when you are certain.
  4. Do not interrupt the process. Moving and resizing large partitions can take a long time. Do not close GParted, unplug anything, or power off. Let it finish.
  5. When it reports success, close the dialog. You can save the details to a log file if you want a record.

When GParted Cannot Help: Expanding the Underlying Disk First

GParted can only rearrange the space a disk already has. If the disk itself is too small, for example a virtual disk on a VM, you must enlarge the virtual disk before GParted has any free space to work with. Sometimes the VM's GUI will not let you expand the disk because the controller is set to IDE. In that case, shut the VM down and grow the virtual disk from the hypervisor command line, for example:

vmkfstools -X 20G myvm-disk.vmdk

The VM must be powered off, or the operation fails with a file-lock error such as Failed to extend disk: Failed to lock the file. After the virtual disk is larger, boot back into GParted Live and use the steps above to grow a partition into the new space. If a primary partition is stubborn, an alternative is to attach the disk to another VM as a secondary disk and expand it there.

Common Pitfalls That Cause Data Loss

  • Editing a mounted partition. The number-one cause of corruption. Always unmount, or boot a live USB.
  • No tested backup. Partition operations are mostly safe, but "mostly" is not "always." Hardware faults and power loss happen.
  • Interrupting Apply. A half-finished move leaves the partition table inconsistent. Never cut it short.
  • MBR partition limits. MBR (msdos) supports only four primary partitions and a maximum disk size of 2 TiB. If you need more, create an extended partition for logicals, or convert to GPT.
  • Ignoring alignment. Misaligned partitions hurt SSD and advanced-format drive performance. Keep GParted's Align to: MiB default.
  • Forgetting the bootloader. Moving the boot or root partition can change device paths and break GRUB. Be ready to reinstall the bootloader from the live environment if the machine will not boot afterward.
  • Resizing across an LVM or encryption layer. If the partition holds an LVM physical volume or a LUKS container, resize the inner layer with the right tools, not just the outer partition.

Verify the Result

After applying changes and rebooting back into your normal system, confirm everything matches what you intended. Open a terminal and run these checks.

  1. lsblk -f — lists every block device with its size, filesystem, and mount point. Confirm the new sizes and that your new partition appears.
  2. df -h — shows mounted filesystems and their available space. The grown partition should now report more free space.
  3. sudo parted /dev/sda print — verifies the partition table and the start/end of each partition.
  4. For a new partition, create a mount point and mount it, for example sudo mkdir /mnt/data && sudo mount /dev/sda3 /mnt/data, then confirm you can read and write a test file.
  5. To mount it automatically at boot, add an entry to /etc/fstab using the partition's UUID (find it with blkid), which is more reliable than the device name.

Key Takeaways

  • Back up first and verify the backup before you touch any partition.
  • Never resize or move a mounted partition; boot the GParted Live USB so root and boot are unmounted.
  • Operations are queued, not instant — review the pending list, then click Apply All, and never interrupt it.
  • Know whether your disk is MBR or GPT; MBR caps you at four primary partitions and 2 TiB.
  • Confirm results afterward with lsblk, df -h, and parted print, and use UUIDs in /etc/fstab.

Frequently Asked Questions

Can GParted resize partitions without losing data?

Yes, resizing and moving are designed to preserve the data inside the filesystem, provided the partition is unmounted and the operation completes without interruption. Power loss, hardware failure, or editing a mounted partition can still cause loss, so a tested backup is essential every time.

Why is my partition greyed out and not resizable in GParted?

A key icon next to the partition means it is currently mounted, and GParted will not resize it. Right-click and choose Unmount, or, for the root and boot partitions of the running system, reboot into a GParted Live USB where nothing on the disk is mounted.

Do I need a live USB to use GParted?

For non-system data partitions you can install GParted on a running Linux system and resize them after unmounting. For the root or boot partition, you cannot unmount the running system, so a live USB is the only safe option.

What is the difference between MBR and GPT for new partitions?

MBR (shown as msdos) allows only four primary partitions and disks up to 2 TiB; extra partitions must be logical, inside an extended partition. GPT supports many more partitions and far larger disks and is the modern standard for UEFI systems.

Found this helpful? Subscribe to @explorenystream on YouTube for more Linux and system administration walkthroughs.