:: Re: [DNG] /lib/modules on separate …
Página Inicial
Delete this message
Reply to this message
Autor: Marc Shapiro
Data:  
Para: dng
Tópicos Antigos: Re: [DNG] /lib/modules on separate partition?
Assunto: Re: [DNG] /lib/modules on separate partition? (Not SOLVED, but DONE)

On 11/20/22 19:14, Marc Shapiro wrote:
>
> On 11/20/22 17:48, Gregory Nowak wrote:
>> On Sun, Nov 20, 2022 at 03:44:46PM -0800, Marc Shapiro via Dng wrote:
>>> On 11/20/22 14:31, Gregory Nowak wrote:
>>>> 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.
>>> That was the first thing that I tried, since it would be the easiest
>>> and not
>>> required any additional steps when a new kernel is installed.
>>> Unfortunately, /lib/modules still mounts along with all the rest of my
>>> partitions, after the modules are loaded.
>> So almost certainly, the modules are being loaded and the root fs is
>> being mounted in the initrd, before /etc/fstab gets read. Including
>> all the modules in the initrd maybe your only option then.
>>
>> Greg
>
> I found another way, which works on Debian Stretch, but not on Devuan
> Beowulf:
>
> I got the list of modules, as Tito suggested, but instead of updating
> the initrd, I put the list of modules into /etc/modules. In Stretch,
> this causes them to load after /lib/modules is mounted and everything
> works as it should.  For some reason, though, it does not work for
> Beowulf.  I also tried putting the list in a conf file in
> /etc/modules-load.d, but that didn't work, either. It would seem that
> updating the initrd may, in fact, be the only workable option.
>
> Marc
>

I think, when all is said and done, that I am just going to stick with
the duplicated modules.  It's safer that way.  I was testing things on
my "Stretch" partition and the initrd came out only just over a third
the size of the initrd generated when the kernel was installed.  That
worries me.  I expected it to be larger, not smaller.  Additionally,
lilo ran automatically after the initrd was built, which I wasn't
expecting, either.  If I hadn't caught that, then I would have been in
trouble when I rebooted, since that lilo.conf has not been updated since
I started using Devuan.

All in all, copying a single directory of modules to another partition,
or two, is less work, and safer, than rebuilding the initrd.  If I mount
/boot separately, so it isn't duplicated, then that is all I have to
do.  I might think differently if disk space were an issue, but it's
not.  This has been an interesting experiment, but I think it's done. 
Thank you to all who have replied.


Marc