Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev and loadable module support in kernel [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Sat Mar 23, 2013 11:57 pm    Post subject: udev and loadable module support in kernel [SOLVED] Reply with quote

Hi

I'm trying to setup a LAMP server to run moodle. It being a dedicated server box, I configured the kernel without support for loadable modules. But now, when updating the box, I notice amongst the emerge messages:
Code:
* Messages for package sys-apps/kmod-12-r1:

 *   CONFIG_MODULES:     is not set when it should be.
 *   CONFIG_MODULE_UNLOAD:       is not set when it should be.
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
What might have pulled in sys-apps/kmod then?
Code:
serv2 ~ # equery depends sys-apps/kmod
 * These packages depend on sys-apps/kmod:
sys-fs/udev-197-r8 (kmod ? >=sys-apps/kmod-12)
virtual/modutils-0 (sys-apps/kmod[tools])
So now I wonder: Can't one run an udev enabled system without having module support in the kernel?

I guess that a system with static hardware doesn't really need udev if thats the case, but then some other questions pop up:

1. How do I get rid of it?
2. Does anything else in the LAMP stack (or moodle) need module support? (pardon me if it's a silly question, but as far as I've come now, it doesn't seem so. Apache modules seem to be just apache modules and load well...)

Greetings gsoe


Last edited by gsoe on Mon Mar 25, 2013 1:18 am; edited 1 time in total
Back to top
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1520

PostPosted: Sun Mar 24, 2013 1:46 am    Post subject: Reply with quote

What such put sys-fs/udev -kmod in package.use?
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Sun Mar 24, 2013 9:59 am    Post subject: Reply with quote

Sorry, I was becoming tired when I wrote the post. Forgot to mention some things. I have
Code:
serv2 ~ # emerge --info | grep udev
serv2 ~ # emerge --info | grep kmod
serv2 ~ #
and only apache related stuff in package.use. Still kmod (and udev) won't go away:
Code:
serv2 ~ # emerge -uDvN world

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

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 kB
and
Code:

serv2 ~ # emerge --depclean

 * Depclean may break link level dependencies. Thus, it is
 * recommended to use a tool such as `revdep-rebuild` (from
 * app-portage/gentoolkit) in order to detect such breakage.
 *
 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 *
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence, it is often necessary to run `emerge --update
 * --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
>>> No packages selected for removal by depclean
>>> To see reverse dependencies, use --verbose
Packages installed:   198
Packages in world:    13
Packages in system:   42
Required packages:    198
Number removed:       0
serv2 ~ #
I've been investigating, but I found no conclusive answers. Most discussions cover problems about blockers when upgrading udev and circular dependencies. Nothing really about the kernel module stuff or simply getting rid of udev.

Greetings gsoe
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Sun Mar 24, 2013 11:36 am    Post subject: Reply with quote

I've come one step further now. I noticed, that the sys-fs/udev dependency is gone after removing kmod USE-flag. I wonder why I didn't see that yesterday. But anyhow, having
Code:
serv2 ~ # equery depends sys-apps/kmod
 * These packages depend on sys-apps/kmod:
virtual/modutils-0 (sys-apps/kmod[tools])
and
Code:
serv2 ~ # equery depends virtual/modutils-0
 * These packages depend on virtual/modutils-0:
serv2 ~ #
I decided to take the plunge and remove virtual/modutils. A
Code:
emerge --depclean
after that removed kmod and some other packages. But then the following happened:
Code:
serv2 ~ # emerge -uDavN world

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

Calculating dependencies... done!


[nomerge       ] virtual/modutils-0
[ebuild  N     ]  sys-apps/kmod-12-r1  USE="tools zlib -debug -doc -lzma -static-libs" 0 kB
[ebuild  N     ]   virtual/modutils-0  0 kB

Total: 2 packages (2 new), Size of downloads: 0 kB

 * Error: circular dependencies:

(sys-apps/kmod-12-r1::gentoo, ebuild scheduled for merge) depends on
 (virtual/modutils-0::gentoo, ebuild scheduled for merge) (buildtime)
  (sys-apps/kmod-12-r1::gentoo, ebuild scheduled for merge) (runtime)

 * Note that circular dependencies can often be avoided by temporarily
 * disabling USE flags that trigger optional dependencies.
To get virtual/modutils back, portage needs a little help:
Code:
serv2 ~ # USE="-*" emerge -av virtual/modutils

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

Calculating dependencies... done!
[ebuild  N     ] sys-apps/modutils-2.4.27-r1  0 kB
[ebuild  N     ] virtual/modutils-0  0 kB

Total: 2 packages (2 new), Size of downloads: 0 kB
Now the system seems to be in a consistent stage (as far as portage is concerned) and I got rid of kmod. Still, I have modutils, but at least it doesn't complain about the kernel not supporting loadable modules.

Any thoughts?

Greetings gsoe
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Sun Mar 24, 2013 3:15 pm    Post subject: Reply with quote

1. Wait hour or so, emerge --sync (this is for bug fix that happened only half an hour ago)
2. Enable USE="kmod" for sys-fs/udev and virtual/udev
3. Enable USE="tools" for sys-apps/kmod
4. emerge -av1 kmod (perhaps use --nodeps flag if circulars, but that means step 1. went wrong, and the mirror still haven't updated)
5. Enable those kernel options the kmod emerge complains about, otherwise you won't be able to load/unload modules, or even list them

And you should be all set.
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Sun Mar 24, 2013 3:41 pm    Post subject: Reply with quote

@ssuominen

Thanks, I'll look into it later.
But what I actually wanted was to run a monolithic server kernel without support for loadable modules. That's why the kmod complaints were buggering me, and I tried to get rid of it.

In the end I suppose that no harm's done, if kmod tries to load a non existent module into a monolithic kernel, at least if it exits gracefully.

Greetings gsoe
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Sun Mar 24, 2013 3:48 pm    Post subject: Reply with quote

gsoe wrote:
@ssuominen

Thanks, I'll look into it later.
But what I actually wanted was to run a monolithic server kernel without support for loadable modules. That's why the kmod complaints were buggering me, and I tried to get rid of it.

In the end I suppose that no harm's done, if kmod tries to load a non existent module into a monolithic kernel, at least if it exits gracefully.

Greetings gsoe


You should be able to avoid sys-apps/kmod entirely with USE="-kmod" in sys-fs/udev (and virtual/udev)
Back to top
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1520

PostPosted: Mon Mar 25, 2013 12:27 am    Post subject: Reply with quote

Who depends on virtual/modutils and the suppliers?
Code:
equery depends virtual/modutils sys-apps/kmod sys-apps/module-init-tools sys-apps/modutils
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Mon Mar 25, 2013 12:43 am    Post subject: Reply with quote

@quilosaq

Hi! I managed to get rid of kmod and sys-apps/module-init-tools is not installed. But the dependencies are like this:
Code:
serv2 ~ # equery depends virtual/modutils sys-apps/kmod sys-apps/module-init-tools sys-apps/modutils
 * These packages depend on virtual/modutils:

 * These packages depend on sys-apps/kmod:
sys-fs/udev-197-r8 (kmod ? >=sys-apps/kmod-12)
virtual/modutils-0 (sys-apps/kmod[tools])

 * These packages depend on sys-apps/module-init-tools:
virtual/modutils-0 (>=sys-apps/module-init-tools-3.2)

 * These packages depend on sys-apps/modutils:
virtual/modutils-0 (sys-apps/modutils)


Greetings gsoe
Back to top
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1520

PostPosted: Mon Mar 25, 2013 1:10 am    Post subject: Reply with quote

It seems that there is no problem. Isn't it?
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Mon Mar 25, 2013 1:17 am    Post subject: Reply with quote

Not really after I got rid of kmod. Of course being perfectionistic, one would want to get rid of the module tools, as they're not needed with a monolithic kernel.

Only thing really buggering me was the somewhat seriously sounding complaints from kmod.

I'll mark as solved.

Greetings gsoe
Back to top
View user's profile Send private message
libertytrek
Apprentice
Apprentice


Joined: 18 Jul 2007
Posts: 258

PostPosted: Thu Apr 04, 2013 1:07 pm    Post subject: Reply with quote

I just ran into this myself prepping for the udev update (replacing module-init-tools with kmod)...

I also run monolithic kernels on my servers...

So, am I correct that if I add -kmod to make.conf, I can just emerge -C kmod && emerge -C virtual/modutils before updating udev, I will get no more complaints?

If not, then I would call that a bug, no?
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Thu Apr 04, 2013 1:26 pm    Post subject: Reply with quote

Quote:
So, am I correct that if I add -kmod to make.conf, I can just emerge -C kmod && emerge -C virtual/modutils before updating udev, I will get no more complaints?

Basically yes. You won't get more complaints from kmod because it isn't there. But I never got rid of modutils. It seems that udev just needs some module loader to be satisfied.

But modutils at least doesn't complain about the kernel config like kmod does. I gather that will ensure that no "strange things will happen" or whatever the kmod complaint stated. It is a little dissatisfying though, that the system apparently can't be slimmed down to essentially needed packages.

By the way I had a few problems updating world after removing kmod. I don't know if they will persist after the last udev upgrade. Have a look at my second post if you experience similar problems.

Greetings gsoe
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Thu Apr 04, 2013 8:59 pm    Post subject: Reply with quote

There is now a bug about getting rid of the virtual/modutils requirement. It's part of the @system because there are some init scripts shipped with packages like sys-apps/openrc that don't check if modprobe and such are there or not, but simply assume they are. Those need to be fixed before we can proceed with dropping it from @system.

See, https://bugs.gentoo.org/463455

However it should be simple to use package.provided for getting rid of it, like:

Code:

# mkdir -p /etc/portage/profile


And adding a lines to /etc/portage/profile/package.provided, like:

Quote:

virtual/modutils-0
sys-apps/kmod-9999


Then:

Code:

# emerge -C modutils kmod


If something breaks, you get to keep the pieces.
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Thu Apr 04, 2013 9:57 pm    Post subject: Reply with quote

Ahh, I see! Thanks for the clarification. Reading the bugs I realize that the "problem" is quite deeply rooted in the system.

Greetings gsoe
Back to top
View user's profile Send private message
libertytrek
Apprentice
Apprentice


Joined: 18 Jul 2007
Posts: 258

PostPosted: Fri Apr 05, 2013 11:15 am    Post subject: Reply with quote

Thanks for the explanation ssuominen... it doesn't bother me enough to go mucking about with workarounds, I'll just wait for it to get officially fixed...

One question though... after reading the bug, it isn't obvious (to a non-programmer like me at least) what the actual fix will entail, so, will instructions be provided as to how to manually fix things up? Or maybe, again, all that will then be needed is an emerge -C modutils kmod, but this time without the breakage disclaimer?

Thanks again...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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