removing kernels from grub
everytime i update the kernel through yum it adds another boot option to grub. how do i remove the different kernel options from grub?
|
do a 'rpm -qa | grep kernel' .. find the one that you need to remove and do
'rpm -e kernel-X.X.X-X.XXX' (where the Xs are the release number). This will remove the physical kernel of your system too and free up some space in your /boot directory and in /lib/modules too. |
the output of the rpm -qa | grep kernel and the out was:
kernel-source-2.6.5-1.358 kernel-utils-2.4-9.1.131 kernel-2.6.6-1.435 kernel-2.6.5-1.358 kernel-2.6.6-1.435.2.3 can i remove everything but kernel-2.6.6-1.435.2.3 or do i need the utils and source file? |
vim /etc/grub.conf
(if I recall correctly..?..?) just compare the numbers in the entries, and remove the entries with the lower kernel versions, but remember to compare them word for word so that you know where to start/stop editing. A simple answer to a simple question, I hope. |
yeah, just go to grub's config file and delete the entries associated with old kernel's. Had to do it myself recently.
|
Quote:
rpm -qi nameofrpm |
Removing the entries in /etc/grub.conf is a quick and dirty way of getting rid of the choices in the grub menu, but the physical kernel files will stay in the HD. Removing the unused kernel packages (using rpm -e) is the correct way to do.
|
If you did not use an rpm to install your kernel, for example, if you compiled your own kernel, do the following:
1.) Remove the GRUB entry for the kernel (for example, kernel-2.6.7) in /boot/grub/menu.lst 2.) Delete the kernel files in the boot directory by typing: rm /boot/*2.6.7* 3.) Make sure /boot/vmlinuz and /boot/System.map are still symbolically linked to the files of an existing kernel. 4.) Delete the kernel's modules by deleting its folder in /lib/modules. For example, rm -drf 2.6.7 |
if you have apt installed you can remove them from there. (I think, but I'm not sure, only if they were installed via rpm). I did this and everything was ok. Using Synaptic as a gui for apt will make the things even more easier. Hope that helped :)
|
All times are GMT -5. The time now is 02:52 PM. |