Ubuntu – Is there easy and safe way to resize /boot

bootresizeserver

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

Best Answer

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').

Related Question