#1 Le 11/01/2016, à 23:58
- Sorbus
[Résolu] Problème vieux noyaux et grub
Je suis sous 14.04 LTS.
J'ai "nettoyé" les vieux noyaux, ce que je n'avais pas fait depuis longtemps par :
sudo apt-get autoremove --purge
Ça a comme prévu laissé les deux derniers noyaux...
... mais en plus, au démarrage dans le sous-menu de grub, apparaissent deux noyaux anciens : 2.6.35-31 et 2.6.35-32... sur lesquels l'ordi ne démarre d'ailleurs pas si j'essaye.
Je vois une contradiction entre les résultats de la commande :
$ dpkg -l | grep linux-header
ii linux-headers-3.13.0-63 3.13.0-63.103 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-63-generic 3.13.0-63.103 amd64 Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii linux-headers-3.13.0-65 3.13.0-65.106 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-65-generic 3.13.0-65.106 amd64 Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii linux-headers-generic 3.13.0.65.71 amd64 Generic Linux kernel headers
où les anciens noyaux en 2.6 n'apparaissent pas...
et la commande
$ ls -l /usr/src
total 40
drwxr-xr-x 5 root root 4096 nov. 18 2010 bcmwl-5.60.48.36+bdcom
drwxr-xr-x 5 root root 4096 déc. 13 2014 bcmwl-6.30.223.248+bdcom
drwxr-xr-x 24 root root 4096 déc. 11 2011 linux-headers-2.6.35-31
drwxr-xr-x 7 root root 4096 déc. 11 2011 linux-headers-2.6.35-31-generic
drwxr-xr-x 24 root root 4096 avril 1 2012 linux-headers-2.6.35-32
drwxr-xr-x 7 root root 4096 avril 1 2012 linux-headers-2.6.35-32-generic
drwxr-xr-x 24 root root 4096 sept. 16 07:26 linux-headers-3.13.0-63
drwxr-xr-x 7 root root 4096 sept. 16 07:26 linux-headers-3.13.0-63-generic
drwxr-xr-x 24 root root 4096 oct. 10 21:03 linux-headers-3.13.0-65
drwxr-xr-x 7 root root 4096 oct. 10 21:03 linux-headers-3.13.0-65-generic
où ces deux anciens noyaux apparaissent.
Comment faire disparaître toute trace de ces deux noyaux, et faire en sorte qu'ils n'apparaissent plus dans les choix (menus) proposés lors du démarrage de l'ordi ?
Dernière modification par Sorbus (Le 12/01/2016, à 21:12)
Hors ligne
#2 Le 12/01/2016, à 00:00
- jplemoine
Re : [Résolu] Problème vieux noyaux et grub
Oh, ça c'est un boulot pour "super Sylvie" (cqfd93)....
Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.
Hors ligne
#3 Le 12/01/2016, à 00:30
- nany
Re : [Résolu] Problème vieux noyaux et grub
Bonjour,
tout simplement comme ça :
sudo rm -rv usr/src/linux-headers-2.6.35-31 /usr/src/linux-headers-2.6.35-31-generic usr/src/linux-headers-2.6.35-32 /usr/src/linux-headers-2.6.35-32-generic
Tu as probablement aussi des résidus dans /boot.
sudo rm -v /boot/*-2\.6\.35-31* /boot/*-2\.6\.35-32*
Puis fais un
sudo update-grub
En ligne
#4 Le 12/01/2016, à 00:35
- nany
Re : [Résolu] Problème vieux noyaux et grub
Hmmm… Un doute me vient.
Avant toute chose, donne le retour de :
dpkg -l | grep -Ei "linux-(g|h|i|lo|si|t)"
En ligne
#5 Le 12/01/2016, à 15:37
- Sorbus
Re : [Résolu] Problème vieux noyaux et grub
Voici donc la réponse à la dernière commande. Ça va compléter le tableau...
Avant de donner ce résultat, je précise que je n'avais jamais enlevé les vieux noyaux depuis... très longtemps.
Pour le faire, j'ai suivi le tuto :
4.1 Méthode simple et sécurisée en ligne de commande
en ayant en premier utilisé la commande indiquée dans l'encadré :
sudo apt-mark auto $(apt-mark showmanual | egrep 'linux-.*[0-9]')
sinon, les anciens noyaux n'étaient pas supprimés.
Précision, la partition racine, après cette opération, est passée d'une occupation de 14 Go à 8,2 Go...
Il me reste à comprendre pourquoi il reste dans le sous-menu du grub deux entrées sur des noyaux "2.6.35"
Voici donc maintenant le résultat complet de la commande indiquée :
$ dpkg -l | grep -Ei "linux-(g|h|i|lo|si|t)"
ii linux-generic 3.13.0.65.71 amd64 Complete Generic Linux kernel and headers
ii linux-headers-3.13.0-63 3.13.0-63.103 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-63-generic 3.13.0-63.103 amd64 Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii linux-headers-3.13.0-65 3.13.0-65.106 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-65-generic 3.13.0-65.106 amd64 Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii linux-headers-generic 3.13.0.65.71 amd64 Generic Linux kernel headers
rc linux-image-3.11.0-15-generic 3.11.0-15.25 amd64 Linux kernel image for version 3.11.0 on 64 bit x86 SMP
rc linux-image-3.13.0-24-generic 3.13.0-24.47 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.13.0-63-generic 3.13.0-63.103 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.13.0-65-generic 3.13.0-65.106 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc linux-image-3.2.0-29-generic 3.2.0-29.46 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-36-generic 3.2.0-36.57 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-37-generic 3.2.0-37.58 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-39-generic 3.2.0-39.62 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-53-generic 3.2.0-53.81 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-55-generic 3.2.0-55.85 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-56-generic 3.2.0-56.86 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-extra-3.11.0-15-generic 3.11.0-15.25 amd64 Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
rc linux-image-extra-3.13.0-24-generic 3.13.0-24.47 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-63-generic 3.13.0-63.103 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-65-generic 3.13.0-65.106 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-generic 3.13.0.65.71 amd64 Generic Linux kernel image
Pas de "2.6.35", mais en plus des deux derniers noyaux, des traces de tous ceux que j'ai supprimés; lignes "rc"
Dernière modification par Sorbus (Le 12/01/2016, à 15:37)
Hors ligne
#6 Le 12/01/2016, à 16:53
- nany
Re : [Résolu] Problème vieux noyaux et grub
OK. Donc tu peux passer les commandes que j’indique dans mon premier message.
En ligne
#7 Le 12/01/2016, à 20:39
- Sorbus
Re : [Résolu] Problème vieux noyaux et grub
C'est fait.
Partition racine passée de 8,20 Go à 8,14 Go.
Plus d'entrée "2.6.35" dans le sous-menu au démarrage.
Par contre, j'ai toujours ça :
~$ ls -l /usr/src
total 32
drwxr-xr-x 5 root root 4096 nov. 18 2010 bcmwl-5.60.48.36+bdcom
drwxr-xr-x 5 root root 4096 déc. 13 2014 bcmwl-6.30.223.248+bdcom
drwxr-xr-x 24 root root 4096 déc. 11 2011 linux-headers-2.6.35-31
drwxr-xr-x 24 root root 4096 avril 1 2012 linux-headers-2.6.35-32
drwxr-xr-x 24 root root 4096 sept. 16 07:26 linux-headers-3.13.0-63
drwxr-xr-x 7 root root 4096 sept. 16 07:26 linux-headers-3.13.0-63-generic
drwxr-xr-x 24 root root 4096 oct. 10 21:03 linux-headers-3.13.0-65
drwxr-xr-x 7 root root 4096 oct. 10 21:03 linux-headers-3.13.0-65-generic
Les "2.6.35-xx-généric" ont bien disparu, mais pas les "2.6.35-xx" tout court...
Hors ligne
#8 Le 12/01/2016, à 20:46
- nany
Re : [Résolu] Problème vieux noyaux et grub
OK. Je viens de voir une erreur dans ce que j’avais donné.
sudo rm -rv /usr/src/linux-headers-2.6.35-31 /usr/src/linux-headers-2.6.35-32
Je te conseille aussi la commande suivante pour faire les poussières.
sudo dpkg -P $(dpkg -l | grep ^rc | awk '{print $2}')
En ligne
#9 Le 12/01/2016, à 21:11
- Sorbus
Re : [Résolu] Problème vieux noyaux et grub
Merci nany,
Voilà qui est fait.
Partition racine passée à 7,99 Go
et
$ ls -l /usr/srctotal 24
drwxr-xr-x 5 root root 4096 nov. 18 2010 bcmwl-5.60.48.36+bdcom
drwxr-xr-x 5 root root 4096 déc. 13 2014 bcmwl-6.30.223.248+bdcom
drwxr-xr-x 24 root root 4096 sept. 16 07:26 linux-headers-3.13.0-63
drwxr-xr-x 7 root root 4096 sept. 16 07:26 linux-headers-3.13.0-63-generic
drwxr-xr-x 24 root root 4096 oct. 10 21:03 linux-headers-3.13.0-65
drwxr-xr-x 7 root root 4096 oct. 10 21:03 linux-headers-3.13.0-65-generic
Je marque le sujet comme résolu.
Hors ligne