I work under Linux with a 500GB GPT internal storage device, partitioned, so /boot
, /
(root), /var
and /home
are in separate ext4
volumes. For historical reasons (it used to be a dual Linux-Linux mount system), the device has now a lot of interspersed space between mounted volumes currently in use. That space is allocated (from before) and still contains a /boot
partition belonging to the second, now derelict Lx OS. The dual boot menu still shows a choice between two systems, but one of them is largely gone apart from its /boot
partition. I consider that space wasted and want to reclaim it.
Using disks
on Linux, the current partitioning looks like: (What's mounted is shown with a black triangle.) In addition to the volumes already mentioned above, and to their left on the
disks
image, you can see the EFI FAT partition (leftmost, as you'd expect), the swap space and lots of allocated but never mounted space.
Everything boots and works fine and I have a backup of both my data and of the complete partition layout, the latter obtained with # sfdisk -d /dev/nveme0n1 > partition-layout.dump
.
I'd like to move both the mounted /boot
and /
(root) to the left of the swap space and re-allocate the never mounted space to var
and /home
... I don't plan to touch either GPT headers of the device, or the EFI FAT volume for that matter.
I have used GParted before on MBR volumes with legacy BIOS boot, but never in EFI/GPT environments.
Could moving /boot
compromise the boot-loading routine and make my volume not bootable ? If so, what should I be prepared to do, rebuild the bootloader, re-index partitions, ... more, .. none of the above ?
In particular if I use GParted, will it keep track of new location and update the partition index so bootloader does not choke after repartitioning ?
I am ready for this, but I want to make sure I am not making something downright stupid before I move a muscle. A nudge, help or any advice would be appreciated. If I forgot to include important aspects of the context, I'll be happy to provide more details.
Cheers.
/boot' and
/` as far to the left as the EFI FAT volume will permit, recreate swap after them (with new UUID), extend/home
and/var
reboot without swap, and finally correct the/etc/fstab
entry for the swap's new UUID. Am I missing something ?