Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] uname gives wrong output
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
GivePeaceAChance
Guru
Guru


Joined: 26 May 2007
Posts: 480

PostPosted: Tue Feb 05, 2008 10:01 pm    Post subject: [SOLVED] uname gives wrong output Reply with quote

Code:

# uname -a
# 2.6.23-gentoo-r3

# uname -r
# 2.6.23-gentoo-r3

#readlink /usr/src/linux
# 2.6.23-gentoo-r6

# ls -ld /usr/src/linux
# 2.6.23-gentoo-r6


Why are each of these commands giving me different kernel versions? What version am I actually booting into, based on this?

As for X crashing:

# startx
# could not load /lib/modules/2.6.23-gentoo-r3/modules.de: No such file

^^ that's because I have a -r6 directory, but no -r3. Why is it looking in -r3, and how can I change it to look in r6

# Failed to load kernel module
# screens found, but no usable configuration
_________________
I am not a Linux Guru, but a n00b with a lot of questions. :)


Last edited by GivePeaceAChance on Fri Feb 22, 2008 10:30 am; edited 2 times in total
Back to top
View user's profile Send private message
your_WooDness
n00b
n00b


Joined: 25 Oct 2007
Posts: 70

PostPosted: Tue Feb 05, 2008 10:36 pm    Post subject: Reply with quote

Hi,

can you post "ls -al /boot" and "cat /boot/grub/menu.lst".
Seems as if you are booting -r3 kernel but have installed the -r6 modules...

WooD
Back to top
View user's profile Send private message
GivePeaceAChance
Guru
Guru


Joined: 26 May 2007
Posts: 480

PostPosted: Tue Feb 05, 2008 10:39 pm    Post subject: Reply with quote

Code:
 $ ls -al /boot
total 21296
drwxr-xr-x  5 root root    1024 Jan 27 16:13 .
drwxr-xr-x 19 root root    4096 Dec 14 16:01 ..
-rw-r--r--  1 root root       0 Apr 19  2007 .keep
-rw-r--r--  1 root root 1185527 Jan  5 19:45 System.map
-rw-r--r--  1 root root 1185527 Jan  5 19:45 System.map-2.6.21-gentoo-r4
-rw-r--r--  1 root root 1026433 Jan  5 19:45 System.map-2.6.21-gentoo-r4.old
drwxr-xr-x  4 root root    1024 Jan  5 19:47 boot
-rw-r--r--  1 root root   46667 Jan  5 19:45 config
-rw-r--r--  1 root root   46667 Jan  5 19:45 config-2.6.21-gentoo-r4
-rw-r--r--  1 root root  831685 Jan  5 19:45 fbsplash-emergence
drwxr-xr-x  2 root root    1024 Jan  5 19:47 grub
-rw-r--r--  1 root root 3237400 Jan  5 19:45 kernel-2.6.21-gentoo-r4
-rw-r--r--  1 root root 3235128 Feb  3 21:36 kernel-2.6.23-gentoo-r6
drwxr-xr-x  2 root root    1024 Jan  5 19:47 lost+found
-rw-r--r--  1 root root 2729912 Jan  5 19:45 vmlinuz
-rw-r--r--  1 root root 2729912 Jan  5 19:45 vmlinuz-2.6.21-gentoo-r4
-rw-r--r--  1 root root 2718424 Jan  5 19:45 vmlinuz-2.6.21-gentoo-r4.old
-rw-r--r--  1 root root 2718424 Jan  5 19:45 vmlinuz.old


$ cat /boot/grub/menu.lst
# 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 5
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed
# splashimage=(hd0,0)/boot/grub/splash.xpm.gz

#title          Ubuntu, kernel 2.6.20-16-generic
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.20-16-generic root=UUID=0a6119c8-cddb-4e95-a4c8-30dea08b2247 ro quiet splash
#initrd         /boot/initrd.img-2.6.20-16-generic
#quiet
#savedefault

title           Gentoo, kernel 2.6.21-gentoo-r4 (Fluxbox)
root            (hd0,0)
kernel  /boot/kernel-2.6.21-gentoo-r4 root=/dev/sda2

title           Gentoo, kernel 2.6.23-gentoo-r6 (KDE)
root            (hd0,0)
kernel  /boot/kernel-2.6.23-gentoo-r6 root=/dev/sda5 video=uvesafb:1920x1200-32,mtrr:3,ywrap

_________________
I am not a Linux Guru, but a n00b with a lot of questions. :)
Back to top
View user's profile Send private message
your_WooDness
n00b
n00b


Joined: 25 Oct 2007
Posts: 70

PostPosted: Tue Feb 05, 2008 11:07 pm    Post subject: Reply with quote

Hi there,

have you just renamed the kernel-2.6.23-gentoo-r3 from /boot into kernel-2.6.23-gentoo-r6? According to the /boot listing there should be no -r3 kernel that can be booted?!
Whatever... Boot "Gentoo, kernel 2.6.23-gentoo-r6 (KDE)" and login as root. Go to /usr/src/linux. Then "cp /proc/config.gz ./.
Then "chmod ugo+rwx config.gz" and "gzip -d config.gz". Then "mv config .config".

If /proc/config.gz doesn't exist, copy the /boot/config-2.6.21-gentoo-r4 to /usr/src/linux/ --> "cp /boot/config-2.6.21-gentoo-r4 /usr/src/linux/.config"

Now it's time to enter "make oldconfig" to setup the kernel config based on the old config, which works and just press enter when something is asked. When this is done do a "make && make install". If everything went fine, then a "make modules modules_install".

Reboot the new built kernel and enter "uname -a". Then the 2.6.23-r6 kernel should show up and also the /lib/modules should be ok....

WooD
Back to top
View user's profile Send private message
GivePeaceAChance
Guru
Guru


Joined: 26 May 2007
Posts: 480

PostPosted: Wed Feb 06, 2008 2:48 am    Post subject: Reply with quote

Hi,

I tried what you suggested, but no such luck. I'm pretty certain the issue is that "modules.dep" is unable to load, since whatever is looking for that file is looking in a folder that doesn't exist (-r3 as opposed to the existing -r6).
_________________
I am not a Linux Guru, but a n00b with a lot of questions. :)
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 6825

PostPosted: Wed Feb 06, 2008 3:46 am    Post subject: Reply with quote

your_WooDness wrote:

Then "chmod ugo+rwx config.gz"


No. There is no reason to give group and other write access to the configuration file. This would allow anyone to change the configuration that is used when the next kernel is built.

GivePeaceAChance: after installing the new kernel, what files are now in /boot and in /lib/modules?
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 3399
Location: Saint Amant, Acadiana

PostPosted: Wed Feb 06, 2008 4:37 am    Post subject: Reply with quote

Did you keep installing new kernels and never mounted /boot beforehand?
Back to top
View user's profile Send private message
GivePeaceAChance
Guru
Guru


Joined: 26 May 2007
Posts: 480

PostPosted: Fri Feb 22, 2008 7:09 am    Post subject: Reply with quote

Hi,

I tried redoing the whole thing, but I've come to the same issue. Could it in ANY WAY be related to the fact that this is how I did my kernel config:

I take a config I actually went through, from say 2.6.23-gentoo-r6 or whatever
Then...
make clean
make menuconfig [save it when prompted]
make && make modules
cp arch/i386/boot/bzImage /boot/
reboot

But still uname -r gives me a different kernel version than the one that I want.... this is ****ed up.

Also, I've cleaned up my /boot. I have nothing on there except the new kernel version and 2.6.21-r4 which is my stable gentoo's kernel. That one is untouched by this system AFAIK.

EDIT:

OK, so there was a folder called boot in /boot that had all the current stuff in it. I had seen that folder before, but had thought it was a recursive folder that just pointed to /boot. So I copied anything in /boot to /boot/boot and it appears to be working fine now. Not sure why there's a boot folder in /boot, but that's where apparently all the current configuration stuff for the kernel is.... Weird. I can't believe it though... I have reinstalled gentoo with KDE about three times, each time coming upon some weird **** like this, and a few days ago deepsixed my partition to start again, and now tonight I figure out that this was the issue? Damn.... At least I have a good day before going back to university to install stuff.
_________________
I am not a Linux Guru, but a n00b with a lot of questions. :)
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