Installing kernel 2.6.4 0n (not over) 2.4

Rick Stevens rstevens at vitalstream.com
Tue Mar 16 21:50:19 UTC 2004


jludwig wrote:
> Probably but that's how it worked on my machine

Can you quote a bit of the message you're commenting on?  Not the whole
thing, but some of it.  I understand your response since I just wrote
mine, but I doubt many others will.

Your machine probably doesn't have a true host name except 
"localhost.localdomain", in which case your script would sort of work.
However, as soon as it has a real node name, it'll break.  "uname -r" to
return just the kernel version, followed by "cut -d . -f2" is the right
way to go.  Examples:

[root at golem root]# uname -a
Linux golem.corp.publichost.com 2.4.22-1.2174.nptl #1 Wed Feb 18 
16:38:32 EST 2004 i686 i686 i386 GNU/Linux
[root at golem root]# uname -a | cut -d . -f3
publichost

"publichost" is the third part of my machine's FQDN.  Not what you want.

[root at golem root]# uname -r
2.4.22-1.2174.nptl
[root at golem root]# uname -r | cut -d . -f2
4

Ah!  "4" is the second part of "2.4.22-1.2174.nptl".  That's what you
want.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-      Cuteness can be overcome through sufficient bastardry         -
-                                         --Mark 'Kamikaze' Hughes   -
----------------------------------------------------------------------





More information about the fedora-list mailing list