View previous topic :: View next topic |
Author |
Message |
NightHeart n00b
Joined: 19 Dec 2003 Posts: 20
|
Posted: Fri May 28, 2004 4:27 pm Post subject: Wierd Kernel Problem---Please Help!!! |
|
|
I have installed the 2.6.4-ck kernel and I tried to follow the directions as closely as possible to the ones given in the gentoo handbook. (Before this I was using the 2.4.20-gentoo-r8 kernel.)
Unfortunately, whenever I boot or use the "uname -r" command, it says that I am still using the 2.4.20-gentoo-r8 kernel. I have deleted the 2.4.20-gentoo-r8 from the /usr/src directory. The linux in /usr/src is linked to the ck kernel. In my boot directory, I have this:
Code: | bash-2.05b# ls -l
total 6105
-rw-r--r-- 1 root root 970686 Apr 23 16:52 System.map-2.6.4-ck1
-rw-r--r-- 1 root root 990052 Apr 2 16:32 System.map-2.6.4_r1
lrwxrwxrwx 1 root root 1 Apr 16 17:05 boot -> .
-rw-r--r-- 1 root root 2183985 Apr 2 16:27 ck-kernel-2.6.4-r1
-rw-r--r-- 1 root root 26292 Apr 2 16:33 config-2.6.4-r1
drwxr-xr-x 2 root root 80 Apr 2 16:39 grub
-rw-r--r-- 1 root root 2069782 Apr 23 16:52 kernel-2.6.4-ck1
|
My grub.conf looks like this:
Code: | # Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# How many seconds to wait before the default listing is booted.
timeout 30
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed
#splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo
# Partition where the kernel image (or operating system) is located
root (hd1,0)
kernel /kernel-2.6.4-ck1 root=/dev/hdb3
# The next three lines are only if you dualboot with a Windows system.
# In this case, Windows is hosted on /dev/hda6.
title=Windows XP
rootnoverify (hd0,0)
chainloader +1
|
Does anybody have any idea what I can do to fix this so that it recognizes that I really am using the 2.6.4-ck kernel instead of the 2.4.20-gentoo-r8 kernel?? Thanks. |
|
Back to top |
|
|
Kope Tux's lil' helper
Joined: 17 May 2004 Posts: 136
|
Posted: Fri May 28, 2004 4:34 pm Post subject: |
|
|
For some reason you're using an old include/linux/version.h file.
Back up your /usr/src/linux/.config file, do a make mrproper
and remake the kernel.
If that doesn't work, go edit the version.h file by hand. _________________ "Computers are useless -- they only give you answers!" -- Pablo Picasso |
|
Back to top |
|
|
NightHeart n00b
Joined: 19 Dec 2003 Posts: 20
|
Posted: Fri May 28, 2004 4:47 pm Post subject: |
|
|
Kope wrote: | For some reason you're using an old include/linux/version.h file.
Back up your /usr/src/linux/.config file, do a make mrproper
and remake the kernel.
If that doesn't work, go edit the version.h file by hand. |
I'm a little confused.
I ran "slocate" and looked for all "version.h" files on my computer. I only found 2 that seemed like they might have anything to do with the linux kernel at all. They were :
/usr/include/linux/version.h
and
/usr/src/linux-2.6.4-ck1/include/linux/version.h
When I edited them to see what they said, the /usr/include/linux/version.h said:
Code: | #define UTS_RELEASE "2.4.21"
#define LINUX_VERSION_CODE 132117
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) |
Which doesn't seem right because my kernel is saying it is 2.4.20-gentoo-r8.
And the one in the other directory said:
Code: | #define UTS_RELEASE "2.6.4-ck1"
#define LINUX_VERSION_CODE 132612
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) |
Which is what it is supposed to say.
I'm also not really familiar with the "make mrproper" that you mentioned. I'm fairly new to linux so could you help me understand exactly what you mean that I should do.
Thanks again for all your help. |
|
Back to top |
|
|
Kope Tux's lil' helper
Joined: 17 May 2004 Posts: 136
|
Posted: Fri May 28, 2004 5:19 pm Post subject: |
|
|
as root cd to /usr/src/
ls -l
check that /usr/src/linux is a sym-link to the kernel you want to use
cd linux
cp .config backupconfig
make mrproper
cp backupconfig .config
cat /usr/src/linux/include/lnux/version.h
check that the #define UTS_RELEASE is what you want it to be
pwd
you should still be in /usr/src/linux
make && make modules_install
cp arch/<your architecture>/boot/bzImage /boot/<whatever you want your kerenel called>
cp System.map /boot
cp .config /boot/current_config
if you're using grub edit grub.conf to point to the kernel
if you're using lilo do whatever you need to do to make lilo work and reboot
log in and do a uname -a and all should be fixed. _________________ "Computers are useless -- they only give you answers!" -- Pablo Picasso |
|
Back to top |
|
|
NightHeart n00b
Joined: 19 Dec 2003 Posts: 20
|
Posted: Fri May 28, 2004 5:37 pm Post subject: |
|
|
I started following your instructions, but I reached a slight problem.
On this line right here:
Code: | cat /usr/src/linux/include/lnux/version.h |
I realize that you meant:
Code: | cat /usr/src/linux/include/linux/version.h |
instead.
Unfortunately, it is telling me that this file does not exist. Should I just go on with the rest of the directions or is the absence of this file the cause of my problem?
Thanks again. |
|
Back to top |
|
|
NightHeart n00b
Joined: 19 Dec 2003 Posts: 20
|
Posted: Fri May 28, 2004 5:42 pm Post subject: |
|
|
OK, I jsut realized something. The version.h file was there before, but now it is not.
When I did the "make mrproper" command, it must have deleted it. Am I okay, or was that really bad? |
|
Back to top |
|
|
NightHeart n00b
Joined: 19 Dec 2003 Posts: 20
|
Posted: Fri May 28, 2004 6:29 pm Post subject: |
|
|
Kope wrote: | as root cd to /usr/src/
ls -l
check that /usr/src/linux is a sym-link to the kernel you want to use
cd linux
cp .config backupconfig
make mrproper
cp backupconfig .config
cat /usr/src/linux/include/lnux/version.h
check that the #define UTS_RELEASE is what you want it to be
pwd
you should still be in /usr/src/linux
make && make modules_install
cp arch/<your architecture>/boot/bzImage /boot/<whatever you want your kerenel called>
cp System.map /boot
cp .config /boot/current_config
if you're using grub edit grub.conf to point to the kernel
if you're using lilo do whatever you need to do to make lilo work and reboot
log in and do a uname -a and all should be fixed. |
Okay, this is what I did.
I followed these directions exactly, except that when I saw that I din't have the "version.h" file, I just made it and copied this into it:
Code: | #define UTS_RELEASE "2.6.4-ck1"
#define LINUX_VERSION_CODE 132612
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) |
Then I continued on with your directions. After I rebooted though, I ran "uname -r" and I still get this:
Code: | bash-2.05b# uname -r
2.4.20-gentoo-r8 |
Do you have anymore ideas? |
|
Back to top |
|
|
Kope Tux's lil' helper
Joined: 17 May 2004 Posts: 136
|
Posted: Sun May 30, 2004 7:40 pm Post subject: |
|
|
NightHeart,
ok .. the include/linux/version.h file is generated from the top level Makefile in /usr/src/linux. It's one of the first things that the make file does.
cd to /usr/src and do a ls -l and post the results here.
Next cd /usr/src/linux
and do
head Makefile
and post the results.
Mine (the mm-source tree) give this:
Code: |
daw@porgy linux $ head Makefile
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 7
EXTRAVERSION =-rc1-mm1
NAME=Zonked Quokka
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
# More info can be located in ./README
# Comments in this file are targeted only to the developer, do not
|
Now, that corresponds exactly to my version.h file:
Code: |
daw@porgy linux $ cat /usr/src/linux/include/linux/version.h
#define UTS_RELEASE "2.6.7-rc1-mm1"
#define LINUX_VERSION_CODE 132615
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
The reason is is that in /usr/src/linux/Makefile there is this line:
Code: |
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
|
Which becomes the entry in version.h through this routine:
Code: |
define filechk_version.h
if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi; \
(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \
echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \
)
endef
include/linux/version.h: Makefile
$(call filechk,version.h)
|
For what you see happening to happen one of two things must be true. Either you aren't using the kernel image to boot that you think you are, or you're not compiling the kernel you think you are. _________________ "Computers are useless -- they only give you answers!" -- Pablo Picasso |
|
Back to top |
|
|
DayLung Tux's lil' helper
Joined: 13 Mar 2003 Posts: 80
|
Posted: Tue Jun 01, 2004 1:22 am Post subject: |
|
|
|
|
Back to top |
|
|
NightHeart n00b
Joined: 19 Dec 2003 Posts: 20
|
Posted: Tue Jun 01, 2004 1:24 am Post subject: |
|
|
Thanks DayLung. That fixed it. |
|
Back to top |
|
|
|