LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-23-2002, 06:33 AM   #1
eee
LQ Newbie
 
Registered: Jan 2002
Location: slovenia
Distribution: slackware
Posts: 9

Rep: Reputation: 0
Question 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
 
Old 01-23-2002, 01:16 PM   #2
therion12
Member
 
Registered: Dec 2001
Location: chicago, IL
Distribution: Gentoo 1.4_rc1
Posts: 913

Rep: Reputation: 30
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?
 
Old 01-23-2002, 01:51 PM   #3
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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
 
Old 01-23-2002, 01:52 PM   #4
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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)
 
Old 01-23-2002, 01:54 PM   #5
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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.
 
Old 01-25-2002, 11:50 AM   #6
eee
LQ Newbie
 
Registered: Jan 2002
Location: slovenia
Distribution: slackware
Posts: 9

Original Poster
Rep: Reputation: 0
Exclamation

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?

Last edited by eee; 01-25-2002 at 11:52 AM.
 
Old 01-25-2002, 11:55 AM   #7
eee
LQ Newbie
 
Registered: Jan 2002
Location: slovenia
Distribution: slackware
Posts: 9

Original Poster
Rep: Reputation: 0
Angry

im sure that lilo isnt the problem 200% sure!
 
Old 01-26-2002, 01:54 AM   #8
maxg
LQ Newbie
 
Registered: Nov 2001
Location: Canada
Distribution: RedHat 7.2
Posts: 8

Rep: Reputation: 0
Quote:
Originally posted by eee
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?
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
 
Old 01-26-2002, 12:10 PM   #9
eee
LQ Newbie
 
Registered: Jan 2002
Location: slovenia
Distribution: slackware
Posts: 9

Original Poster
Rep: Reputation: 0
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
 
Old 01-26-2002, 10:54 PM   #10
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 56
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Uname ? phr3nzal Linux - Software 4 10-07-2005 09:52 AM
uname -r reports wrong kernel version branque Fedora 5 09-16-2005 11:26 AM
uname -a gives wrong info vdemuth Slackware 8 01-20-2005 11:26 AM
uname -a BRAHmS Linux - Newbie 1 05-11-2004 10:45 PM
uname -s jpbarto Linux - General 2 07-31-2003 01:24 PM


All times are GMT -5. The time now is 03:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration