PDA

View Full Version : When to upgrade Kernel?



jimbux
13th April 2008, 10:11 PM
Iíve been unsuccessful in searching FAQs, the forum, other forums etc. to find any guidelines on this issue, so Iíll ask here. I hope the question isn't too general, and if you know it's been answered or addressed elsewhere I'd love a link please.

Briefly I use FC8 w/ an nvidia card. You can view my smolt profile in the link at the bottom of my post for more details if interested.

Keeping in mind that Iím new to running my own Linux box and pretty used to Microsoft telling me when to update my system, I have been dutiful in following recommendations from the "software updater" to upgrade stuff as itís presented to me. Iíve learned the hard way that updating the kernel can cause problems, Unexpected ones. So... the question is,..

When should you upgrade your kernel?

In my case I learned that given that I have an nvidia card, I have to at least wait for the corresponding kmod-nvidia-96xx update and do them at the same time. The trouble last time was that I still experienced problems but luckily the system kept my last kernel install around and I could boot to that one. So...

How do I tell the updater NOT to uninstall any old kernels when it's doing an upgrade, or only to uninstall specific ones?

That's all for now, elsewhere I'm going to see if anyone can help me figure out why I had problems the last time I upgraded the kernel, even though I *think* I did everything right.

Zero-Override
13th April 2008, 10:56 PM
well if it works there is no real need to upgrade it (if it's not in a system-critical position, like the server of a company)

as long as everything works in your system and you do not experience any bugs there is no real need to upgrade your kernel (and certainly not worth the trouble)

your update manager (YUM) always keeps the previous kernel around, there is a command to tell it to keep the last <input your own number> kernels around (i'll have a look through my email to see what it was again tomorrow) but the previous one is always saved ;)

does this help a bit? :)

jimbux
14th April 2008, 12:44 AM
does this help a bit? :)

It sure does! Thanks!
James.

Nokia
14th April 2008, 06:27 AM
You might want to keep more than two kernels available. There's a short HowTo describing the necessary steps.

JohnVV
14th April 2008, 06:43 AM
also there can be a day or two delay with the new k-mod nvidia drivers .
It has been a year or two since i used the k-mod drivers but what i used to do.
I would NOT install the kernel from the yum auto update but do a manual k-mod update
yum -enablerepo lvina update k-mod-nvidia
this will update the kernel also if there is an update ready

Dangermouse
14th April 2008, 08:31 AM
How do I tell the updater NOT to uninstall any old kernels when it's doing an upgrade, or only to uninstall specific ones?
Basically you need to tell yum to keep more kernels http://dnmouse.webs.com/kernelkeep.html

My philosophy is 'if its not broke dont fix it' if you system is runng fine then dont update it. :)

Zero-Override
14th April 2008, 12:02 PM
lol :p well no more need for me to dig through my mail.

glad you were helped!! good luck and have fun!! :)

jimbux
14th April 2008, 01:08 PM
Good stuff, thanks everyone. I was starting to think that it might be the "if it ain't broke" approach. Also, keeping more kernels... cake. John that seems like a good approach to just update the driver and let the dependencies take care of bringing in the kernel.

Thanks again folks, J.

stevea
14th April 2008, 02:30 PM
My philosophy is 'if its not broke dont fix it' if you system is runng fine then dont update it. :)

What nonsense! Why choose one of the least stable, most rapidly changing distros around and then decide to avoid the very features that make Fedora unique by NOT applying updates !! That's like buying a Ferrari and only driving it at 50kph. It's beyond silly. No offense, but you really shouldn't be using Fedora if that's your attitude. If you want stability or a polished installation and update process there are plenty of distros that appeal to these needs. Fedora is NOT the right choice if that's your issue.

There are a couple tiers of instability available w/ Fedora. Some ppl are still using F7 as they don't want to spend the time transitioning yet; but they still get de-stabilizing effects from updates. F8 is the current and modestly unstable release. If you want more danger in your computing-life then F9 beta and the rawhide development repos are available. None of these represent the sort of stability needed for production server use (for example). Also I notice many ppl on this forum are i'jits about stability - using ext4 this April when F9 is available could end up tragically. Within Fedora you can and should choose between levels of instability, and you can and should avoid installing & updating specific packages or using specific features based on specific knowledge of the problems. Generally avoiding updates means you are avoiding the who impetus for Fedora's existence; you need a different distro.

I appreciate that you wouldn't want to apply a lot of relevant updates in the middle of a project crunch or 2 hours before you walk out the door with your Fedora laptop, but if you aren't generally updating your system weekly or so you really would be better off with another distro.

sideways
14th April 2008, 04:00 PM
What nonsense! Why choose one of the least stable, most rapidly changing distros around and then decide to avoid the very features that make Fedora unique by NOT applying updates !! That's like buying a Ferrari and only driving it at 50kph. It's beyond silly. No offense, but you really shouldn't be using Fedora if that's your attitude. If you want stability or a polished installation and update process there are plenty of distros that appeal to these needs. Fedora is NOT the right choice if that's your issue.

There are a couple tiers of instability available w/ Fedora. Some ppl are still using F7 as they don't want to spend the time transitioning yet; but they still get de-stabilizing effects from updates. F8 is the current and modestly unstable release. If you want more danger in your computing-life then F9 beta and the rawhide development repos are available. None of these represent the sort of stability needed for production server use (for example). Also I notice many ppl on this forum are i'jits about stability - using ext4 this April when F9 is available could end up tragically. Within Fedora you can and should choose between levels of instability, and you can and should avoid installing & updating specific packages or using specific features based on specific knowledge of the problems. Generally avoiding updates means you are avoiding the who impetus for Fedora's existence; you need a different distro.

I appreciate that you wouldn't want to apply a lot of relevant updates in the middle of a project crunch or 2 hours before you walk out the door with your Fedora laptop, but if you aren't generally updating your system weekly or so you really would be better off with another distro.

I don't fully agree with that.

Disabling kernel updates is sensible in many scenarios, you may have a custom kernel compiled, you may have obscure kernel modules which you don't want to recompile/reinstall everytime fedora releases a kernel update. I routinely add 'exclude kernel* kmod*' to my /etc/yum.conf

On the other hand, you're right about fedora's experimental nature. And since the default yum configuration will keep your current kernel when installing a new one there's no real harm in trying it out. Any probs, reboot and edit grub to point back to old kernel.

I do however update everything else, and with a passion, that's a major bonus of fedora (as you point out). Now that yum-presto seems to work smoothly I don't worry too much about the download hit either :) I'm pretty disappointed they aren't gonna have it as the default in F9 as had originally been planned.

jimbux
17th April 2008, 03:41 AM
What nonsense! Why choose one of the least stable, most rapidly changing distros around and then decide to avoid the very features that make Fedora unique by NOT applying updates !! That's like buying a Ferrari and only driving it at 50kph. It's beyond silly. No offense, but you really shouldn't be using Fedora if that's your attitude. If you want stability or a polished installation and update process there are plenty of distros that appeal to these needs. Fedora is NOT the right choice if that's your issue.

Stevea, the question was only about when to upgrade the kernel (not about updates in general, and while I appreciate your concern for my computational well-being, with all due respect I think the tenor of your advice is a little presumptuous.) So I assume your answer is "always upgrade the kernel"? Please explain why you think this is useful? I asked the original question so that I could learn and hear different people's opinions. If you have time to explain, I would like to hear your rational for your maxing-out-the-Ferrari approach.

Frankly, it seems safe enough to do, especially with what I learned from dangermouse above about how to keep more old kernels.

I introduced myself above as being new to setting up and running my own Linux box. My decision to use Fedora Core 8 was somewhat arbitrary, guided by a few prior experiences, also poking around and reading up a bit on what the "best" distro to use is, furthermore when I took an online quiz to help a "newbie" such as myself decide which system to use; Fedora came up as the best choice for me. So, from what little I know I'm actually surprised by your characterizations of FC8 as the "least stable <...> distros around" - is this true? Is this generally understood by everyone? Not that this is a bad thing, but I'm just surprised that this would be considered the "least stable" distro around. Please enlighten me further.

JohnVV
17th April 2008, 05:11 AM
i would not say "least stable" but " can be unstable ".Fedora is a fast development operating system and as such new releases can have problems .For example i and others have had problems with pulse audio in f8 and not the same problems but deferent ones based on hardware .Mine was simple , move a file delete one and make a new file .
and as for the kernel like i said let k-mod-nvidia upgrade it

Nokia
17th April 2008, 05:13 AM
Well, it's a Ferrari alright. Trouble is...you're supposed to make it work :D

stevea
17th April 2008, 06:48 AM
Sideways points out ....

I don't fully agree with that.

Disabling kernel updates is sensible in many scenarios, you may have a custom kernel compiled, you may have obscure kernel modules which you don't want to recompile/reinstall everytime fedora releases a kernel update. I routinely add 'exclude kernel* kmod*' to my /etc/yum.conf

I think your approach is wrong Sideways. If you don't use a package and have no intention of using it you should remove the package. This includes the kernel. I appreciate that you must initially install the kernel package, then build your own ... but at this point the old-bad kernel has no value and eats disk space - get rid of it ! "yum erase kernel" ! Then you won't get kernel updates you don't want.

===


Stevea, the question was only about when to upgrade the kernel (not about updates in general, and while I appreciate your concern for my computational well-being, with all due respect I think the tenor of your advice is a little presumptuous.) So I assume your answer is "always upgrade the kernel"? Please explain why you think this is useful? I asked the original question so that I could learn and hear different people's opinions. If you have time to explain, I would like to hear your rational for your maxing-out-the-Ferrari approach.

Frankly, it seems safe enough to do, especially with what I learned from dangermouse above about how to keep more old kernels.


Yes, always update the kernel ! If you have custom binary drivers from livna or other competent repos the dependency will prevent the install until the binary drivers are available. If you have source drivers you install the kernel and rebuild the source (a script makes this mindless). Then you have the latest kernel which has undergone the Fedora development process and you are on the current software line. You are then in a position to contribute your experience here and to the Fedora project when the kernel blows up of a driver fails. *IF* you have a problem you can test, provide information here or to bugzilla or other users via this forum. As far as your personal productivity ... just boot the previous kernel and go on with life. So yes you should always have the latest kernel.

I can see an argument for keeping up to three kernels packages, so the oldest kept is always good, and then if the middle copy is bad (and you are done with it) you just erase it. The newest may be brand new and an unknown.

The fact is that the kernel proper is rarely the source of problems. The drivers are mostly good and mostly stable, and new/changing drivers are a mixed bag. If you have hardware associated with a changing driver then you'll want to be wary and keep 3 kernels - otherwise it's not worth it until you hit a problem (and you'll still have one good older kernel).

So the unstated question which you are evading is this; why wouldn't you want the latest-greatest kernel and drivers given that it's trivial to switch to the previous known-working kernel ? I see no argument in favor of that choice except as an excessive need for stability. If that's the case, then you really are using the wrong distribution. Fedora is fundamentally UNstable and using old lost-in-the-weeds packages is an ineffective kludge-y approach to stability management.



I introduced myself above as being new to setting up and running my own Linux box. My decision to use Fedora Core 8 was somewhat arbitrary, guided by a few prior experiences, also poking around and reading up a bit on what the "best" distro to use is, furthermore when I took an online quiz to help a "newbie" such as myself decide which system to use; Fedora came up as the best choice for me. So, from what little I know I'm actually surprised by your characterizations of FC8 as the "least stable <...> distros around" - is this true? Is this generally understood by everyone? Not that this is a bad thing, but I'm just surprised that this would be considered the "least stable" distro around. Please enlighten me further.

Fedora is a fundamentally unstable distro simply because it is always changing rapidly. Tens or hundreds of packages update every week. ((please note that Fedora is a distro, F8 is a revision of that distro)). Sadly many ppl do not understand this and we get a lot of very silly comments on this forum. "How can I use Fedora for a production server", "Why can't we have more testing before package release", "I really hate fedora b/c it was working and the update ruined everything". Your question was a little more benign version of that last one. Frankly the kernel and a few critical bits are needed to do anything. Most packages are just tools and if the latest one breaks you can just install the preceding version. Another artifact of the Fedora process is that that some tools you knew and loved on Fedora7 may be different or entirely missing and replaced on Fedora8. You can't count on that sort of stability either.

I don't want to overstate the instability issue. I find Fedora and all the packages I use to be "stable enough" for practical productive everyday "workstation" use. *BUT* I know how to debug problems, find the source problem, report the problem and load working set of packages and go on with my work. Gladly so do quite a few ppl on this forum, and so I can often (not always) shortcut the debugging cycle with a search here. Once every month or two I really have to stop and work through an issue that is breaking something.

For these reasons you should not use Fedora if you are a noob and want or expect an "install and forget" OS experience. You should not consider Fedora for a production server ((it's IMO OK for a home server that can tolerate reboots and a little downtime)). The reason I like Fedora is that packages are generally (not always) reasonably up to date with the upstream source. On other distros I feel obligated to pull source and rebuild packages all the time to stay current. The repo packages are reasonably well tested and integrated and only occasionally glitch badly. The repo package count is quite high compared to other distros.

I am not bothered by inexperienced users who understand the Fedora=change=instability equation and expect a few bumps (and much help on this forum), but a I am getting very tired of the whiners complaining about instability issues. Fedora is rapid change. If you don't want a drink from the fire hose you came to the wrong place.

Some useful links about the Fedora process:
http://fedoraproject.org/wiki/Overview
http://fedoraproject.org/wiki/Objectives
"Fedora is not interested in having a slow rate of change, but rather to be innovative".

Dangermouse
17th April 2008, 09:16 AM
Stevea the poor guy just asked a simple question (s)
How do I tell the updater NOT to uninstall any old kernels when it's doing an upgrade, or only to uninstall specific ones?
and
d
When should you upgrade your kernel?
He also said, he is new to linux, and i gave him a sensible answer for him, i dont know why you took such an offence to
My philosophy is 'if its not broke dont fix it' if you system is runng fine then dont update it. :)
He is new to linux ,if everything is working fine, why would/should he want to upgrade the kernel and run risks of problems, obviously you do, but for me a im sure many others as well dont do possible unstable kernel updates, straight away, i wait and see what problems occur(here) before i upgrade the kernel, as i use this computer to work on, basically i was saying to him, he didnt need to do a kernel update if he didnt want to, its not windows where if you dont do the updates you will possibly get hacked. (choice)
And i certainly didnt mean any offence to you!

leigh123linux
17th April 2008, 09:27 AM
Stevea the poor guy just asked a simple question (s)
and
He also said, he is new to linux, and i gave him a sensible answer for him, i dont know why you took such an offence to
He is new to linux ,if everything is working fine, why would/should he want to upgrade the kernel and run risks of problems, obviously you do, but for me a im sure many others as well dont do possible unstable kernel updates, straight away, i wait and see what problems occur(here) before i upgrade the kernel, as i use this computer to work on, basically i was saying to him, he didnt need to do a kernel update if he didnt want to, its not windows where if you dont do the updates you will possibly get hacked. (choice)
And i certainly didnt mean any offence to you!


I always read the kernel change log ! .
A old kernel can be a major security issue ;)

http://forums.fedoraforum.org/forum/showthread.php?t=180819

Nokia
17th April 2008, 09:32 AM
Speaking of the devil=kernel: Leigh, I guess you need to switch to 2.6.26 git ASAP, since 2.6.25 has gone stable. :p

leigh123linux
17th April 2008, 09:59 AM
Speaking of the devil=kernel: Leigh, I guess you need to switch to 2.6.26 git ASAP, since 2.6.25 has gone stable. :p


Just updated Rawhide !


[root@localhost Download]# rpm -ivh '/home/leigh/Download/kernel-2.6.25-1.fc9.x86_64.rpm'
Preparing... ########################################### [100%]
1:kernel ########################################### [100%]

nvidia (169.12-10.fc8): Installing module.
...........
......
[root@localhost Download]#



I guess you need to switch to 2.6.26 git ASAP


I can wait till F10 Rawhide :cool:

sideways
17th April 2008, 04:54 PM
Sideways points out ....


I think your approach is wrong Sideways. If you don't use a package and have no intention of using it you should remove the package. This includes the kernel. I appreciate that you must initially install the kernel package, then build your own ... but at this point the old-bad kernel has no value and eats disk space - get rid of it ! "yum erase kernel" ! Then you won't get kernel updates you don't want.

===




That's true, but if you get in a pickle customizing your own kernel you do need a fall-back, So I think it's sensible to keep one base fedora kernel that actually boots, rather than relying on the rescue disk. As I pointed out you can either prevent this one ever being replaced or just have it update naturally (with the slight inconvenience of having to edit grub to point back to your custom kernel each time)

F.User_4_Life
17th April 2008, 06:28 PM
as for me i update the kernel when the flrgx update is available because i hate not having the direct rendering for compiz as i am a big compiz fan. so i would recommend updateing your kernel when the update graphic driver is avilable. that way you may also still play you favorite games.

rclark
17th April 2008, 10:51 PM
Now, I 'used' to be in camp of 'if it isn't broke don't fix it' . I still am when it comes to servers. I used to be this way on even my home system loaded with Fedora as well. After a few broken kernels back in FC3 and FC5 I just stopped loading kernel updates unless there was a 'very' good reason to upgrade as I was very gun shy from then on. Now in FC8, I haven't had one new kernel that hasn't worked for me well enough to just 'keep it' until the next kernel came out. Knock on wood, seems like somethings have gotten much 'better' :D .

For critical systems you shouldn't be running Fedora anyway. As said above Fedora is the 'bleeding edge' (Of course having said that, one of my critical systems is 'humming' along on FC5 just fine :rolleyes: ) . CentoOS would be a better bet, which is what I will use for future file/print servers at my company . Have two boxes on CentOS already and I like it! No LVMs though ... which is a good thing.


All in all, it is your call.

binutils
20th April 2008, 12:00 AM
had upgraded my kernel to 2.6.25 with gcc-4.3.0 already. :)



cp /boot/config-2.6.24.4-64.fc8 /usr/src/linux-2.6.25/.config
make oldconfig
<say 'y' or 'm' to additional questions>
make
make modules_install
make install
<change menu.lst's default 1 to 0>
<after reboot>
<install latest nvidia installer (NVIDIA-Linux-x86_64-173.08-pkg2.run)>
<done>


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,1)
# kernel /boot/vmlinuz-version ro root=/dev/sda2
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.25)
root (hd0,1)
kernel /boot/vmlinuz-2.6.25 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.25.img
title Fedora (2.6.24.4-64.fc8)
root (hd0,1)
kernel /boot/vmlinuz-2.6.24.4-64.fc8 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.24.4-64.fc8.img
title Fedora (2.6.24.3-50.fc8)
root (hd0,1)
kernel /boot/vmlinuz-2.6.24.3-50.fc8 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.24.3-50.fc8.img
title LFS (2.6.24)
root (hd0,3)
kernel /boot/lfskernel-2.6.24 root=/dev/sda4
title Other
rootnoverify (hd0,0)
chainloader +1

jimbux
20th April 2008, 01:18 PM
I am not bothered by inexperienced users who understand the Fedora=change=instability equation and expect a few bumps (and much help on this forum), but a I am getting very tired of the whiners complaining about instability issues. Fedora is rapid change. If you don't want a drink from the fire hose you came to the wrong place.

I like your firehose analogy. It seems like the whole Linux experience is a bit like that however, so telling folks they need to drink elsewhere probably isn't the ideal stance (stick with Windows?). As a "noob" it's hard to know where to start and if your first step (choosing distros) is even correct. I don't mind the change=instability that you describe because I'm interested in learning, so I'm going to stick with fedora, maybe I'll change to another distro someday perhaps for other machines that I build for other purposes like making a renderfarm for example.

The other day I posted (elsewhere) about a problem I had after doing a kernel upgrade. Unfortunately I didn't get any suggestions/help from anyone about now to go about diagnosing and fixing the problem, I hope that you are right, and that when I experience a few bumps that I can get "much help" on this forum. Even suggestions about where to look for problems helps us "noobs". Ok, shameless plug here ;) :

Help Jimbux diagnose his mouse problem! (http://forums.fedoraforum.org/showthread.php?t=186392)