After upgrading from Debian 11 to Debian 12 (as part of which was an upgrade of GRUB 2 from 2.06-3~deb11u5 to 2.06-13) on a system with separately encrypted /
and /boot
both using LUKS, GRUB began prompting for the LUKS passphrase to unlock the container holding the root file system even though it had no need for it (and in fact booted perfectly fine if I just pressed Enter at that prompt).
The relevant part of the file system layout is:
- GPT partitioning
- partition 2
- LUKS1 container
/boot
- LUKS1 container
- partition 3
- LUKS2 container
/
- LUKS2 container
- partition 2
This setup is based on the description of setting up encrypted /boot
with GRUB 2 >=2.02~beta2-29 on Debian (also).
Repeated web searches did not bring up anything relevant, so armed with the LUKS container UUID (from cryptsetup luksDump
) I started sleuthing through /boot/grub/grub.cfg
to see where it referenced the LUKS container holding /
. Surprisingly, I found it near the top, generated through /etc/grub.d/00_header
, in a seemingly unrelated place: code intended to load fonts. This was somewhat unexpected because the second prompt actually appeared after a replacement font appeared to already have been loaded.
Looking through /etc/grub.d/00_header
and trying to match what I was seeing in grub.cfg
against its generation logic, I found that the location of the container UUID within grub.cfg
matched a prepare_grub_to_access_device
call described in an immediately preceding comment as “Make the font accessible”.
That, in turn, was controlled by $GRUB_FONT
.
With this newfound knowledge, I took a stab at /etc/default/grub
and noted the commented-out GRUB_TERMINAL=console
, described as “Uncomment to disable graphical terminal”.
Well, I’m fine with an 80×25 text menu and the BIOS font for GRUB, so I figured it was worth a try. Creating a new file /etc/grub.d/console-terminal.cfg
setting that variable and running update-grub
, the generated /boot/grub/grub.cfg
no longer referenced that LUKS container; and on rebooting, GRUB again only prompted me for the LUKS passphrase for /boot
.
Success!