Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Modules JUST_WONT_INSTALL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Twenynge
n00b
n00b


Joined: 08 Jan 2010
Posts: 56

PostPosted: Sat Jul 12, 2014 2:05 am    Post subject: Kernel Modules JUST_WONT_INSTALL Reply with quote

I've installed Gentoo and have a bootable kernel but now I'm trying to get X working and install Gnome. The first time I compiled my kernel and modules I omitted some of the required parameters for X and systemd, so now I'm trying to replace the existing kernel modules with new ones. Using make menuconfig I've selected all the appropriate options, saved the config file, and successfully compiled the new kernel and modules. However, no matter what I try, the damned modules won't install. Specifically, I've got my nouveau module sitting happily in /usr/src/linux, but no permutation of the commands make menuconfig, make dep, dep clean, make install, make modules_install, make bzImage, genkernel -menuconfig all, or make justgetthefuckintotherightdirectory will move the module in the appropriate directory for use by the kernel. Given that I've been trying to accomplish this for two days, I'm at the point of calling for mercy. I've read the FAQs on the forums, read the handbook (repeatedly), read the wiki article on insetalling systemd and gnome from scratch, read other wiki articles pertaining to kernel compilation and installation, and none of them give any indication that what I've tried thus far won't work nor have they given any useful guidance on how to obviate this problem. I'm now under the impression that no one ever bothered documenting the proper methods in the wiki because the level of stupidity required to try to do it the way I've been trying it is unfathomable. Can anybody help point out how I'm being an idiot and help me correct this?

P.S. If any of you live near me, I'm considering offering $500 dollars for someone to come to my house and just show me how to do it. It's that bad...

P.P.S. It's not really that bad, but almost...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Sat Jul 12, 2014 2:15 am    Post subject: Reply with quote

Alright, pay for the gas and I will come and do it.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sat Jul 12, 2014 2:20 am    Post subject: Reply with quote

I think your most immediate problem is that you got so involved ranting that you completely failed to give us anything useful to use to help you. You listed some commands that you tried and said they do not work. What do they do instead? Do they claim to work, but not produce the desired result? Do they fail to run? If they claim to work, what are they actually doing? How can you tell that they are not working?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sat Jul 12, 2014 2:34 am    Post subject: Reply with quote

do you have a separate boot partition? if so, was it mounted when a new kernel was compiled and copied to the /boot directory?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Twenynge
n00b
n00b


Joined: 08 Jan 2010
Posts: 56

PostPosted: Sat Jul 12, 2014 5:13 am    Post subject: Reply with quote

Hu wrote:
I think your most immediate problem is that you got so involved ranting that you completely failed to give us anything useful to use to help you. You listed some commands that you tried and said they do not work. What do they do instead? Do they claim to work, but not produce the desired result? Do they fail to run? If they claim to work, what are they actually doing? How can you tell that they are not working?


Ranting is part of the install process. I'm pretty sure it even says so in the handbook. The commands "work" in the sense that they give no errors however the modules that exist in /usr/src/linux do not transfer to /lib/modules/. Specifically, /usr/src/linux-3.12.21-gentoo-r1/drivers/gpu/drm/nouveau/ never seems to find its way to /lib/modules/linux-3.12.21-gentoo-r1/kernel/drivers/gpu/drm/. I just ran the "make" command and noticed that many modules that I had removed using "make menuconfig" were being compiled, so I think I'm having trouble getting my config to stick for the "make" and "make install" process. How exactly do I ensure that the make command uses the .config file I've created and stored in /usr/src/linux-3.12.21-gentoo-r1/? How do I ensure that the "make install" command uses this config, or at least installs the modules currently residing in the /usr/src/linux/ directory and its subdirectories?

I'm confused because the existence of the /usr/src/linux-3.12.21-gentoo-r1/drivers/gpu/drm/nouveau/ directory indicates that I have been successful at some point in using the saved config (at least with the compilation part). Unfortunately, the "make install" or "make modules_install" command doesn't move this directory into /lib/modules/. I'm in the process of trying to learn linux so I'm in a position where I'd love provide all the information nedded to troubleshoot this issue, however I'm unsure as to what exactly would be helpful. I can tell you that I am currently facing NNW, my walls are a light beige color, and I don't know the current price of tea in China but can find out if it helps.

I'm pretty sure I could fix all this by wiping the drive and starting the install process over again, this time making sure that the first time I compiled and installed the kernel it included all the features I want, but I suppose my goal here is to learn the proper way to replace an existing kernel and modules and, Jebus willing, delete the old modules I installed but don' t need.


Last edited by Twenynge on Sat Jul 12, 2014 5:14 am; edited 1 time in total
Back to top
View user's profile Send private message
Twenynge
n00b
n00b


Joined: 08 Jan 2010
Posts: 56

PostPosted: Sat Jul 12, 2014 5:14 am    Post subject: Reply with quote

DONAHUE wrote:
do you have a separate boot partition? if so, was it mounted when a new kernel was compiled and copied to the /boot directory?


I do and it was.
Back to top
View user's profile Send private message
dnt
n00b
n00b


Joined: 30 Jun 2014
Posts: 2

PostPosted: Sat Jul 12, 2014 8:06 am    Post subject: Reply with quote

Could you pastebin your /usr/src/linux/.config?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Sat Jul 12, 2014 9:33 am    Post subject: Reply with quote

Twenynge,

I'll guess that you are running one kernel and building and installing (but not using) another.

What does
Code:
uname -a
show?
Code:
uname -a
Linux NeddySeagoon_Static 3.14.4-gentoo #1 SMP PREEMPT Sat May 17 22:18:23 BST 2014 x86_64 AMD Phenom(tm) II X6 1090T Processor AuthenticAMD GNU/Linux


Thats the version and build date and time of the running kernel. Look at both. Do they look correct.
What version of the kernel does
Code:
readlink /usr/src/linux
show?
You probably want these to be the same.

Guessing some more ... did you mount /boot before you installed a new kernel?
Thats not needed for modules only updates.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sat Jul 12, 2014 2:58 pm    Post subject: Reply with quote

Twenynge wrote:
Ranting is part of the install process. I'm pretty sure it even says so in the handbook.
I do not blame you for ranting in frustration, but ranting does not help us help you. When in doubt, please post not just a summary of what the command did, but a link to a pastebin showing your shell prompt, the command you entered, and all its output up to and including when your shell prompt returned. This is general advice, since some packages are prone to displaying subtle clues that you may not recognize until you have worked with them for a while.

My post gets a bit picky about semantics at places. Please do not take offense at this. I am not trying to belittle your inaccuracies, but rather to be precise about what should and should not happen.

Twenynge wrote:
The commands "work" in the sense that they give no errors however the modules that exist in /usr/src/linux do not transfer to /lib/modules/. Specifically, /usr/src/linux-3.12.21-gentoo-r1/drivers/gpu/drm/nouveau/ never seems to find its way to /lib/modules/linux-3.12.21-gentoo-r1/kernel/drivers/gpu/drm/.
We can work with that. As a minor point, you are not required to build the kernel in-tree. Building out of tree is more complex, so we should first get your system working once, then add the complexity later. In addition to the output requested by NeddySeagoon, please post also the output of ls -la /usr/src/linux-3.12.21-gentoo-r1/drivers/gpu/drm/nouveau/; find /lib/modules/`uname -r` -ls.
Twenynge wrote:
I just ran the "make" command and noticed that many modules that I had removed using "make menuconfig" were being compiled, so I think I'm having trouble getting my config to stick for the "make" and "make install" process. How exactly do I ensure that the make command uses the .config file I've created and stored in /usr/src/linux-3.12.21-gentoo-r1/? How do I ensure that the "make install" command uses this config, or at least installs the modules currently residing in the /usr/src/linux/ directory and its subdirectories?
This is a reasonable question based on your observations, but does not really make much sense with the kernel build system. If you run make from /usr/src/linux/ (or the equivalent versioned directory), the kernel Makefile will use ${KCONFIG_CONFIG:-.config} in ${KBUILD_OUTPUT:-.}. In the simple case, that should simplify down to ./.config. It is designed to do as you describe above, so if it is not, then there is likely some subtlety to your environment that we have not found yet.
Twenynge wrote:
I'm confused because the existence of the /usr/src/linux-3.12.21-gentoo-r1/drivers/gpu/drm/nouveau/ directory indicates that I have been successful at some point in using the saved config (at least with the compilation part). Unfortunately, the "make install" or "make modules_install" command doesn't move this directory into /lib/modules/.
Technically, the existence of that directory proves nothing. It was installed to hold the kernel sources for the nouveau driver and therefore existed even before you configured the kernel. However, if you did an in-tree kernel build (and most people do, since that is the default), then that directory would also contain any object files or kernel modules built for the nouveau module. Running make install is not supposed to move anything, since if it moved it, then you would need to build it again before you could re-run make install. Instead, it should copy it. From what you have said, either it is copying to the wrong place or it is not copying at all.

The kernel build respects passing V=1 to increase verbosity. In some places, this extra verbosity may show details that are normally suppressed as irrelevant, but could be useful here. Please pastebin the output of make install V=1 and provide the link here.
Back to top
View user's profile Send private message
Twenynge
n00b
n00b


Joined: 08 Jan 2010
Posts: 56

PostPosted: Sun Jul 13, 2014 7:51 pm    Post subject: Reply with quote

Okay, I managed to get the modules to install. As near as I can tell, I did two stupid things. First, I renamed the .config file to foo.config. As such my selections were never loaded when I ran "make". Secondly, I didn't run a " make mrproper" prior to rebuilding.

Could those have been my issues? What happens if you try to build and install a kernel (or any package for that matter) in an unclean environment?


Thanks for all the help on this one. It was good to learn that the existence of a directory in the source tree doesn't mean that the package/module has been built. I know it seems obvious but clearly I didn't know.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sun Jul 13, 2014 8:04 pm    Post subject: Reply with quote

The contents of .config tell the kernel what to build and install. If the active .config does not mention your modules, then make install would not install them.
Back to top
View user's profile Send private message
Twenynge
n00b
n00b


Joined: 08 Jan 2010
Posts: 56

PostPosted: Sun Jul 13, 2014 8:51 pm    Post subject: Reply with quote

Hu wrote:
The contents of .config tell the kernel what to build and install. If the active .config does not mention your modules, then make install would not install them.


Out of curiosity, what tells the make command to look for the .config file?
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sun Jul 13, 2014 9:10 pm    Post subject: Reply with quote

Try 'grep \.config /usr/src/linux/Makefile'. It should go some way to explaining how .config is selected,
and give some idea of how to use alternatives (which I've never done).

Will
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Sun Jul 13, 2014 9:27 pm    Post subject: Reply with quote

Twenynge,

When you run make, it looks at the rules to build object files and checks the timestamps
If all the source files are older than the existing object file, the old object file is used.
The rational being that all the files that are used te make it we last changed before the object was made, so it can't have changed.
There are a few circumstances where this is not true for the kernel but they are very rare. mrproper shold never be needed, make clean is sufficient but rarely needed.

Not using the right .config file was your problem
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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