Hi Felix,

> > force_load efivarfs || true
>
> That invokes the following function when the initramfs is
> created (from /usr/share/initramfs-tools/hook-functions):
>
> # force_load module [args...]
> force_load()
> {
>         manual_add_modules "$1"
>         echo "${@}" >>"${DESTDIR}/conf/modules"
> }
>
> The hook could check if the module exists, but it seems more robust to
> do it at boot time.
>
> Is this a bug in mdadm or in initramfs-tools?

I am not sure. I think it's a question of expectation. When you have a UEFI
system and the efivarfs module cannot be loaded, then you'd expect the error.
However, when you have a non-UEFI system, you do not expect any message at
all. So I think it's mdadm's job to state this policy and ideally initramfs-
tools would make it as simple as possible to do so.

Maybe it's possible for mdadm to execute something similar to
manual_add_modules (being part of force_load in hook-functions) itself, which
does the right thing? If that works, it might be possible to rewrite this in a
more general way and make it available in initramfs-tools.

It guess, this is not the first time, that a module must be loaded
conditionally in the initramfs. Maybe bringing the issue to debian-devel might
lead to the solution.

Kind regards
Patrick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to