Understanding the Partition Layout Constraint
The primary reason GParted refuses to extend a partition into adjacent free space is not a software bug but a fundamental rule of the Master Boot Record (MBR) and even some Extended Logical Drive structures. Partitions must be physically contiguous on the disk platter or SSD sectors to be extended directly. If you have created free space after your main Ubuntu partition, but there is another partition sitting between that free space and the target partition, GParted cannot simply "push" the boundary.
In many dual-boot setups involving Ubuntu 22.04 and Windows 10, the disk layout often includes a small Windows Recovery partition or a logical partition for swap that sits immediately after the root filesystem. When you shrink a partition or delete a large file system, the resulting unallocated space appears next to the partition. However, if a third partition exists further down the disk, the free space is not adjacent to the partition you wish to extend. GParted visualizes this as a gap, making the "Resize/Move" option grayed out or showing an error indicating that the free space is not immediately to the right of the partition table entry.
Identifying the Blocking Partition
Before attempting any fixes, you need to identify exactly which partition is obstructing the extension. Open GParted and look at the bar graph representation of your disk. Identify the partition you want to grow, then look to its immediate right. If you see unallocated space followed by another colored block (a partition), that block is the obstacle.
Common culprits include:
- Logical Partitions: In MBR disks, partitions beyond the first four are stored in an extended container. Moving these can be complex because they change the starting sector of subsequent logical drives.
- Windows Recovery Partition: These are often hidden or locked by Windows, preventing direct deletion but allowing movement.
- Swap Space: An older swap partition might sit between your root partition and new unallocated space.
Note that moving partitions is a time-consuming operation because it involves copying all data from one sector location to another. Ensure you have backed up critical data before proceeding, as power failures during copy operations can corrupt the file system.
Moving the Obstructing Partition
To resolve the issue, you must shift the blocking partition to the right, effectively swapping places with the unallocated space. This makes the unallocated space adjacent to the partition you actually want to extend.
- Select the Blocking Partition: Right-click the partition that is sitting between your target partition and the free space. Choose Resize/Move.
- Adjust the Position: In the dialog box, you will see a graphical representation of the partition. Click and drag the entire partition block to the right until it occupies the unallocated space. Alternatively, you can manually enter the new start sector value. The goal is to leave the unallocated space exactly where it was, but now positioned between your target partition and the moved partition.
- Apply Changes: Click OK. Then, click the green checkmark icon in the toolbar to apply the pending operations. Wait for the copy process to complete. This may take a significant amount of time depending on the size of the partition.
Once this operation finishes, your disk layout should show: [Target Partition] [Unallocated Space] [Moved Partition]. Now, the unallocated space is directly adjacent to the partition you intended to extend.
Extending the Target Partition
With the layout corrected, you can now perform the original task. Right-click the partition you originally wanted to grow and select Resize/Move. Drag the right edge of the partition bar into the unallocated space. Click OK and then apply the changes. GParted will now successfully extend the file system into the newly available sectors.
If you encounter errors related to "file system check" or "journal," ensure that the partition is unmounted. GParted usually handles this automatically if running from a live USB, but if working within an installed OS, you may need to disable swap or use a live environment. For more details on handling similar extension issues, see GParted Won't Let You Extend Partition? Here's How to Fix It.
Handling Dual-Boot Specifics
In systems booting both Ubuntu and Windows, be cautious about modifying the EFI System Partition (ESP) or the Windows Boot Manager partitions. While moving data partitions is generally safe, touching boot-critical areas can render the system unbootable. If your free space is located inside the ESP, do not attempt to extend Linux partitions into it; instead, consider resizing the ESP itself if necessary, though this is rarely recommended.
Additionally, after moving partitions, Windows might sometimes fail to boot if it relies on absolute sector addresses for its boot files, although modern UEFI systems are largely immune to this. If Windows fails to boot after moving partitions, you may need to use the Windows installation media to run startup repair. For guidance on managing dual-boot environments safely, refer to Dual Booting Ubuntu 22.04 and Windows 11.
Frequently Asked Questions
Why is the Resize button grayed out?
The resize option is disabled because the unallocated space is not immediately adjacent to the partition you selected. GParted requires contiguous sectors to extend a file system, so any intervening partition must be moved first.
Can I delete the blocking partition to save space?
You can only delete the blocking partition if it contains no essential data. Many users mistakenly try to delete Windows recovery partitions, which can break system repair capabilities. Always verify the partition type before deletion.
Does moving a partition erase my data?
No, moving a partition does not erase data. It copies the data to a new location on the disk and then updates the partition table pointers. However, it is always risky, so backup is strongly advised.
What if GParted says the file system is busy?
This occurs if you are trying to modify a partition that is currently mounted and in use by the operating system. Run GParted from a Live USB stick to ensure all partitions are unmounted and accessible.
Is this issue specific to MBR disks?
While most common in MBR due to logical partition limits, it can also happen in GPT layouts if multiple partitions exist between the target and the free space. The solution remains the same: move the intermediate partitions.