You are not logged in.

#1 2011-11-29 00:27:16

nrujac
Member
Registered: 2011-11-29
Posts: 15

[Solved] Modules won't load, uname -r is wrong...?

Hey guys, I have my kernel installed from core, the package is listed as follows:

core/linux 3.1.2-1

Since updating to that version (I think it may be the first 3.1 kernel I've installed), I've had nothing but problems, and I finally tracked down the issue: *none* of my kernel modules are loading. So I checked the logs, and to my surprise, I'm getting an error at boot that I didn't notice previously. Namely, the file /lib/modules/3.0-ARCH/modules.dep can't be found. I found that really odd because the folders in /lib/modules are 3.1.2-1-ARCH and extramodules-3.1-ARCH. I first naively tried a symlink to see if I could just force the issue, but then the modules verbosely failed to load. At this point, I decided to just run a uname -a as a sanity check. The interesting part is the kernel-release so here's uname -r:

$ uname -r
3.0-ARCH

I want to be clear, I don't have a 3.0 kernel installed on this machine any longer. So why does my kernel think it's version is 3.0-ARCH? I've reinstalled all the relevant module related packages including the kernel itself and module-init-tools to no avail. I'm fairly certain I won't have this issue if I install a custom kernel, but that seems like taking a sledgehammer to the problem.

Anyone have any ideas?

Last edited by nrujac (2011-12-01 00:30:54)

Offline

#2 2011-11-29 01:24:05

cybertorture
Member
Registered: 2010-05-05
Posts: 339

Re: [Solved] Modules won't load, uname -r is wrong...?

there are 2 possibilities
1 - you did not reboot after kernel update ( not likely )
2 - you did nit update kernel image in /boot ( my best bet )


O' rly ? Ya rly Oo

Offline

#3 2011-11-29 02:33:49

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Modules won't load, uname -r is wrong...?

cybertorture wrote:

2 - you did nit update kernel image in /boot ( my best bet )

More accurately, /boot wasn't mounted when you updated the kernel.

Offline

#4 2011-11-29 04:39:32

nrujac
Member
Registered: 2011-11-29
Posts: 15

Re: [Solved] Modules won't load, uname -r is wrong...?

cybertorture wrote:

there are 2 possibilities
1 - you did not reboot after kernel update ( not likely )
2 - you did nit update kernel image in /boot ( my best bet )

I definitely have rebooted, multiple times. It was actually a reboot that caused all the issues suddenly. As for the kernel image in /boot, I'll check but I've reinstalled the linux package a couple of times with /boot explicitly mounted (I mounted all my partitions in a livecd and chrooted) and had the same issues.

Any other possibilities?

Offline

#5 2011-11-29 05:09:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Modules won't load, uname -r is wrong...?

http://mailman.archlinux.org/pipermail/ … 21829.html
Since linux-3.1-1 'uname -r' reports the full kernel version.

Last edited by karol (2011-11-29 05:09:59)

Offline

#6 2011-11-29 19:16:41

nrujac
Member
Registered: 2011-11-29
Posts: 15

Re: [Solved] Modules won't load, uname -r is wrong...?

Right, and that makes sense given what I see in the /lib/modules folder. However, that's not what 'uname -r' reports -- I'm still seeing 3.0-ARCH despite being on 3.1.2.

Thanks all.

Offline

#7 2011-11-29 19:20:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Modules won't load, uname -r is wrong...?

nrujac wrote:

Right, and that makes sense given what I see in the /lib/modules folder. However, that's not what 'uname -r' reports -- I'm still seeing 3.0-ARCH despite being on 3.1.2.

Thanks all.

Is your system up to date? What version of coreutils are you using?

Offline

#8 2011-11-29 19:38:09

nrujac
Member
Registered: 2011-11-29
Posts: 15

Re: [Solved] Modules won't load, uname -r is wrong...?

Yes. core-utils is at 8.14-1

Offline

#9 2011-11-29 19:48:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,791

Re: [Solved] Modules won't load, uname -r is wrong...?

Can you post your /boot/grub/menu.lst and the output of ls -l /boot   ??


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2011-11-30 23:11:54

nrujac
Member
Registered: 2011-11-29
Posts: 15

Re: [Solved] Modules won't load, uname -r is wrong...?

Not too sure I see the relevance, but sure. I use grub 2, so here's the relevant bit of my grub.cfg:

menuentry "Arch Linux" {

     search --fs-uuid --no-floppy --set=root #long uuid here#
     linux /boot/vmlinuz-linux root=/dev/sda1 rootflags=,subvol=boot radeon.modeset=1 rootfstype=btrfs ro add_efi_memmap
     initrd /boot/initramfs-linux.img

}

As for the contents of /boot, it's just the usual suspects:

bios.img
grub/
initramfs-linux-fallback.img
initramfs-linux.img
syslinux/
vmlinuz-linux

I'm really not sure what you're looking for. If it was as simple as making sure /boot was mounted, I'd already have taken care of it. I'm gonna keep digging and see if I can find anything.

My current thoughts... I recently (well, a month or so ago anyway) had to move /boot to it's own partition because of the btrfs set up I had been using. I keep my root partition compressed, which meant that every kernel update rendered the partition unbootable, until the root partition was remounted without compression and then the new kernel reinstalled. I successfully moved the boot directory to its own subvolume that isn't mounted compressed so that there are no issues after upgrades. This worked fine for a few weeks until 3.1 was pushed into stable. I'm wondering if for some reason the machine is booting off the last kernel I had installed prior to moving /boot to it's own subvolume/partition. I'll let you guys know if I find anything.

Offline

#11 2011-12-01 00:30:05

nrujac
Member
Registered: 2011-11-29
Posts: 15

Re: [Solved] Modules won't load, uname -r is wrong...?

I'm not too sure what went differently this time, but I seem to have fixed the problem. I unmounted /boot and moved the contents of the boot directory on the root partition to a back-up location. I then remounted /boot, reinstalled the kernel (there was an update sitting in stable), and reinstalled grub. Machine wouldn't boot now, which confirmed my suspicion, but I fixed a small error in my grub.cfg (I accidentally told it to load /boot as /), and the machine booted normally with all modules loaded. Thanks for your help guys. The odd suggestion to check the contents of /boot were what tipped me off to see if it was loading the wrong directory. In this case, my problem was that /boot *was* being mounted. Weird.

I'm gonna mark the thread solved.

Last edited by nrujac (2011-12-01 00:30:39)

Offline

#12 2014-05-14 23:37:41

ffcc
Member
Registered: 2013-09-10
Posts: 6

Re: [Solved] Modules won't load, uname -r is wrong...?

For the sake of helping others that might have the same problem allow me to revive this thread. I run accross the same issue (apparently) yesterday.

My guess is that you had 2 /boot directories. One in a separated partition (let's assume it s /dev/sda2 for clarity) and the other one in the root partition (the one mounted on /, in your case /dev/sda1). When you updated the kernel, the separated partition /boot (/dev/sda2) was mounted on top of the /boot directory from /dev/sda1. That's to say, you updated the kernel images in /dev/sda2 but not the ones located in the /boot directory in /dev/sda1.

When grub is loaded the /dev/sda2 boot partition is not yet mounted (it will get mounted once you boot the kernel and the /etc/fstab is read, unless you edit grub.cfg to mount it inside grub) so when running this 2 lines:

linux /boot/vmlinuz-linux root=/dev/sda1 rootflags=,subvol=boot radeon.modeset=1 rootfstype=btrfs ro add_efi_memmap
initrd /boot/initramfs-linux.img

the boot directory that is browsed is the one in /dev/sda1 (with an old kernel that you once installed) and not the one in /dev/sda2 with the new kernel images.

The solution is simple:

- dont mount the /dev/sda2 boot (comment the entry in /etc/fstab) as you dont need it once you have booted the kernel (you can delete the kernel images from this separated boot partition, but not the grub files! See below)
- leave the /boot directory in your root partition (/dev/sda1). You can now update the kernel of THIS /boot directory as the one in /dev/sda2 is not mounted on top of it. You can delete any grub files in this partition as grub will be looking for files in /dev/sda2 (see hereinbelow)
- if you want to reinstall grub (and still boot grub from /dev/sda2 and not from /dev/sda1) you just have to mount /dev/sda2 (on /grub for instance), edit grub.cfg or the scripts for that matter (if you want to add/remove an entry or change anything else) and run 'grub-install --boot-directory=/grub' (assuming you mounted /dev/sda2 on /grub)

Hope that helps people running accross this issue.

Regards

Offline

#13 2014-05-15 00:43:30

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Modules won't load, uname -r is wrong...?

Please don't necrobump, particularly solved threads: https://wiki.archlinux.org/index.php/Fo … Bumping.27



Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB