Cannot install modules [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Cannot install modules [Solved]

Postby fire_dragon » Fri Nov 02, 2012 12:12

Dear friends,
my problem is that I cannot install a module. Firstly I thought it is a specific module which I cannot install so I posted in network forum first, but it seems its a general problem.

This was the original thread:
viewtopic.php?f=52&t=28261

I had kernel 3.5.0, then I updated to 3.6.0 using kernel-switcher to test if the internal wlan module was working better, but it didn't. Then I tried to downgrade the kernel to 3.3.0, because the 3.3.0 is the only directory which got files in /usr/src/linux-3.3.0-sabayon/. the directories /usr/src/linux-3.5.0-sabayon/ and /usr/src/linux-3.6.0-sabayon/ are rather small, only like 4MB and 3.3.0 got 400+MB. For me as a beginner it seemed logical to downgrade to see if it can install the module to the 3.3.0 kernel since it gor the usr/src/linux-3.3.0-sabayon files.

I tried the following commands:

Code: Select all
# eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.3.0-sabayon *
  [2]   linux-3.5.0-sabayon
  [3]   linux-3.6.0-sabayon
  [4]   linux-3.6.2-gentoo


and

Code: Select all
# uname -r
3.6.0-sabayon


So it seems I did not switch the kernel back to 3.3.0 even though # eselect kernel list shows me a * at 3.3.0.

When I do 'make' at the module it gives me:
Code: Select all
# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.6.0-sabayon/build M=/home/ebo/Downloads/RTL  modules
make[1]: Entering directory `/usr/src/linux-3.6.0-sabayon'
Makefile:323: /usr/src/linux-3.6.0-sabayon/scripts/Kbuild.include: No such file or directory
Makefile:564: /usr/src/linux-3.6.0-sabayon/arch/x86/Makefile: No such file or directory
/bin/sh: /usr/src/linux-3.6.0-sabayon/scripts/gcc-goto.sh: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-3.6.0-sabayon/arch/x86/Makefile'.  Stop.
make[1]: Leaving directory `/usr/src/linux-3.6.0-sabayon'
make: *** [modules] Error 2


and 'make install' gives me:

Code: Select all
# make install
install -p -m 644 8192cu.ko  /lib/modules/3.6.0-sabayon/kernel/drivers/net/wireless/
install: cannot stat ‘8192cu.ko’: No such file or directory
make: *** [install] Error 1


So I see it still tries to copy to 3.6.0. before I updated to 3.6.0 it tried to copy to 3.5.0 (the active kernel that time)

When I use the following commands:

Code: Select all
# equery belongs /usr/src/linux-3.3.0-sabayon/scripts/Kbuild.include
 * Searching for /usr/src/linux-3.3.0-sabayon/scripts/Kbuild.include ...
sys-kernel/sabayon-sources-3.3-r4 (/usr/src/linux-3.3.0-sabayon/scripts/Kbuild.include)
#

# equery belongs /usr/src/linux-3.5.0-sabayon/scripts/Kbuild.include
 * Searching for /usr/src/linux-3.5.0-sabayon/scripts/Kbuild.include ...
#

# equery belongs /usr/src/linux-3.6.0-sabayon/scripts/Kbuild.include
 * Searching for /usr/src/linux-3.6.0-sabayon/scripts/Kbuild.include ...
#


Only the 3.3.0 can find something.

And I do not understand why the directory /usr/src/linux-3.6.0-sabayon/ got no files which in my opinion should be there. It got a makefile and a few other small files only.

So as a summation I think th eproblem is that the module tries to install to /usr/src/linux-3.6.0-sabayon/, where it cannot find the destination directories. It could find them only in /usr/src/linux-3.3.0-sabayon/.

Thank you.
Last edited by fire_dragon on Tue Nov 06, 2012 13:21, edited 1 time in total.
fire_dragon
Simple Hen
 
Posts: 47
Joined: Wed Oct 24, 2012 13:22

Re: Cannot install modules

Postby batvink » Fri Nov 02, 2012 14:26

I tried the following commands:

# eselect kernel list
Available kernel symlink targets:
[1] linux-3.3.0-sabayon *
[2] linux-3.5.0-sabayon
[3] linux-3.6.0-sabayon
[4] linux-3.6.2-gentoo

and

# uname -r
3.6.0-sabayon



So it seems I did not switch the kernel back to 3.3.0 even though # eselect kernel list shows me a * at 3.3.0.

Did you rebooted between those commands?
The command:
Code: Select all
make

is to compile the kernel.
To compile the modules:
Code: Select all
 make modules

and to install them:
Code: Select all
 make modules_install

you need to be root to install the modules.

so, in your case:
Code: Select all
eselect kernel set 1

then reboot. after reboot, you'll see that
Code: Select all
uname -r

points to 3.3.0
Then goto /usr/src/
and make sure that linux is pointing to "linux-3.3.0-sabayon"
you can check that with "ls -l" and looks like this:
Code: Select all
# ls -l /usr/src/linux
lrwxrwxrwx    1 root   root    12 Oct 13 11:04 /usr/src/linux -> linux-3.3.0-sabayon

Then
Code: Select all
cd /usr/src/linux

now, when only adjusting the modules, you don't have to recompile the whole kernel.,
just the modules:
Code: Select all
 make modules

followed by
Code: Select all
 make modules_install

Again, you need to be root to install the modules.
Latest (important) news about sabayon?
Watch Rigo's notice board, or surf to:
https://wiki.sabayon.org/index.php?title=Wiki_News
User avatar
batvink
Technological Hen
 
Posts: 405
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: Cannot install modules

Postby fire_dragon » Sat Nov 03, 2012 7:44

OK I did:

Code: Select all
# kernel-switcher switch linux-sabayon-3.3-r4


Code: Select all
# reboot


Code: Select all
# eselect kernel set 1


Code: Select all
# reboot


Then I get:

Code: Select all
# eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.3.0-sabayon *
  [2]   linux-3.5.0-sabayon
  [3]   linux-3.6.0-sabayon
  [4]   linux-3.6.2-gentoo


this one looks good I think
note: the gentoo kernel, I only loaded the sources once but never did compile it.

Code: Select all
# uname -r
3.6.0-sabayon


looks wrong

Code: Select all
ls -l /usr/src/linux
lrwxrwxrwx 1 root root 19 Nov  3 07:28 /usr/src/linux -> linux-3.3.0-sabayon


this entry looks also good to me

Code: Select all
# make modules
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.6.0-sabayon/build M=/home/ebo/Downloads/RTL  modules
make[1]: Entering directory `/usr/src/linux-3.6.0-sabayon'
Makefile:323: /usr/src/linux-3.6.0-sabayon/scripts/Kbuild.include: No such file or directory
Makefile:564: /usr/src/linux-3.6.0-sabayon/arch/x86/Makefile: No such file or directory
/bin/sh: /usr/src/linux-3.6.0-sabayon/scripts/gcc-goto.sh: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-3.6.0-sabayon/arch/x86/Makefile'.  Stop.
make[1]: Leaving directory `/usr/src/linux-3.6.0-sabayon'
make: *** [modules] Error 2


So its the same problem. Still trying to go to linux-3.0.6-sabayon

note: I actually don't want to use kernel 3.3.0, I tried this for testing only if the module can install there.

Thank you for your help.
fire_dragon
Simple Hen
 
Posts: 47
Joined: Wed Oct 24, 2012 13:22

Re: Cannot install modules

Postby batvink » Sat Nov 03, 2012 17:16

reboot?
Latest (important) news about sabayon?
Watch Rigo's notice board, or surf to:
https://wiki.sabayon.org/index.php?title=Wiki_News
User avatar
batvink
Technological Hen
 
Posts: 405
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: Cannot install modules

Postby fire_dragon » Sat Nov 03, 2012 18:39

In the command prompt I type in 'reboot' and my computer will restart.
fire_dragon
Simple Hen
 
Posts: 47
Joined: Wed Oct 24, 2012 13:22

Re: Cannot install modules

Postby sabayonino » Sat Nov 03, 2012 18:43

At boot choose 3.3.0 kernel or set new symlink in /usr/src while you are running 3.6.0 kernel
Code: Select all
# eselect kernel set 3

( [3] linux-3.6.0-sabayon)

If you are running 3.3.0 kernel , ALL modules loaded points to 3.3.0 k
User avatar
sabayonino
Sagely Hen
 
Posts: 1601
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Cannot install modules

Postby fire_dragon » Sat Nov 03, 2012 22:21

I switched back to kernel 3.6.0.

The symlink /usr/src/linux was pointing to /usr/src/linux-3.6.0-sabayon. (which is the 4MB dir)

I used this command to create a new symlink:

Code: Select all
ln -sf /usr/src/linux-3.3.0-sabayon /usr/src/linux


Now the symlink /usr/src/linux is pointing to /usr/src/linux-3.3.0-sabayon. (which is the 400+MB dir)

'make install' gives me the same error like before.

Thank you for your answers.
fire_dragon
Simple Hen
 
Posts: 47
Joined: Wed Oct 24, 2012 13:22

Re: Cannot install modules

Postby sabayonino » Sun Nov 04, 2012 1:06

ops ... maybe kernel sources missed

Chose yoor kernel with eselect kernel set 3 (kernel 3.3.0 I think)

Code: Select all
# equo install sabayon-sources-3.3-r4


try again

PS : you can create symlink /usr/src/linux running
Code: Select all
# eselect kernel set <N_kernel>
User avatar
sabayonino
Sagely Hen
 
Posts: 1601
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Cannot install modules

Postby fire_dragon » Mon Nov 05, 2012 14:50

OK I did:

equo install sabayon-sources-3.6-r1

This installed the files I needed.

Now I run kernel 3.6.0 and have the source files I need to install the module.

I did:

Code: Select all
# make modules


and

Code: Select all
# make modules install


rebooted

It did not accept 'make modules_install' like stated in the 2nd post.

Then I tried to blacklist the kernel driver.

Now, how can I see if my wifi card is really using the new driver?
fire_dragon
Simple Hen
 
Posts: 47
Joined: Wed Oct 24, 2012 13:22

Re: Cannot install modules

Postby sabayonino » Mon Nov 05, 2012 14:57

fire_dragon wrote:
Now, how can I see if my wifi card is really using the new driver?


Code: Select all
# lsmod


and make sure that is included as module in the kernel config

Code: Select all
# grep 8192 /usr/src/linux/.config
User avatar
sabayonino
Sagely Hen
 
Posts: 1601
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Next

Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 3 guests