LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Login reports wrong kernel (https://www.linuxquestions.org/questions/slackware-14/login-reports-wrong-kernel-259974/)

mdarby 11-27-2004 06:41 PM

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)

320mb 11-27-2004 06:57 PM

Code:

cat /proc/version
what does it show when you type this in.......??

trickykid 11-27-2004 07:00 PM

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... ;)

mdarby 11-27-2004 10:20 PM

I know about editing the motd ;), but shouldn't it update automatically? It's certainly not an issue, just curious.

shilo 11-28-2004 04:45 AM

I have never edited /etc/motd and mine currently says 2.6.9, which is correct. Looks like it is automatically updated.

XavierP 11-28-2004 04:58 AM

Did you make changes to lilo.conf to point to your new kernel? Just a thought.....

egag 11-28-2004 07:48 AM

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

mdarby 11-28-2004 08:37 AM


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 ;)

egag 11-28-2004 08:50 AM

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

mdarby 11-28-2004 08:56 AM

yeah, it must only be -current. I've never had to edit that line; eh oh well ;)

Thanks for your help

egag 11-28-2004 08:20 PM


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


All times are GMT -5. The time now is 10:28 PM.