:: Re: [DNG] /lib/modules on separate …
Página Principal
Delete this message
Reply to this message
Autor: tito
Data:  
Para: dng
Assunto: Re: [DNG] /lib/modules on separate partition?
On Sat, 19 Nov 2022 20:55:06 -0800
Marc Shapiro via Dng <dng@???> wrote:

> I have multiple releases installed on separate LVM partitions. They
> frequently are using the same kernel, so I was thinking that it would be
> convenient to have a separate /boot partition and a separate
> /lib/modules partition that could be shared between them.  I don't
> expect any problems with /boot, since LILO saves the physical disk
> locations when it is run and uses these at boot time.  Separating
> /lib/modules, however, has issues.  Modules required to actually boot
> the system get loaded from the initrd, but others are loaded from the
> physical disk after / is mounted, and BEFORE other partitions are
> mounted, which includes /lib/modules.  This means that at the time that
> modules for, say, my graphics card are loaded, /lib/modules has not yet
> been mounted.  The system boots up just fine, but X does not start
> because the required kernel modules are not loaded.
>
> Is there a way to have the system mount /lib/modules immediately after
> mounting / and before loading the remaining kernel modules? Or even
> better, is there a way to have all modules that should be loaded during
> the boot process come from the initrd?
>
>
> Marc
>


Hi,
when your system is up:

cat /proc/modules | cut -d ' ' -f 1 >> modules.txt

and then add all/or part of the modules' names to:

/etc/initramfs-tools/modules
Specified modules will be put in the generated image and loaded when the system boots. The format - one per line - is identical to that of /etc/modules

then run:
update-initramfs -k all -u

That will generate a somewhat big initrd.
I don't know if the list in /proc/modules
is in loading order (but I suspect yes),
this could be a problem and re-ordering
could be needed to satisfy
modules' dependencies.

Hope this helps,
Ciao,
Tito