[gentoo-user] How to disable the modules service?

2 views
Skip to first unread message

Dex Conner

unread,
Oct 23, 2022, 6:00:05 AM10/23/22
to
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
signature.asc

Peter Böhm

unread,
Oct 23, 2022, 6:50:03 AM10/23/22
to
Hi Dex,

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

Greetings,
Peter

Dex Conner

unread,
Oct 23, 2022, 7:40:03 AM10/23/22
to
On 22/10/23 12:45PM, Peter Böhm wrote:
> Hi Dex,
>
> we have a wiki article for this:
> 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
signature.asc

Dale

unread,
Oct 23, 2022, 7:50:03 AM10/23/22
to
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

:-)  :-) 

Dr Rainer Woitok

unread,
Oct 23, 2022, 10:30:03 AM10/23/22
to
Peter,

On Sunday, 2022-10-23 12:45:42 +0200, you wrote:

> ...
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

unread,
Oct 23, 2022, 11:10:04 AM10/23/22
to
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

Neil Bothwick

unread,
Oct 23, 2022, 11:40:05 AM10/23/22
to
On Sun, 23 Oct 2022 07:29:42 -0400, Dex Conner wrote:

> 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

unread,
Oct 24, 2022, 2:01:03 AM10/24/22
to
On 22/10/23 04:35PM, Neil Bothwick wrote:
> On Sun, 23 Oct 2022 07:29:42 -0400, Dex Conner wrote:
>
> > 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
signature.asc
Reply all
Reply to author
Forward
0 new messages