Click to See Complete Forum and Search --> : Kernel Konfusion
plasmid
10-06-2000, 11:38 AM
I recently reinstalled my mandrake 7.1 distrabution, and thus I wanted to bring my kernel up to date. I downloaded and compiled both 2.2.16 and 2.2.17, placed their respective bzImages in my boot folder, set up lilo.conf, and ran sbin/lilo to make sure it was all set up right. upon reboot, I picked the 2.2.17 kernel, it booted up fine, but when I got to my login menu, the system information said I was running the 2.2.15 kernel compiled by mandrake. I rebooted, tried loading the 2.2.16, and again, after bootup it said I was using 2.2.15 for mandrake. How can this be??? Is the information displayed in the terminal login incorrect?? is thier anotherway to identify what kernel is TRUElY loaded into memory?? Am I losing my mind?? this is not the first time I have done this, but its the first time I got these bizarre results. as far as I can tell, lilo is configured correctly, and all of the symbolic links in the boot dirrectory are set up properly. PLEASE HELP!!
thanks
-plasmid
treatment
10-06-2000, 12:59 PM
The file /etc/issue is still reflecting the old kernel-version.
Run the command uname -a to make sure of the version you are running.
I'm not sure where redhat put the system-init scripts, but it's in /etc/rc.S on Slackware.
rayjones
10-06-2000, 01:54 PM
In redhat ( mandrake perhaps changed this) /etc/rc.d/rc.local writes issue. But, it does a uname -r when it does it, so that must be correct for the kernel running. Look at these files, you will puzzle out how issue gets it's information pretty quickly.
------------------
Ray
newbie@gordo.penguinpowered.com
http://gordo.penguinpowered.com
plasmid
10-06-2000, 03:18 PM
thanks for the help. it seems like that indeed is the problem. if you have any ideas on how to set up the rc.local file so it checks the version everytime and writes it to the issue file I would sure appriciate it.
-plasmid
Paul Weaver
10-06-2000, 04:31 PM
Something along the lines of
echo "Currently runing `uname -sr` > /etc/issue"
At the appropiate point (use >> instead of > to append to the file, I cant remember how redhat sets up /etc/issue, and it depends what you want in it)
plasmid
10-06-2000, 07:40 PM
thanks for all the help so far, but I'm really new to this and I'm still having trouble with it. here is the segment from my rc.local file. I would love suggestions on how to modify it so it displays the current kernel. thanks
--------------------------------------------
# This will overwrite /etc/issue at every boot. So make any changes you
#want to make to /etc/issue here or you will lose them when you reboot
if [ -x /usr/bin/linux_logo ];then
/usr/bin/linux_logo -c -n -f > /etc/issue
echo "" >> /etc/issue
else
> /etc/issue
fi
echo "$R" >> /etc/issue
echo "Kernel $(uname -r) on $ a $SMP$(uname -m) / \|" >> /etc/issue
if [ "$SECURITY" -le 3 ];then
echo "Welcome to %h" > /etc/issue.net
echo "$R" >> /etc/issue.net
echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue.net
else
echo "Welcome to Linux-Mandrake" > /etc/issue.net
echo "-------------------------" >> /etc/issue.net
fi
fi
----------------------------------------------
thanks again for all the help
-plasmid
Paul Weaver
10-07-2000, 10:37 AM
When you boot up your /etc/issue should be created and look something like
"Kernel 2.2.17 on a i686"
What does it look like?
plasmid
10-07-2000, 01:17 PM
when I boot up it says
"Kernel 2.2.15-4mdk on an i686 / tty1"
if I do a uname -srm I get
"Linux 2.2.17 i686"
ssadams
10-07-2000, 02:28 PM
here si my mandrake 7.1 rc.local...note the differences between yours and mine.
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
[ -f /etc/sysconfig/system ] && source /etc/sysconfig/system
[ -z "$SECURITY" ] && SECURITY=0
if [ -f /etc/mandrake-release ]; then
R=$(cat /etc/mandrake-release)
arch=$(uname -m)
a="a"
case "_$arch" in
_a*) a="an";;
_i*) a="an";;
esac
NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat`
if [ "$NUMPROC" -gt "1" ]; then
SMP="$NUMPROC-processor "
[ "$NUMPROC" = "2" ] && \
SMP="Bi-processor "
if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then
a="an"
else
a="a"
fi
fi
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
if [ -x /usr/bin/linux_logo ];then
/usr/bin/linux_logo -c -n -f > /etc/issue
echo "" >> /etc/issue
else
> /etc/issue
fi
echo "$R" >> /etc/issue
echo "Kernel $(uname -r) on $a $SMP$(uname -m) / \l" >> /etc/issue
if [ "$SECURITY" -le 3 ];then
echo "Welcome to %h" > /etc/issue.net
echo "$R" >> /etc/issue.net
echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue.net
else
echo "Welcome to Linux-Mandrake" > /etc/issue.net
echo "-------------------------" >> /etc/issue.net
fi
fi
Paul Weaver
10-07-2000, 02:55 PM
When was the last modified date on your /etc/issue?
type "ls -l /etc/issue"
should have something like
"-rw-r--r-- 1 root root 28 Oct 4 14:00 /etc/issue"
plasmid
10-07-2000, 03:08 PM
when I typed "ls -l /etc/issue", i was told that the date modified was Oct 5 17:09
-plasmid
plasmid
10-07-2000, 03:24 PM
Here is my entire rc.local file...I had left out the top part earlier because I didn't think it was relevant to the issue file. here it is...I don't see any differences. Do you?
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
[ -f /etc/sysconfig/system ] && source /etc/sysconfig/system
[ -z "$SECURITY" ] && SECURITY=0
if [ -f /etc/mandrake-release ]; then
R=$(cat /etc/mandrake-release)
arch=$(uname -m)
a="a"
case "_$arch" in
_a*) a="an";;
_i*) a="an";;
esac
NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat`
if [ "$NUMPROC" -gt "1" ]; then
SMP="$NUMPROC-processor "
[ "$NUMPROC" = "2" ] && \
SMP="Bi-processor "
if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then
a="an"
else
a="a"
fi
fi
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
if [ -x /usr/bin/linux_logo ];then
/usr/bin/linux_logo -c -n -f > /etc/issue
echo "" >> /etc/issue
else
> /etc/issue
fi
echo "$R" >> /etc/issue
echo "Kernel $(uname -r) on $a $SMP$(uname -m) / \l" >> /etc/issue
if [ "$SECURITY" -le 3 ];then
echo "Welcome to %h" > /etc/issue.net
echo "$R" >> /etc/issue.net
echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue.net
else
echo "Welcome to Linux-Mandrake" > /etc/issue.net
echo "-------------------------" >> /etc/issue.net
fi
fi
Let me know if you see something wrong in mine
-plasmid
plasmid
10-09-2000, 04:04 PM
I still haven't solved this problem yet. I was wondering if I removed the issue and issue.net files, will the rc.local script generate new files? let me know if this is safe and I will give it a try
-plasmid