LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-27-2004, 06:41 PM   #1
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Login reports wrong kernel


Here is an odd one:

I run the 2.6.9 kernel on Slackware-Current, but when I login I get:


Last login: Sat Nov 27 18:32:17 2004 from 192.168.0.101
Linux 2.4.26.


It's just odd that it reports the wrong kernel version... any work around/fix?
(BTW: I'm logging in from Windows via SSH)
 
Old 11-27-2004, 06:57 PM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Code:
 cat /proc/version
what does it show when you type this in.......??
 
Old 11-27-2004, 07:00 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Ignore what 320mb said, that just basically tells you what uname -a will display and its probably correct on your current version.

Edit your /etc/motd to reflect the correct kernel version in which any person who's been using Slackware for quite some time will know that the base default Slackware install puts the kernel version as the motd (message of the day) and should have known this by the information you've provided...

Last edited by trickykid; 11-27-2004 at 07:10 PM.
 
Old 11-27-2004, 10:20 PM   #4
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Original Poster
Rep: Reputation: 30
I know about editing the motd , but shouldn't it update automatically? It's certainly not an issue, just curious.
 
Old 11-28-2004, 04:45 AM   #5
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
I have never edited /etc/motd and mine currently says 2.6.9, which is correct. Looks like it is automatically updated.
 
Old 11-28-2004, 04:58 AM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Did you make changes to lilo.conf to point to your new kernel? Just a thought.....
 
Old 11-28-2004, 07:48 AM   #7
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
from: http://channels.lockergnome.com/linu...motd_tip.phtml

-------------------------
It turns out Slackware resets the contents of the MOTD file during shutdown. When you shut down or reboot, the /etc/rc.d/rc.S file is executed. In this file, you'll find the following bit of script:

echo "$(/bin/uname -sr)." > /etc/motd

In English? Run the command uname -sr (which, in my case, produces "Linux 2.4.26") and echo the results followed by a period. The right angle bracket directs the output to the file /etc/motd. Since it's a single bracket, it replaces the file with -- again, in my case -- "Linux 2.4.26."

Incidentally, if this line had two angle brackets -- >> -- it would append the echoed output, and the /etc/motd file would get one line longer with each reboot.

So how do you fix it? Easy. Just comment the line with a hash (#). This turns the line into a comment ignored by the shell, so the command will not be run, and your /etc/motd file will make it through the shutdown process unscathed.
------------------

so , at shutdown the " uname -r " -output is written to " motd ".
my Q. : are you really running 2.6.9 ? ( then a reboot might help...)

egag

Last edited by egag; 11-28-2004 at 07:49 AM.
 
Old 11-28-2004, 08:37 AM   #8
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Original Poster
Rep: Reputation: 30

Last login: Sun Nov 28 00:29:36 2004 from 192.168.0.101
Linux 2.4.26.
umdarby@slackbox:~$ uname -a
Linux slackbox 2.6.9 #4 SMP Sun Nov 14 12:57:36 EST 2004 i686 unknown unknown GNU/Linux
mdarby@slackbox:~$



lol, yeah, I'm running 2.6.9.

It seems as though the "echo "$(/bin/uname -sr)." > /etc/motd" line is commented out by default. I uncommented and ran the echo code and all is well
 
Old 11-28-2004, 08:50 AM   #9
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
maybe in -current. in my rc.S ( Slack10 ) it's not commented out and i didn't change it .
whatever.....we know how to edit a line...

egag
 
Old 11-28-2004, 08:56 AM   #10
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Original Poster
Rep: Reputation: 30
yeah, it must only be -current. I've never had to edit that line; eh oh well

Thanks for your help
 
Old 11-28-2004, 08:20 PM   #11
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53

mislead by this:
-------------
It turns out Slackware resets the contents of the MOTD file during shutdown. When you shut down or reboot, the /etc/rc.d/rc.S file is executed.
-------------

rc.S is executed at boot.
( so what i first wrote here was crap )

egag

Last edited by egag; 11-28-2004 at 09:26 PM.
 
  


Reply



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 -r reports wrong kernel version branque Fedora 5 09-16-2005 10:26 AM
df reports wrong disk usage Mathieu_G Linux - General 4 04-13-2005 02:44 PM
df reports wrong result for Win partition sharathkv1 Fedora 2 09-03-2004 06:24 AM
USB flash geometry reports wrong loonix Linux - Hardware 0 12-09-2003 08:58 AM
PHPMyAdmin reports wrong PHP version. Pcghost Programming 2 10-24-2003 02:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:02 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
Open Source Consulting | Domain Registration