| View previous topic :: View next topic |
| Author |
Message |
GivePeaceAChance Guru

Joined: 26 May 2007 Posts: 480
|
Posted: Tue Feb 05, 2008 5:01 pm Post subject: [SOLVED] uname gives wrong output |
|
|
| 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 5:30 am; edited 2 times in total |
|
| Back to top |
|
 |
your_WooDness n00b

Joined: 25 Oct 2007 Posts: 36
|
Posted: Tue Feb 05, 2008 5:36 pm Post subject: |
|
|
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 |
|
 |
GivePeaceAChance Guru

Joined: 26 May 2007 Posts: 480
|
Posted: Tue Feb 05, 2008 5:39 pm Post subject: |
|
|
| 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 |
|
 |
your_WooDness n00b

Joined: 25 Oct 2007 Posts: 36
|
Posted: Tue Feb 05, 2008 6:07 pm Post subject: |
|
|
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 |
|
 |
GivePeaceAChance Guru

Joined: 26 May 2007 Posts: 480
|
Posted: Tue Feb 05, 2008 9:48 pm Post subject: |
|
|
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 |
|
 |
Hu Veteran

Joined: 06 Mar 2007 Posts: 2595
|
Posted: Tue Feb 05, 2008 10:46 pm Post subject: |
|
|
| 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 |
|
 |
Jaglover l33t


Joined: 28 May 2005 Posts: 743 Location: Cajun Country
|
Posted: Tue Feb 05, 2008 11:37 pm Post subject: |
|
|
| Did you keep installing new kernels and never mounted /boot beforehand? |
|
| Back to top |
|
 |
GivePeaceAChance Guru

Joined: 26 May 2007 Posts: 480
|
Posted: Fri Feb 22, 2008 2:09 am Post subject: |
|
|
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 |
|
 |
|