1 (edited by murray.g.davis 2023-01-12 19:43:14)

Topic: [SOLVED] How to move/add non-adjacent unallocated space to a partition

I have a dual boot system, Windows 10 and Fedora 37. My Fedora 37 Partition is running out of space.

Here is a link to a picture of the Gparted partition table: https://imgur.com/gallery/LFKUoxi
GParted partition table image

As you can see (from left to right):
/dev/sda1 is an EFI system partition, FAT32, for Microsoft ?
/dev/sda2 is a Microsoft reserved partition
/dev/sda3 is the Microsoft partition, ntfs
the unallocated partition, 45 GB
/dev/sda5 is another efi system partition, for Fedora, fat 16 /boot/efi
/dev/sda6 is the Fedora 37 partition, ext4, about 112 GB, about 13 GB free
/dev/sda4 is a basic data partition, nfts, label says recovery

My goal add the unallocated partition space to /dev/sda6. Some of the unallocated space was at the end of the Windows partition. I then shrunk the Windows partition to get more space and added it to the existing unallocated space to create a single unallocated space of 45 GB.

How do I move and merge this unallocated space to the Fedora 37 partition?

2

Re: [SOLVED] How to move/add non-adjacent unallocated space to a partition

It is not possible to move the start of a Linux root file system while it is in use.  You will need to boot from a live Linux distribution, such as GParted Live, System Rescue or other.
Then in the GPartaed app you will be able to:
1. Move sda5 "EFI System Partition" fat16 to the left.
2. Apply.
3. Grow sda6 ext4 to the left.
4. Apply.

3

Re: [SOLVED] How to move/add non-adjacent unallocated space to a partition

That makes sense, complex operations must be done from a Live Gparted USB boot.
After Step 1 and 2, the order becomes:
sda1, sda2, sda3, sda5, unallocated, sda6 (Fedora), sda4
After growing sda 6 by extending to the left into the unallocated space and applying the change, the order becomes:
sda1, sda2, sda3, sda5, sda6, sda4
I was not aware that I could separate the sda5 from sda6. I assume that sda5 (/boot/efi) is the boot partition for sda6 (Fedora). It is such a long time ago that I converted this laptop into a dual-boot system. I only use the Fedora OS, rarely booting into the Windows OS. Baby steps for now. At some point, I will try to rid the PC of the Windows OS.

Thank you. I will try the operations later today.

4

Re: [SOLVED] How to move/add non-adjacent unallocated space to a partition

Hi, mfleetwo
Look at all that free space...thanks for your help!
[~]$ mydf (alias mydf='df -hT | grep -v /dev/loop')
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs  4.0M     0  4.0M   0% /dev
tmpfs          tmpfs     3.9G   46M  3.8G   2% /dev/shm
tmpfs          tmpfs     1.6G  2.2M  1.6G   1% /run
/dev/sda6      ext4      155G   99G   48G  68% /
tmpfs          tmpfs     3.9G   25M  3.9G   1% /tmp
/dev/sda5      vfat       50M   18M   33M  35% /boot/efi
tmpfs          tmpfs     787M  1.4M  785M   1% /run/user/1000
/dev/sdb1      fuseblk   932G  202G  730G  22% /run/media/mgd/Seagate Backup Plus Drive