Skip to main content
corrected wording per comments on allocated vs unused space and made question more accurate.
Source Link
Cbhihe
  • 251
  • 3
  • 15

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 goes completely unusedis allocated (from before) and still contains a /boot partition belonging to the second, now derelict Lx OS. The old 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 diskson Linux, the current partitioning looks like: here(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 unmountedallocated but never mounted space.

Everything works just fine, boots justand works fine (it's a single boot system) 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.

 # 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 allocatere-allocate the presently unusednever 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 to move onfor this, but I want to make sure I am not making something downright stupid before I jumpmove 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.

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 goes completely unused. The old dual boot menu still shows a choice between two systems, but one of them is gone.

Using diskson Linux, the current partitioning looks like: here(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 unmounted space.

Everything works just fine, boots just fine (it's a single boot system) and I have a backup of my data and of the complete partition layout, with:

 # sfdisk -d /dev/nveme0n1 > partition-layout.dump

I'd like to move both /boot and / (root) to the left of the swap space and allocate the presently unused space to var and /home... I don't plan to touch either GPT headers, 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 ?

I am ready to move on this, but I want to make sure I am not making something downright stupid before I jump. 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.

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 diskson Linux, the current partitioning looks like: here(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.

Source Link
Cbhihe
  • 251
  • 3
  • 15

Moving `/boot` and `/` (root) partitions about on GPT/UEFI volume

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 goes completely unused. The old dual boot menu still shows a choice between two systems, but one of them is gone.

Using diskson Linux, the current partitioning looks like: here(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 unmounted space.

Everything works just fine, boots just fine (it's a single boot system) and I have a backup of my data and of the complete partition layout, with:

 # sfdisk -d /dev/nveme0n1 > partition-layout.dump

I'd like to move both /boot and / (root) to the left of the swap space and allocate the presently unused space to var and /home... I don't plan to touch either GPT headers, 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 ?

I am ready to move on this, but I want to make sure I am not making something downright stupid before I jump. 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.