On Fri 26 Jan 2024 at 16:13:26 (+0100), Nicolas George wrote:
> Hi.
> 
> Yet another strange question. Is there a supportedĀ¹ way to have
> cryptsetup play a specific sound when it asks the password for the root
> partition from the initrd?
> 
> I think brttty (braille) is already running at this point (no occasion
> to test yet), but a recognizable sound would be something nice to
> propose I think.

It looks as if the root directory is decrypted by
/usr/share/initramfs-tools/scripts/local-top/cryptroot
and, from its prereqs, that this script makes sure it
is the last to run from scripts/local-top, by actually
being run from scripts/local-block/cryptroot.
(Correct me if I'm wrong: I'm a tyro in here.)

I notice that there is a slew of empty directories in
/etc/initramfs-tools/scripts/, and I can only assume
that anything you drop into these gets merged with
those in /usr/share/initramfs-tools/scripts/ when
the initramfs is built.

There is no scripts/local-block/ directory under /etc/,
possibly because it's not intended that you interfere
with the "ordering trick" mentioned above.

So I would try dropping a logging/printing script into
/etc/initramfs-tools/scripts/local-top/ in order to see
whether it runs, and at the right time. The script
could also look and see what support is already
available for making noises.

Cheers,
David.

Reply via email to