LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   uname -r is wrong!? (https://www.linuxquestions.org/questions/linux-software-2/uname-r-is-wrong-12454/)

eee 01-23-2002 05:33 AM

uname -r is wrong!?
 
first of all i woud like to say hello to all members because this is my first post...

ok my problem is...hmm i woud say a very stupid one, im having trouble with the uname program... i upgradet from kernel 2.4.14 to 2.4.17, but the "uname -r" still outputs "2.4.14"... this really screws up the modules :)... so does somebody know how to manualy change the this... i tryed the strace program to determine where the program gets his info... he opens the ld.so.conf to find out where the libs are, and the he reads from a file called libc.so.6...

i have been using slackware (now 8.0) for a good year now and i never had this problem, but this happend when i installed the slackware on a new computer and didnt use any kernel from the instalation... i just copyed the kernel image (2.4.14) from my other slackware partition...

does someone have an idea what to do?

...best regards

therion12 01-23-2002 12:16 PM

Quote:

i have been using slackware (now 8.0) for a good year now and i never had this problem, but this happend when i installed the slackware on a new computer and didnt use any kernel from the instalation... i just copyed the kernel image (2.4.14) from my other slackware partition...
Wel i am not sure if i understood you correctly but you can't just
"Copy" a compiled kernel image onto a new computer with a different configuration, i dont think. Did you try to recompile the kernel the old fashioned way?

lfslinux 01-23-2002 12:51 PM

Re: uname -r is wrong!?
 
Quote:

Originally posted by eee
first of all i woud like to say hello to all members because this is my first post...

ok my problem is...hmm i woud say a very stupid one, im having trouble with the uname program... i upgradet from kernel 2.4.14 to 2.4.17, but the "uname -r" still outputs "2.4.14"... this really screws up the modules :)... so does somebody know how to manualy change the this... i tryed the strace program to determine where the program gets his info... he opens the ld.so.conf to find out where the libs are, and the he reads from a file called libc.so.6...

i have been using slackware (now 8.0) for a good year now and i never had this problem, but this happend when i installed the slackware on a new computer and didnt use any kernel from the instalation... i just copyed the kernel image (2.4.14) from my other slackware partition...

does someone have an idea what to do?

...best regards

You can't simply compile a 2.4.17 kernel, put it in the /boot directory and be done with it. The lilo code that sits in the MBR (Master Boot Record) of your harddisk has to be told about this upgrade.

First you need to update /etc/lilo.conf and add the new kernel there to the proper section. I'd create a new section like this:

image=/boot/whatever-you-called-the-2.4.17
label=newkernel

lfslinux 01-23-2002 12:52 PM

Re: Re: uname -r is wrong!?
 
Quote:

Originally posted by lfslinux


You can't simply compile a 2.4.17 kernel, put it in the /boot directory and be done with it. The lilo code that sits in the MBR (Master Boot Record) of your harddisk has to be told about this upgrade.

First you need to update /etc/lilo.conf and add the new kernel there to the proper section. I'd create a new section like this:

image=/boot/whatever-you-called-the-2.4.17
label=newkernel

that didn't work, let's try again

image=/path/to/2.4.17kernel
label=newkernel
root=/dev/xxx
read-only

change /dev/xxx to your Mandrake system's root directly (/dev/hda2 for example)

lfslinux 01-23-2002 12:54 PM

Re: Re: Re: uname -r is wrong!?
 
Quote:

Originally posted by lfslinux


that didn't work, let's try again

image=/path/to/2.4.17kernel
label=newkernel
root=/dev/xxx
read-only

change /dev/xxx to your Mandrake system's root directly (/dev/hda2 for example)

Sigh again, this just isn't my day, sorry guys.


Okay after you updated /etc/lilo.conf, run /sbin/lilo to re-install lilo in the MBR and when you now reboot you will be able to choose the 'newkernel' label and boot that kernel.

This was how to do it if you use Lilo. Perhaps you are using Grub (I believe Mandrake can be installed to either use Grub or Lilo). If so let us know and we'll get you some Grub instructions.

eee 01-25-2002 10:50 AM

:tisk: no, sory if i was unclear... huh ...

1. it is the same computer, with 2 Linux OSes (both slackware)

2.when i installed the new os i replaced the whole boot dir and /lib/modules/xxx dir with the the boot an lib dir of the second (identical) os
...then rebooted the new os with that kernel (alredy compiled on the same machine kernel
3. then i went back in to the new os and compiled 2.4.17 and rebooted but it still said wolcome to Linux 2.4.14 :)

..so in order not to reinstall it again i need to somehow modify the uname -r output

any thing else? :confused:

eee 01-25-2002 10:55 AM

im sure that lilo isnt the problem :rolleyes: 200% sure!

maxg 01-26-2002 12:54 AM

Quote:

Originally posted by eee
:tisk: no, sory if i was unclear... huh ...
2.when i installed the new os i replaced the whole boot dir and /lib/modules/xxx dir with the the boot an lib dir of the second (identical) os
...then rebooted the new os with that kernel (alredy compiled on the same machine kernel
3. then i went back in to the new os and compiled 2.4.17 and rebooted but it still said wolcome to Linux 2.4.14 :)

..so in order not to reinstall it again i need to somehow modify the uname -r output

any thing else? :confused:

There are a number of steps to upgrading the kernel. Compiling is just one. I won't assume you did them all, because you didn't say ;)

In the source directory for the kernel (usually /usr/src/linux)
1. make dep; make clean;
2. make bzImage
3. make modules; make modules_install;
4. depmod -ae 2.4.17
AND if your distro allows it: make install
will copy the image to the /boot driectory and modify lilo.conf and run /sbin/lilo for you.
OR
5. cp /usr/src/linux/arch/i386/boot/bzImage /boot Then edit /etc/lilo.conf to add the new kernel image and run /sbin/lilo

eee 01-26-2002 11:10 AM

ok i fix it :)

well i just gave up and reinstalled and gave the first reboot with a kernel from the cd...

but im still interested in seeing how to manualy override the uname output

thank you for your time

Aussie 01-26-2002 09:54 PM

All the uname comand does is display the details of the kernel that is currently running on your machine. If it says 2.4.xyz then 2.4.xyz was what booted. I suggest you read the kernel-HOWTO and in particular the section on installing the new kernel.


All times are GMT -5. The time now is 08:22 PM.