Pass modules to Linux kernel without initrd
From: Paul Menzel
Date: Tue Dec 08 2020 - 04:25:35 EST
Dear Linux folks,
Trying to reduce the boot time of standard distributions, I would like
to get rid of the initrd. The initrd is for mounting the root file
system and on most end user systems with standard distributions that
means loading the bus driver for the drive and the file system driver.
Everyone could build their own Linux kernel and build the drivers into
the Linux kernel, but most users enjoy using the distribution Linux
kernel, which build the drivers as modules to support a lot of systems.
(I think Fedora builds the default file system driver (of the installer)
into the Linux kernel.)
A custom minimal initrd init script only loading the modules would also
work, but as libkmod depends on libcrypto, which as a shared library is
already three megabytes in size. Building libkmod statically would mean
for distributions, that you need hooks to rebuild libkmod each time
OpenSSL is updated (to get the changes).
Similar to passing firmware and microcode update files to Linux or
building these into the Linux kernel image, would it be possible to
append the required modules to the Linux kernel image, and Linux would
load these?
Probably you are going to say, that is not how it works, but maybe I am
lucky and you know a solution, or could point me to the right direction
how such a think could be implemented.
Kind regards,
Paul