Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wrong kernel is loading
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dingfelder
Apprentice
Apprentice


Joined: 27 Jun 2007
Posts: 162
Location: New Zealand

PostPosted: Mon Aug 27, 2007 12:54 am    Post subject: wrong kernel is loading Reply with quote

I am seeing some strange behavior.

It seems that my system is coming up under the wrong kernel and I can not figure out why.

Here is what I did:

Get rid of all old sources
Code:
# emerge -C gentoo-sources


get the latest version
Code:
# emerge gentoo-sources


verify that I have only the right src I want

Code:
# ls -al /usr/src
drwxr-xr-x 20 root root 4096 Aug 28 00:18 linux-2.6.22-gentoo-r5
lrwxrwxrwx  1 root root   32 Aug 27 23:19 linux -> /usr/src/linux-2.6.22-gentoo-r5/


configure the kernel
Code:
# cd /usr/src/linux
# make menuconfig


make the kernel
Code:
# make clean && make && make modules_install
# mount /boot && make install
# make modules_install


verify that the /boot looks right, and the boot image is pointing to the new kernel

Code:
# ls -al /boot
total 13399
drwxr-xr-x  5 root root    1024 Aug 28 00:17 .
drwxr-xr-x 21 root root    4096 Jul 11 05:28 ..
-rw-r--r--  1 root root       0 Apr 20 11:54 .keep
-rw-r--r--  1 root root       0 Jul  5 08:42 .keep_sys-boot_lilo-0
lrwxrwxrwx  1 root root      27 Aug 28 00:17 System.map -> System.map-2.6.22-gentoo-r5
-rw-r--r--  1 root root  875105 Aug 28 00:17 System.map-2.6.22-gentoo-r5
lrwxrwxrwx  1 root root       1 Jun 27 03:32 boot -> .
lrwxrwxrwx  1 root root      23 Aug 28 00:17 config -> config-2.6.22-gentoo-r5
-rw-r--r--  1 root root   31967 Aug 28 00:17 config-2.6.22-gentoo-r5
drwxr-xr-x  2 root root    1024 Aug 27 23:37 grub
drwx------  2 root root   12288 Jun 27 02:05 lost+found
drwxr-xr-x  2 root root    1024 Aug 27 22:22 old
lrwxrwxrwx  1 root root      24 Aug 28 00:17 vmlinuz -> vmlinuz-2.6.22-gentoo-r5
-rw-r--r--  1 root root 2366960 Aug 28 00:17 vmlinuz-2.6.22-gentoo-r5


update grub to point to the new linked kernel
Code:
# cd /boot/grub
# grub


reboot.

Code:
#shutdown -r now


When I get back in, the system is using the wrong kernel (2.6.21-gentoo-r3 instead of 2.6.22-gentoo-r5)

Code:
# uname -r
2.6.21-gentoo-r3


Anyone have any ideas for what I am messing up?
Back to top
View user's profile Send private message
polle
Veteran
Veteran


Joined: 28 Feb 2003
Posts: 1498
Location: Belgium

PostPosted: Mon Aug 27, 2007 1:18 am    Post subject: Reply with quote

you have to edit also grub.conf (or menu.lst) in /boot/grub to point to the new kernel

http://gentoo-wiki.com/HOWTO_Quick_GRUB#Step_3:_The_GRUB_Configuration_File
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Aug 27, 2007 1:22 am    Post subject: Reply with quote

Before mounting /boot, can you take a look at the directory and post the contain.

Maybe you have already something the false /boot.

Also, before mounting /boot, can you output the contain of mount.
Back to top
View user's profile Send private message
dingfelder
Apprentice
Apprentice


Joined: 27 Jun 2007
Posts: 162
Location: New Zealand

PostPosted: Mon Aug 27, 2007 1:26 am    Post subject: Reply with quote

my grub.conf contains:
Code:
# nano /boot/grub/grub.conf
  GNU nano 2.0.6                     File: /boot/grub/grub.conf                                                 

default 0
timeout 30
splashimage=(hd1,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux
root (hd1,1)
kernel vmlinuz real_root=/dev/hda8 udev

# Only in case you want to dual-boot
title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1


In this case, using kernel vmlinuz real_root=/dev/hda8 udev,
vmlinuz = a link (vmlinuz -> vmlinuz-2.6.22-gentoo-r5)

the link was automagically created by make install after it copied in vmlinuz-2.6.22-gentoo-r5 from /usr/src/linux/arch/i386/boot/bzImage
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Aug 27, 2007 4:08 pm    Post subject: Reply with quote

Yeah you are right on that, but what is the contain of /boot before mounting /boot from elsewhere...
Back to top
View user's profile Send private message
keyson
l33t
l33t


Joined: 10 Jun 2003
Posts: 830
Location: Sweden

PostPosted: Mon Aug 27, 2007 6:52 pm    Post subject: Reply with quote

Hi

Yes d2_racing is right about that. I think you did the kernel install without
mounting the boot partition. So the mountpoint /boot is containing the
vmlinuz-2.6.22-gentoo-r5.

But the grub is pointing on (hd1.1) and this is where it finds the 2.6.21-gentoo-r3.

Mount /dev/hdb2 on /mnt or any other mount point, and you will find that this
contains the kernel 2.6.21-gentoo-r3.

Then you can get the nvidia driver to play :-)

EDIT: But you have to fix this /boot issue first :wink:
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Aug 27, 2007 7:06 pm    Post subject: Reply with quote

Ok, we are waiting for the result :)
Back to top
View user's profile Send private message
dingfelder
Apprentice
Apprentice


Joined: 27 Jun 2007
Posts: 162
Location: New Zealand

PostPosted: Mon Aug 27, 2007 9:29 pm    Post subject: Reply with quote

ok, now I feel silly.

I had both grub and lilo emerged, and I was configuring grub after the kernel changes, while the system was actually using lilo :)

I un emerged grub, configured lilo, and all is good now :)

Thanks for your patience guys!
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Aug 28, 2007 1:53 am    Post subject: Reply with quote

No problem :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum