[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: encrypted root - change keyboard layout



On Sat, Mar 03, 2012 at 01:30:21 +0100, Matthias Weiler wrote:
> Hello everyone!
> 
> As the subject suggests: I've encrypted my root partition with a super
> secret passphrase. The problem is that there is one character that I
> don't know how to enter with the english keyboard layout.
> 
> I get to the (initramfs) prompt. What can I do from there on?
> 
> I've checked Debian Wiki [0], Arch Wiki [1] and Stackexchange [2] but
> they didn't help altogether. I don't have dpkg-reconfigure or
> initramfs.conf.

You will probably need a rescue disk that allows you to mount the
encrypted root file system and chroot into it to rebuild your initrd as
I suggest below. (Your Debian installer may offer such a rescue
functionality, but I cannot help you with any details here because I
have not had to do something like that in a very long time.) 

> What am I missing?
> 
> Thanks for your time!
> 
> greetins
> Matthias
> 
> [0] http://wiki.debian.org/Keyboard#Set_Keyboard_Layout_in_initramfs
> [1] https://wiki.archlinux.org/index.php/System_Encryption_with_LUKS
> [2] http://unix.stackexchange.com/questions/15955/how-to-set-keyboard-layout-used-to-enter-password-on-an-encrypted-filesystem

It seems that update-initramfs does not include the correct keyboard
configuration in the initrd: http://bugs.debian.org/619711

If you manage to chroot into your encrypted system then you can try the
following workaround: Make sure that your keyboard configuration is
coirrect, then save it

  setupcon --save-keyboard cached.kmap
  gzip -9n cached.kmap

and copy cached.kmap.gz to /etc/console-setup/ (back up the old version
if one exists); finally, rebuild your initrd with

  update-initramfs -u

Disclaimer: I have not tried if any of this works. A simpler approach
may be to use the rescue disk to change the LUKS passphrase and remove
the one troublesome character; my guess would be that this will not
significantly affect the entropy of the phrase.

-- 
Regards,            |
          Florian   | http://www.florian-kulzer.eu


Reply to: