while installing my Gentoo system I encoutered a strange error.

One of my disk is encrypted, I have done all the installation via ssh, so did I enter the encryption passphrase via ssh.

Now I entered the password directly on the computer, and it did not work. (I tried it about six times, even plugged in the keyboard from the other computer and tried it again). After ssh'ing into the box, unlocking the cryptdrive worked without complaining.

I think I have to reformat that crypt-drive again, because its intended to be a /root encryption, so ssh'ing into the computer wont be possible in that stage of boot. (reformating the drive is not a problem, I prolly did that about 20 times the last five days). But why does this problem occur at all?

And yeah, my password is long, about 30 characters (numbers, upper/lowercase, special chars) and I am using a german keyboard on both computers. But entering the passphrase into the shell, to actually see it, yields - at least from what I can see - the same result.

1 Answer 1


At boot time, you have a US keyboard layout until another layout is loaded. If you want to have a different layout at boot time, you need to include the keymap in your initrd/initramfs. For Gentoo, the Gentoo wiki has instructions on building an initramfs with a custom keymap. See also the discussion in bug #218920.

A second issue is that passphrases are really made of bytes, not characters. If you use a different encoding on the console and in your SSH session, you may have difficulties typing the proper bytes. For example, if your password is swördfish in UTF-8, then you need to enter swördfish on a latin-1 terminal; and if your password is swördfish in latin-1, you won't be able to type it on an UTF-8 terminal. I recommend using only printable ASCII characters in your passphrase.

  • In fact its post boot, the live-cd (or live-usb-stick in my case) is already running. when I enter the password to the console directly, there are no malformated characters. The only special chars I use are (%$§! which are all ASCII. But nevertheless I think it is related to a latin1 /UTF-8 mismatch. I will reformat the drive and enter the password manually on the gentoo box instead of using ssh.
    – Baarn
    Commented Jul 28, 2011 at 17:33
  • 1
    oh wait '§' seems to be not in the ASCII set... maybe thats the reason.
    – Baarn
    Commented Jul 28, 2011 at 17:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .