PDA

View Full Version : [SOLVED] 15.10 -> 16.04 not enough space on /boot



alban-noir
April 23rd, 2016, 10:33 AM
Hi,
When I try to upgrade from 15.10 to 16.04 I get an error :

La mise à niveau a échoué. La mise à niveau a besoin de 95,5 M
d'espace libre sur le disque « /boot ». Veuillez libérer un espace
supplémentaire de 58,6 M sur le disque « /boot ». Videz la corbeille
et supprimez les paquets logiciels temporaires à l'aide de
l'application Système > Administration > Nettoyage du système, ou en
tapant la commande suivante dans un terminal : « sudo apt-get clean ».
The /boot partition is only 256Mo.
How can I free more space or extend it?

ajgreeny
April 23rd, 2016, 12:14 PM
You probably have a lot of old kernels in the /boot partition which need to be removed. Try running command
sudo apt-get autoremove That may work to remove them, but I suspect will also fail because there is insufficient space

I assume you installed to an encrypted system or using LVM partitioning as it is a known problem of those two installatins providing the /boot partition of that size, which is too small if you do not clear old kernels regularly.

Let's see the output of command
dpkg --list *linux*image* and then we can try to remove old kernels using dpkg commands.

alban-noir
April 23rd, 2016, 01:06 PM
Thanks,
As you guess I've installed ubuntu 15 using LVM.
So when this is what I've got

Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom Version Architecture Description
+++-====================================-=======================-=======================-================================================== ============================
un linux-image <aucune> <aucune> (aucune description n'est disponible)
un linux-image-3.0 <aucune> <aucune> (aucune description n'est disponible)
rc linux-image-4.2.0-16-generic 4.2.0-16.19 amd64 Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc linux-image-4.2.0-30-generic 4.2.0-30.36 amd64 Linux kernel image for version 4.2.0 on 64 bit x86 SMP
ii linux-image-4.2.0-34-generic 4.2.0-34.39 amd64 Linux kernel image for version 4.2.0 on 64 bit x86 SMP
ii linux-image-4.2.0-35-generic 4.2.0-35.40 amd64 Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc linux-image-extra-4.2.0-16-generic 4.2.0-16.19 amd64 Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc linux-image-extra-4.2.0-30-generic 4.2.0-30.36 amd64 Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
ii linux-image-extra-4.2.0-34-generic 4.2.0-34.39 amd64 Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
ii linux-image-extra-4.2.0-35-generic 4.2.0-35.40 amd64 Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
ii linux-image-generic 4.2.0.35.38 amd64 Generic Linux kernel image
Then

apt-get autoremove
Give

||/ Nom Version Architecture Description
+++-====================================-=======================-=======================-================================================== ============================
un linux-image <aucune> <aucune> (aucune description n'est disponible)
un linux-image-3.0 <aucune> <aucune> (aucune description n'est disponible)
rc linux-image-4.2.0-16-generic 4.2.0-16.19 amd64 Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc linux-image-4.2.0-30-generic 4.2.0-30.36 amd64 Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc linux-image-4.2.0-34-generic 4.2.0-34.39 amd64 Linux kernel image for version 4.2.0 on 64 bit x86 SMP
ii linux-image-4.2.0-35-generic 4.2.0-35.40 amd64 Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc linux-image-extra-4.2.0-16-generic 4.2.0-16.19 amd64 Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc linux-image-extra-4.2.0-30-generic 4.2.0-30.36 amd64 Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc linux-image-extra-4.2.0-34-generic 4.2.0-34.39 amd64 Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
ii linux-image-extra-4.2.0-35-generic 4.2.0-35.40 amd64 Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
ii linux-image-generic 4.2.0.35.38 amd64 Generic Linux kernel image

And it seems that it's enough space to upgrade to 16.:P
Thanks a lot but is there a way to extend this tiny partition?

ajgreeny
April 23rd, 2016, 04:20 PM
You could do so, but it is potentially risky, so I would just make sure to run that autoremove command every time a new kernel appears in the updates.

You were very lucky that you managed to do it when the /boot partition was already nearly full but obviously there was just enough space to allow it to run successfully. It looks as if you now have just a single kernel remaining, ie linux-image-4.2.0-35-generic, which is surprising as that autoremove command usually leaves the most recent version and the previous one as a backup, just in case.
Let's now see the output of command
ls /boot | grep vmlinuzto check what is still installed.

alban-noir
April 24th, 2016, 09:30 AM
Hi, This what I got now after the upgrade

vmlinuz-4.2.0-35-generic
vmlinuz-4.4.0-21-generic

ajgreeny
April 24th, 2016, 08:11 PM
OK, so you do still have two kernels installed which is what I was expecting, so all is now well in your system.

Just remember to run the autoremove command whenever a new kernel appears in the updates.