i'm trying to update from Ubuntu 21.10 to 22.04, but I don't have free space available in /boot
So what I want is a way to expand /boot, or another way I can get free space in /boot (without warning my system), Is safe to move the Filesystem root to the right with Gparted?. Is safe deleting something in /boot?
12 Answers
Moving partitions is never "safe". The power could fail in the middle, or the disk could develop bad sectors while such a large amount of data is rewritten.
My usual approach to this is to steal some space from the swap partition to make a new boot partition, copy the old boot partition into the new one, update fstab (for both boot and swap) and unmount the old boot and mount the new boot, and then rerun update-grub.
If you are lucky enough for boot and swap to be adjacent, you might be able to delete swap, extend boot, and then recreate swap with the remainder.
2To get you going, you can free up some space by truncating the unused initrd image. First, figure out your running kernel version by running
uname -aIf you're currently on 5.13.0-40, then truncate the old image
sudo -i
> /boot/initrd.img-5.13.0-19-generic 2