Is there easy and safe way to resize /boot

My /boot is full. Is there an easy and safe way to resize it? I saw a discussion which said that /boot partition is not required. A /boot directory will be fine. However, I don't think I can have /boot folder while /boot is mounted. Similarly, I can resize /boot because I can't unmount it.

I plan to 1. create a new logical volume, 2. mount it and copy all files from /boot to this new volume, and 3. change mount table to mount new logical volume under /boot.

Since it's /boot, I won't be able to boot if I make mistakes. Could anyone give me instructions?

Steve


If it is full you can uninstall older Linux images so you can avoid the procedure of resizing/moving partitions:

Do ls /boot and check the "older" versions of the kernel. You can do uname -r to see your current kernel version (the one you should NOT touch!). Then for each older version run

sudo apt-get remove linux-image-<version>

where <version> is the version of the older image. For example, ls /boot gives me:

abi-3.8.0-21-generic         initrd.img-3.8.0-22-generic
abi-3.8.0-22-generic         lost+found
config-3.8.0-21-generic      memtest86+.bin
config-3.8.0-22-generic      memtest86+_multiboot.bin
Debian                       System.map-3.8.0-21-generic
extlinux                     System.map-3.8.0-22-generic
Fedora                       vmlinuz-3.8.0-21-generic
grub                         vmlinuz-3.8.0-22-generic

Say I want to remove version 3.8.0-21-generic (which is older than my current one) then I run

sudo apt-get remove linux-image-3.8.0-21-generic

After it has been uninstalled I run

sudo apt-get autoremove

in order to finish the removal completely (for there might be things to be 'autoremoved').


Although edwin's answer accurately describes how to free up space on /boot (563 up votes) it doesn't address the question of how to incorporate /boot into / to avoid micro-management of disk space.

This question is a good example with gparted image:

  • How to increase size of /boot partition using gparted

Please help me here. I am always getting messages saying no free space available in boot partition.

enter image description here

This is the good answer by Pilot6 posted for that question:

You need to boot from Ubuntu LiveUSB first.

Your sda5, sda6 and sda7 partitions are inside the extended sda4 partition.

You will need to extend sda4, then move sda5 and sda6 left, then extend sda7.

You will also need to re-install grub, because start sector of your /boot partition will change. It can be done from LiveUSB by

sudo mount /dev/sda5 /mnt
sudo mount /dev/sda7 /mnt/boot
sudo chroot /mnt
sudo grub-install /dev/sda
exit