Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
genkernel adding arbitrary kernel module to initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
krotuss
Apprentice
Apprentice


Joined: 01 Aug 2008
Posts: 248

PostPosted: Mon Apr 07, 2025 5:42 pm    Post subject: genkernel adding arbitrary kernel module to initramfs Reply with quote

Hi,

I would like to add particular kernel modules from kernel/drivers/hwmon/ directory to initramfs. But according to documentation in '/etc/genkernel.conf' my choice seems to limited only to groups defined in '/usr/share/genkernel/defaults/modules_load'. I find this limitation rather surprising. Is this really the case and there is no way around this other than doing it manually or using '--all-ramdisk-modules' which may be overkill?
Back to top
View user's profile Send private message
rab0171610
Guru
Guru


Joined: 24 Dec 2022
Posts: 499

PostPosted: Mon Apr 07, 2025 5:59 pm    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Genkernel
Code:
Warning
genkernel is unmaintained; documentation presented here may be incomplete and may not reflect the current state of Gentoo tooling. Users encountering issues with genkernel will be asked to use another tool. Please see the Distribution kernel section in the Handbook for a supported alternative.

As long as you are aware of that, carry on. I am just curious if you had considered using dracut.conf to add drivers to your initramfs?
Code:
add_drivers+=" <kernel modules> "
           Specify a space-separated list of kernel modules to add to the
           initramfs. The kernel modules have to be specified without the
           ".ko" suffix.
Back to top
View user's profile Send private message
zen_desu
Apprentice
Apprentice


Joined: 25 Oct 2024
Posts: 235

PostPosted: Mon Apr 07, 2025 6:37 pm    Post subject: Reply with quote

https://github.com/desultory/ugrd/blob/main/docs/configuration.md#kernel-modules

If you're looking for other options, ugrd supports pulling and automatically initializing kmods with `kmod_init` or simply pulling the kernel module, to be used by something else with `kernel_modules`. These lists can be configured using any module alias the modinfo command recognizes.

You can also make it load all active modules with `kmod_autodetect_lsmod` (other than modules in masked categories such as video, sound, and network, unless you disable these filters)
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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