cryptsetup: ERROR:sda5_crypt: maximum number of tries exceeded

Solution 1:

Well, you have to figure out the right password or reinstall...

I hit a similar problem with my first encrypted installs a long time ago:

  • when I entered the key phrase for the disk during install the keyboard was actually still using a default QWERTY layout,
  • but when I enter the key phrase during boot, the keyboard uses my expected AZERTY layout.

So while I thought I entered ZERO (keys 2,3,4,9 on the top row of AZERTY)(*) the system got WERO (keys (keys 2,3,4,9 on the top row of QWERTY). So in AZERTY mode I have to enter WERO to unlock.

Since then, when I install, I pick a layout-agnostic key phrase (such as TYPO), and later change the key to something possibly AZERTY-sensitive but more secure.

Of course if you have a QWERTY keyboard the matter is different... but an overlooked CapsLock or NumLock could put you in a similar situation.

(*) passwords have been changed to protect the innocent.