Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Modprobe uses the wrong kernel
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
Ayara
n00b
n00b


Joined: 01 Jul 2016
Posts: 4

PostPosted: Fri Jul 01, 2016 2:31 pm    Post subject: Modprobe uses the wrong kernel Reply with quote

Hello!
I've just installed Gentoo, and I had a problem when trying to load a module:
Code:

# modprobe fuse
modprobe: FATAL: Module fuse not found in directory /lib/modules/4.4.6-gentoo


The problem is, the kernel I'm using isn't 4.4.6 but 4.6.3, and the module does exist in /lib/modules/4.6.3-gentoo.
Both kernel versions are in /lib/modules and in /usr/src, but when I tried to run 'eselect kernel list' I could only see 4.6.3, which was selected, and /usr/src/linux points to /usr/src/4.6.3-gentoo.

Does someone know what's happening ?
Thank you for your answers.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7160
Location: almost Mile High in the USA

PostPosted: Fri Jul 01, 2016 2:36 pm    Post subject: Reply with quote

Well, the eselect kernel shouldn't have any effect unless you somehow got the tracking system all confused by copying or renaming files incorrectly... Modprobe uses the output of depmod and whatever's in /lib/modules/...

First off, are you sure you're running the 4.6.3 kernel (doesn't hurt to doublecheck with uname -a)? This would be the easiest solution.

Does "depmod -a" work or does it also give the wrong directory?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 402
Location: France

PostPosted: Fri Jul 01, 2016 2:39 pm    Post subject: Reply with quote

Hello.

You probably uninstalled your 4.4.6 kernel while using "emerge --depclean". Then emerging again should solve the problem.

++
Gi)
Back to top
View user's profile Send private message
Ayara
n00b
n00b


Joined: 01 Jul 2016
Posts: 4

PostPosted: Fri Jul 01, 2016 3:15 pm    Post subject: Reply with quote

Actually, both depmod -a and uname -a show 4.4.6, but the version of gentoo-sources I have installed is 4.6.3. I tried to recompile 4.4.6 to enable FUSE, but there is no Makefile in /usr/src/linux-4.4.6-gentoo ! I tried emerging gentoo-sources again, but it didn't solve it.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Fri Jul 01, 2016 4:09 pm    Post subject: Reply with quote

Code:
emerge -pv gentoo-sources


What version of sources will this install?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Ayara
n00b
n00b


Joined: 01 Jul 2016
Posts: 4

PostPosted: Fri Jul 01, 2016 5:10 pm    Post subject: Reply with quote

This installs 4.6.3:

Code:

$ emerge -pv gentoo-sources

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-kernel/gentoo-sources-4.6.3:4.6.3::gentoo  USE="-build -experimental -kdbus -symlink" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Fri Jul 01, 2016 5:18 pm    Post subject: Reply with quote

You need to execute
Code:
emerge -av =gentoo-sources-4.4.6
to [re]install sources for 4.4.6.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 690

PostPosted: Sat Jul 02, 2016 8:01 am    Post subject: Reply with quote

Ayara wrote:
Actually, both depmod -a and uname -a show 4.4.6, but the version of gentoo-sources I have installed is 4.6.3. I tried to recompile 4.4.6 to enable FUSE, but there is no Makefile in /usr/src/linux-4.4.6-gentoo ! I tried emerging gentoo-sources again, but it didn't solve it.

Problem 1 is that you may have installed the sources for 4.6.3, but something went wrong between there and the kernel you are running. I presume you built the new kernel
Code:
cd /usr/src/linux-4.6.3-gentoo
make
make modules_install

so did you then install that kernel to /boot? (I use "make install", but there are several other ways including copying the vmlinuz and initramfs (if any)). If you have a separate boot partition, did you remember to mount if before installing the kernel? And did you reconfigure your boot loader to use it (this may not be necessary, depending on how you installed it).

Problem 2, as implied in other posts, the reason you have no Makefile for 4.4.6 is that you've run "emerge --depclean", and it's wiped the 4.4.6 sources, though not your old configuration, which is why you could configure FUSE but not make the kernel. Note that to fix this, you need to
Code:
emerge =sys-kernel/gentoo-sources-4.4.6

Note that you must have the "=" and "-4.4.6" or you merely reinstall 4.6.3, which is no help.
_________________
Greybeard
Back to top
View user's profile Send private message
Ayara
n00b
n00b


Joined: 01 Jul 2016
Posts: 4

PostPosted: Sat Jul 02, 2016 9:24 am    Post subject: Reply with quote

OK, I had assumed that /boot was mounted when I compiled the kernel, but it wasn't...
Thanks for your help, it works now!
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