28.04.2024, 21:19 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Old-Kernel cleanup


Well, Kano builds a new kernel when new features or security patches are needed.

So you can install them but somehow you must deinstall the old ones...otherwise your harddisk will turn full of kernels..

Kano has already prepared a Remove-Script for that http://kanotix.com/files/fix/remove-all-kernels-completely.sh , get it with

wget http://kanotix.com/files/fix/remove-all-kernels-completely.sh

make it executable

chmod 755 remove-all-kernels-completely.sh

and then better move it into /usr/local/bin

mv remove-all-kernels-completely.sh /usr/local/bin



:rot:be carefull, you should not change the script !!!:rot:



Start your System with the kernel you want to keep.

#!/bin/sh
cd /boot
for v in vmlinuz-*; do 
KERNEL=$(echo $v|sed s/vmlinuz-//)
if [ "$KERNEL" != "$(uname -r)" ]; then
apt-get remove --purge $(COLUMNS=200 dpkg -l|awk '{print $2}'|grep $KERNEL)
rm -rf /lib/modules/$KERNEL
rm -rf /usr/src/kernel-headers-$KERNEL
rm -rf /usr/src/linux-$KERNEL
fi
done


The script removes all unused kernels!
:-)
XML Revisions of $tag
Seiten-History :: Letzter Editor : cokeinthebottle :: Eigentümer : CokeintheBottle ::
Powered by pnWikka 1.0
 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.