how to change the default no kernels that can be installed?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora 10[Cambridge] and Ubuntu 9.04[Jaunty]
Posts: 201
Rep:
how to change the default no kernels that can be installed?
Hi all. I remember the default count for the maximum no of kernels , keeping the old onethat can be installed is 2, right? as I vaguely remember this is basically controlled by some variable like "listnumber", may be I'm wrong about this name. I changed this to 3 assuming that I can install and hence display 3 diff kernels durign bootup in the grub-boot-message. But I don't remember the location of the file that contaisn this varailbe; tried to google but no help. Can some one please point me to the correct file? Thank you.
Distribution: Fedora 10[Cambridge] and Ubuntu 9.04[Jaunty]
Posts: 201
Original Poster
Rep:
Quote:
Originally Posted by verndog
Are you referring to menu.lst file, maybe. It is located "/boot/grub/menu.lst"
no its not menu.lst in /boot/grub ...i want the name of that entry which specifies this count. Say you have only one kernel entry in menu and then you installed a new entry, so now both 'll be shown in menu during boot-up, but say you want to install one new kernel[and that is different frmo the last two] then the oldest will be kicked out frmo the list[as the default count is 2], this just works like a queue. So if you want to keep that 3rd one too, then you have to change this count to 3[i don't know the upper limit for this]. hope I made it clear. Thank you very much.
Distribution: Fedora 10[Cambridge] and Ubuntu 9.04[Jaunty]
Posts: 201
Original Poster
Rep:
Its pretty simple, just change the value of this "installonly_limit" entry in /etc/yum.conf to what ever you like, the default is 2. so basically you do something like this
Code:
installonly_limit=3
if you want to install and want all three of them(say 3 different kernels) to be shown in grub during startup. You must note that this option applies only to those things that are basically installed and not updated during an "yum update". There is a handful of packages that are basically installed. You can also check
Code:
man yum.conf
for more information. Thank you all for your responses.
It is worth noting, for the record, that what you are describing is a yum feature, not a Linux restriction.
There is no practical limit on the number of kernel images that can be built and stored (on /boot), as long as you have enough space to store them.
You do need "older versions" for very-obvious reasons: "what if the newly-installed kernel doesn't boot?" But, you don't need to keep too many of them. So, most maintenance-systems have a way to "cycle off" the older ones so that only the most recent "n" copies are retained at any time. They will update the boot-loader menu files accordingly.
It's also worth noting that, when you do decide to remove a kernel, you should do so using the maintenance-system (whatever it is), i.e. "don't just remove the files." The maintenance system tries to keep a record of what is actually installed, and you want that record to be up-to-date.
Distribution: Fedora 10[Cambridge] and Ubuntu 9.04[Jaunty]
Posts: 201
Original Poster
Rep:
Yes, you rightly said. Its a yum feature and not a Linux restriction. I do agree. Thanks for making things clear to me as I'm still learning the basics. Thank you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.