Unwilling to move an extended partition
I had an old-style classic partitioning like this:
- sda1: /boot (ext2)
- sda2: extended
- sda5: LVM
All space was allocated, and /boot was too small (the kernels and initrds grew over time), so I tried to fix it like this:
Reduce the size of sda5, then reduce the size of its container, sda2, Then move the container sda2 towards the end of the device, leaving a gap after sda1, finally resize sda1 to fill the gap.
Unfortunately gparted refused to resize or move sda2.
So I did it manually from a "rescue system":
pvresize sda5 (there were 15GB unused) and shrink the partition a bit less, then dump the contents to a different filesystem (actually NFS). After that delete partitions sda5 and sda2, then resize sda1 (actually I remembered the starting sector and removed it, just to recreate it at the same position with a larger size) and create a new primary partition sda2 filling the rest of the disk. Update the partition table. Then I restored the dump of sda5 into sda2 (the dump was a bit smaller than the partition).
In the running system (after boot) I could extend /boot (sda1) and pvresize (sda2).
I wonder: Couldn't gparted be enable to be "a bit more clever" to handle the configuration?