1752815 Members
6105 Online
108789 Solutions
New Discussion юеВ

kernel level

 
mehmet ozdemir
Occasional Contributor

kernel level

Hi there all,

Which file does redhat read the kernel version from when running "uname
-r"?

[root@localhost]# uname -r
2.4.21-32.EL

Can I edit a file and get linux to treat as if it has 2.4.21-32.0.1.EL
without installing 0.1 patch?

Many thanks.
7 REPLIES 7
Vitaly Karasik_1
Honored Contributor

Re: kernel level

uname uses one of the files under pseudo-filesystem /proc (/proc/version, as far as I remember).

May I ask you why do you want to change it?
If for loading binary kernel module, changing "uname -r" output won't help, instead you can run "insmod" with "-f" parameter.

Rgds,
Vitaly
mehmet ozdemir
Occasional Contributor

Re: kernel level

Vitaly,

Thanks for replying.

I tried to edit /proc/version but it did not allow me to edit it even though I changed the permissions.

I want to install a software which asks a strict kernel level while installing. There is a binary file for installing and I can not edit this file due to it is a binary file. I think there is condition in that file checking the exact kernel level it needs. That's why I need to do that. I do not want to install redhat patch because there are also some other softwares running on this level. What I want to do is to cheat my application temporarily, install the software, and rename the kernel level back to its original.

Regards.
Vitaly Karasik_1
Honored Contributor

Re: kernel level

In this case I suggest you just write a simple script which will replace original "uname". I don't sure that a installation program use just "uname -r", but if so, our script can contain just this:

echo "2.4.21-32.0.1.EL"

You should mv original "uname" binary to same place for backup and put instead "uname" script.
Let's see if this enough!
mehmet ozdemir
Occasional Contributor

Re: kernel level

OK, I will try this and inform you asap.
dirk dierickx
Honored Contributor

Re: kernel level

this is exactly why i tell people to stay away from binary drives/modules in lnx. stay with the included ones, if you need hw modules to get your server working - choose another model! if it is not a hw driver, what the hell does it need a kernel module for anyway?

also, do you expect the system to be stable after installing this software?
Andrew Cowan
Honored Contributor

Re: kernel level

If you're just testing you could try using rpm with "--force" or "--nodeps".

I do agree with the earlier comments about proprietry binary only drivers. They are the bane of my life at the moment and my advice would be to choose hardware and manufacturers that don't do this.

This wouldn't have anytghing to do with Promise and/or Fujitsu-Siemens hardware would it?
Guru Dutta
Frequent Advisor

Re: kernel level

I agree with the comment above but if you still want to try this package on this system you can use the following options in RPM

--nodeps
Don't do a dependency check before installing or upgrading a package

The associated s/w may not work as expected.(YMMV)
Thanks,
Dutta