David Wright (12024-01-26): > 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.
Thanks for pulling on this plate of spaghetti for me. > 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. That would run the script just before cryptsetup is called. That is almost what I want, but the small gap is blocking: cryptsetup might ask for the password several times (if the user types it wrong), and the sound must be played again too in that case. Regards, -- Nicolas George