Ubuntu with full disk encryption - bad password after upgrade to 18.04

A few months ago I set full disk encryption during installation of Ubuntu 17.10. Now, I've decided to upgrade. The upgrade ran to the end without any problems. However, after reboot I am not able to log into my encrypted disk.

Where can be the problem? I am 100% sure I press the "right keys" on the keyboard, but technically I don't know what I am writing because of "*" characters and maybe after upgrade my keyboard layout changed. I use some characters which might be somewhere else on the keyboard. What language is default after upgrade?

By the way, I've already tried Caps-lock, but still no luck.

Help will be really appreciated. I am not a fan of installing my system and all backups over and over again.


Solution 1:

Got the same issue when I have upgraded my ubuntu from 17.10 to 18.04. After lot of testing I found a solution for my problem. I just changed the keyboard layout in US and typed my password in my nativ layout (azerty). So it seems that the cryptsetup prompt is now in my nativ layout and not in US anymore. And my password was never stored in azerty layout as I thought.

Hope my solution will help you, and excuse me for my poor English.

Solution 2:

This appears to be caused by a bug in 17.10 which causes the layout to always be the standard US layout when entering your password even though you've set the layout to something else.

I use Dvorak, so I had it set to that when entering my password for encryption initially. Only it's not actually Dvorak while typing it in, it's really still the standard US layout.

For example, let's say your password is "hello". Typing "hello" and assuming Dvorak when the layout is really the standard US layout yields "jdpps". You assume your password is "hello" but its' actually being stored as "jdpps".

You never notice this, because when it prompts you, it's also standard US behind the scenes, so typing your password "hello" in Dvorak yields "jdpps" in reality, and you're in.

In 18.04 though, they seem to have fixed the bug. So now when you type "hello" in Dvorak, it's really "hello", and no longer matches your stored password.

To get back in you simply need to figure out what was actually stored, by seeing what would be output if you typed your password in your native layout while the actual layout is set to US English. I did this, and typed that password in, and it worked.

Hope this helps someone else, I struggled with this for a good few hours. I would say this is really one of the most perfect bugs I've ever come across.