:: Re: [DNG] /lib/modules on separate …
Top Pagina
Delete this message
Reply to this message
Auteur: Gregory Nowak
Datum:  
Aan: Marc Shapiro
CC: dng
Onderwerp: Re: [DNG] /lib/modules on separate partition?
On Sat, Nov 19, 2022 at 08:55:06PM -0800, Marc Shapiro via Dng wrote:
> 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?


You already got the answer on how to include all needed modules in the
initrd. As for mounting /lib/modules right after /, add a line similar
to the following in /etc/fstab right below the entry for /:

/dev/group-lvm /lib/modules ext4 defaults 0 1

This should cause /lib/modules to be mounted right after /. Replace
/dev/group-lvm with the volume containing /lib/modules. Also adjust
the file system type to whatever fs you're using.

On Sun, Nov 20, 2022 at 08:30:03PM +0100, karl@??? wrote:
> I long time woundered why the modules isn't stored together with the
> kernel (which currently is on /boot).


Probably for historical reasons, and because kmod would need to be
recompiled.

>
> Why not have /boot/modules and mount the boot partition at your bootup ?
> You can do:
> cd /
> ln -s boot/modules lib/modules


That won't work, because it assumes /lib/modules is already mounted.

Greg


--
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-manager@???