LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   howto delete extra kernel lists at boot of Mandriva 2010 (https://www.linuxquestions.org/questions/linux-newbie-8/howto-delete-extra-kernel-lists-at-boot-of-mandriva-2010-a-787041/)

islay04 02-04-2010 12:52 PM

howto delete extra kernel lists at boot of Mandriva 2010
 
After upgrade from MDV 2009.1 to MDV 2010 a bunch of available kernels that can be selected are listed at boot. I think that these are still installed but I really don't need them listed. I would like to get rid of the list of extras.

I've had a look at /boot/grub but I can't figure out what. if anything, to do there.

Best regards.

Bob

camorri 02-04-2010 01:07 PM

There are several files included with each kernel. To see what is there, go to the /boot directory.

The best, and safe way to remove both the files, and the entires in grub is to use URPMI, and un-install each unused kernel. That will free disk space, and remove the entries in grub.

The brute force method, I don't recommend this unless you are confident in what you are doing, as root, edit /boot/grub and delete the lines for each kernel you are not going to boot to. The name of the kernel is on the 'Title' line. For example, here is one kernel in my /boot/grub/menu.lst file;

Quote:

title desktop 2.6.31.5-1mnb
kernel (hd0,0)/boot/vmlinuz-2.6.31.5-desktop-1mnb BOOT_IMAGE=desktop_2.6.31.5-1mnb root=UUID=cc9bc7ff-c5ee-4cf8-adff-2cab298fd0e3 resume=UUID=8f1ede04-99be-4980-b6ca-8d94c1946fc4 splash=silent vga=788
initrd (hd0,0)/boot/initrd-2.6.31.5-desktop-1mnb.img
Removing only these lines will remove the option from the grub menu. To remove the file, go to /boot and delete the files with 2.6.31.5 in the names.

If you go the brute force method, make a backup of /boot/grub/menu.lst first, just in case you mess up the file.
Also know how to boot from a live cd, just in case...

islay04 02-06-2010 09:30 PM

Thanks Cliff:
I tried the easy way but urpmi didn't seem to support delete so I tried urpme but it just returned a blurb that NVidea had something installed in this kernel and didn't delete anything.

I then went to the brute force method and had trouble trying to delete the entries in boot/grub/menu.lst. Finally got brave and went to Konsole after saving a copy of the edited menu.lst (deleted the unwanted lines) then used "cp" to replace /boot/grub/menu.lst and all is well :-).

Thanks again for pointing me in the right direction and.

Best regards.

Bob

camorri 02-07-2010 05:53 AM

I'm glad I could help. BTW, you should have been able to accomplish the task running URPMI from the GUI.

You can go to MCC--> Install Remove Software, and in the Find search field, type 'kernel' ( with the quotes ) and enter. It should list every package with the word kernel in it. Know which kernel is installed, the command 'uname -a' will tell you. Installed packages have a check mark in the left column. For the kernels you want to remove, hilight them, and click apply. You will get a notification about all the related packages for that kernel, and be asked if you want to remove them also. Click Yes, and apply. URPMI will do its magic.

This is how I remove old kernels. It is safe, and it cleans up the disk.

islay04 02-08-2010 11:18 AM

Thanks again Cliff. Worked like a charm.

Best regards.

Bob

camorri 02-08-2010 12:12 PM

You are welcome.

jaymz69 05-14-2010 11:44 AM

Id like to ask if removin old kernels may have effect on boot time?

I recently had a problem with one comp in a comp lab and it had a clean install of mandriva 2010 -- its boot time was considerably shorter than that of the other comps in the lab [they all have the same processors hds and graphic cards]... but the other comps still have all the previous kernel versions as they were kept up-to-date -- the one which broke had just one update and it really loads the system faster

so is it connected with previous kernels slowin down the boot time or is there another reason?

camorri 05-14-2010 12:09 PM

Quote:

Id like to ask if removin old kernels may have effect on boot time?
Absolutely no, removing them will have no effect. What ever time differences you were seeing on these other machines, could be traced to other things causing the delay. Old kernels are not accessed when booting.

jaymz69 05-14-2010 01:15 PM

so what could it be? the difference is really visible so Id like other machines to boot as quickly -- is clean install the only solution or may I do sth else?
how can I find out whats the delay caused by?

camorri 05-15-2010 05:41 AM

Quote:

so what could it be?
Lots of things can cause the problem. A lot depends on what you have configured. If you have remote share mounts, and the other systems are not on, or not accessible, timeouts occur.

I would suggest you have a look at the 'dmesg' output. It is a long list of messages your system creates during a boot, it may give you a clew.

Try going to verbose mode ( hit the ESC key ) during a boot, and watch the messages go by. Errors show up there.

These are just tow of the places to look. There are also the logs to look into.

jaymz69 05-15-2010 09:21 AM

I already found out whats causin the problem and created a thread asking for help here

http://www.linuxquestions.org/questi...appear-807974/

got one tip but it didnt work -- maybe U can help?

divyashree 05-15-2010 09:55 AM

Quote:

Originally Posted by jaymz69 (Post 3968658)
so what could it be? the difference is really visible so Id like other machines to boot as quickly -- is clean install the only solution or may I do sth else?
how can I find out whats the delay caused by?

Try to interrupt while ur machine boots and check which service is taking much time to start ..


All times are GMT -5. The time now is 01:03 PM.