Skip to main content

German keyboard layout at disk unlocking time (i.e. in the initramfs boot process) with Debian

Among the first things a Debian installer does is making me select a proper keyboard layout. For a setup including disk encryption that makes me enter a password with a German keyboard layout just as I asked it to: good. After reboot, things look a little different: I am expected to enter my password with a US layout active (due to bug this known bug). With a a few non-alphanumerics in it, entering a password with a foreign layout becomes a challenge easily and/or gets annoying quickly. At that time, there is no feedback of the letters you type! To get the layout to German at boot time this procedure worked for me:

  1. In /etc/initramfs-tools/initramfs.conf change KEYMAP=n to KEYMAP= _y_
  2. Run ln -s /etc/console-setup/cached_UTF-8_del.kmap.gz /etc/console-setup/cached.kmap.gz (or similar depending on what the existing file is called for you)
  3. Run update-initramfs -k all -u
  4. Reboot

As usual, please correct and/or extend in the comments as necessary.