Discussion:
[gentoo-user] How to disable the modules service?
(too old to reply)
Dex Conner
2022-10-23 10:00:02 UTC
Permalink
Hi all,

I've went module-less and the rc service called modules is still running
at startup even when I remove it with rc-update del modules boot. Is the
only way to solve this to remove the loaded modules from the config
files every time they are added?

Thank you!

--
Dex
Peter Böhm
2022-10-23 10:50:01 UTC
Permalink
Hi Dex,

we have a wiki article for this:
https://wiki.gentoo.org/wiki/Kernel_Modules#Going_completely_.22module-less.22

Greetings,
Peter
Post by Dex Conner
Hi all,
I've went module-less and the rc service called modules is still running
at startup even when I remove it with rc-update del modules boot. Is the
only way to solve this to remove the loaded modules from the config
files every time they are added?
Thank you!
--
Dex
Dex Conner
2022-10-23 11:40:01 UTC
Permalink
Post by Peter Böhm
Hi Dex,
https://wiki.gentoo.org/wiki/Kernel_Modules#Going_completely_.22module-less.22
Hello Peter,

Unfortunately I had already followed that guide for going module-less
and the rc service called modules is still running. I have found that it
is the /etc/init.d/modules file which sources some folders including
/usr/lib/modules-load.d which has a module in it. I think this module
(pkcs8_key_parser) gets created after I update iwd. Is there a way to
actually remove the modules service instead of removing the modules from
the directories repeatedly?

Thank you

--
Dex
Dale
2022-10-23 11:50:01 UTC
Permalink
Post by Dex Conner
Post by Peter Böhm
Hi Dex,
https://wiki.gentoo.org/wiki/Kernel_Modules#Going_completely_.22module-less.22
Hello Peter,
Unfortunately I had already followed that guide for going module-less
and the rc service called modules is still running. I have found that it
is the /etc/init.d/modules file which sources some folders including
/usr/lib/modules-load.d which has a module in it. I think this module
(pkcs8_key_parser) gets created after I update iwd. Is there a way to
actually remove the modules service instead of removing the modules from
the directories repeatedly?
Thank you
--
Dex
First, I don't know much about this.  I did read a bit of the article
linked to tho.  Could there be a USE flag that will make it not install
modules?  I recall seeing kmod mentioned for some packages.  It may not
apply here and if it doesn't, ignore me.  It could be worth looking into
what the USE flags add or remove, just to be sure.

Hope that helps.

Dale

:-)  :-) 
Neil Bothwick
2022-10-23 15:40:02 UTC
Permalink
Post by Dex Conner
Unfortunately I had already followed that guide for going module-less
and the rc service called modules is still running. I have found that it
is the /etc/init.d/modules file which sources some folders including
/usr/lib/modules-load.d which has a module in it. I think this module
(pkcs8_key_parser) gets created after I update iwd. Is there a way to
actually remove the modules service instead of removing the modules from
the directories repeatedly?
You could blacklist the module in /etc/modules.d, but will iwd still work
without it?
--
Neil Bothwick

Artificial Intelligence usually beats real stupidity.
Dex Conner
2022-10-24 06:00:01 UTC
Permalink
Post by Neil Bothwick
Post by Dex Conner
Unfortunately I had already followed that guide for going module-less
and the rc service called modules is still running. I have found that it
is the /etc/init.d/modules file which sources some folders including
/usr/lib/modules-load.d which has a module in it. I think this module
(pkcs8_key_parser) gets created after I update iwd. Is there a way to
actually remove the modules service instead of removing the modules from
the directories repeatedly?
You could blacklist the module in /etc/modules.d, but will iwd still work
without it?
That seems like a good idea but since I don't have modprobe after
setting -kmod, it throws an error. I think I should get some sort of
hook working after each iwd update so that the file is automatically
removed.

Thank you everyone

--
Dex

Dr Rainer Woitok
2022-10-23 14:30:01 UTC
Permalink
Peter,
Post by Peter Böhm
...
https://wiki.gentoo.org/wiki/Kernel_Modules#Going_completely_.22module-less.22
When I built my first Gentoo system in 2019, the Handbook instructed to
build anything sound related as modules, if I remember correctly. Is
this no longer true?

Sincerely,
Rainer
Peter Böhm
2022-10-23 15:10:02 UTC
Permalink
Rainer,

the handbook still recommends to build sound modules (and many many others) as
module, because it is easier than doing a static configuration. Now, you can
ask, why someone wants to build it static into the kernel. The answer is:
Security !

Maybe you know this wiki article:
https://wiki.gentoo.org/wiki/Signed_kernel_module_support

This is a pre-condition for enabling LOCKDOWN in the kernel ... OR ... you
have NO modules support (=monolithic kernel) ! So, you have the choice which
way you want to go.

I am using a monolithic kernel also. Dont try to enable lockdown in your
kernel if you use unsigned modules. ;-) I wrote a big warning in my wiki
article:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/
Kernel_Hardening_with_KSPP

Regards,
Peter
Post by Dex Conner
Peter,
Post by Peter Böhm
...
https://wiki.gentoo.org/wiki/Kernel_Modules#Going_completely_.22module-les
s.22
When I built my first Gentoo system in 2019, the Handbook instructed to
build anything sound related as modules, if I remember correctly. Is
this no longer true?
Sincerely,
Rainer
Loading...