Mailing List Archive

How to disable the modules service?
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
Re: How to disable the modules service? [ In reply to ]
Hi Dex,

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

Greetings,
Peter

Am Sonntag, 23. Oktober 2022, 11:56:00 CEST schrieb 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
Re: How to disable the modules service? [ In reply 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
Re: How to disable the modules service? [ In reply to ]
Dex Conner wrote:
> 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


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

:-)? :-)?
Re: How to disable the modules service? [ In reply to ]
Peter,

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

> ...
> we have a wiki article for this:
> 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
Re: How to disable the modules service? [ In reply 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

Am Sonntag, 23. Oktober 2022, 16:19:49 CEST schrieb Dr Rainer Woitok:
> Peter,
>
> On Sunday, 2022-10-23 12:45:42 +0200, you wrote:
> > ...
> > we have a wiki article for this:
> > 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
Re: How to disable the modules service? [ In reply 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.
Re: How to disable the modules service? [ In reply 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