The old fashioned way of installing linux would be to put /boot on a seperated filesystem, in order to keep that safe outside possible root filesystem failures. If you did not plan with bloated kernels, each 30MB and more, and assigned 100MB for /boot on a RAID1 you will most likely fail on the 3rd kernel to be installed – like me on my workstation. Rather then reinstalling the system – we are not windoze, eh? – let’s try it the linux way.
Of course, one might say – remove the old kernel before installing a new one …
# dpkg -l *linux-image* # apt-get install --remove purge linux-image-$version-generic
… but what if kernel history would be unstable and you would make sure to keep it in a row?
After forgetting this all the time, it’s pretty much annoying and rather than trying to break the RAID1 by increasing size of the first partition, put /boot back again on the root fileystem. Doing that on a booted kernel is not that difficult, but keep in mind – make it rebootable within /etc/fstab !
First, create a copy of /boot, unmount the original, and replace it with the copy.
# cp -a /boot /boot-tmp # umount /boot # rmdir /boot && mv /boot-tmp /boot
Then change the entry in /etc/fstab in order to keep that over reboots. Last but not least run update-grub (grub2) to verify that grub works correctly.
# vim /etc/fstab# update-grub
Then fire and reboot.
Thanks a million. It was really helpful. You save my laptop from reinstalling ubuntu Linux.
Hi! 2017 here. This still works. Thanks a lot!
What about raspberry clone devices where there is no grub at all? How can I do there?