Can't extend boot partition despite unallocated space

I have an older laptop that has a /boot partition which is too small. Means I can’t install a new kernel, and also not upgrade to F43.

So I shrunk the EFI partition a little bit, to give me some unallocated space just before the /boot partition.

Despite this, I can’t extend the /boot partition. What am I missing?

Use GParted to move the boot partition to the beginning of free space before expanding it.

However, note that the recommended boot size is 2 GiB:
Systems with <=1 GB /boot partition may see "need more space" error during system update

You mean the free space has to be after the boot partition, not in front of it?

But I can’t move a mounted partition, right?

Yes.

Correct.

Thanks Vladislav for the clarity.

I just created & booted a live USB stick. Then I could immediately extend /boot (without moving it) because it’s unmounted. Unfortunately, that doesn’t yield enough space to install more than 1 kernel.

So I need to resize the LVM volume which is in front of the boot partition. Unfortunately, this partition is LUKS encrypted.

Using Gparted I could resize it, but even after unlocking it, it doesn’t see the different partitions nor the available space. So if I were to resize it, it would probably lose data.

Any tool I can use to safely shrink one of the LUKS partitions, and give that space to /boot?

As far as I know, there’s no easy and safe method.
Even if you want to try this, be sure back up beforehand.
Personally, I’d go with repartitioning and reinstalling.

2 Likes

There is no easy and safe method that I am aware of.
However I did recently do just what is asked with no problems.
I have a 2TB nvme SSD where my system resides with /boot & /boot/efi as p2 and p1 respectively. The remainder of the SSD is an LVM PV volume which only has /root as a small LV.

What I wound up doing was shrink the VG to reduce its size
used gparted to shrink the LVM PV size leaving space at the end of the drive
then used gparted to move the PV to the end of the drive so the free space was between p2 (/boot) and the LVM.
I finally was able to expand the size of /boot/
All told this took more than 30 hours with most of it involved in relocating the LVM partition.

In retrospect, it would have been simpler to reduce the size of the VG, and reduce the size of the lvm partition then create a new partition in the freed up space for /boot
Doing that one could copy the content of the original /boot to the new partition, change the UUID of the original /boot, and assign the new /boot partition the UUID of the original /boot.

Neither option is ideal and both contain risk of data loss. Backups are recommended before starting.

I agree that dealing with LVM is not a big problem, but the screenshot indicates the OP also needs to resize and move LUKS, which makes this even more risky.

1 Like