Ubuntu – LUKS Encrypted Hard Drive — Passphrase includes ‘£’

encryptionkeyboard-layoutluks

I recently changed my passphrase through 'Disks' and I've included the character £ in it. I realise now that the UK keyboard mapping only applies after this is done, so trying to type £ gives me # instead (I'm assuming, I can't see the password).

How do I type £ at the screen 'cryptsetup: please unlock disk'? None of the AltGr+Number or Shift+Ctrl+Something I've looked up seems to work, apart from sometimes shutting off the screen. (e.g. when I press down one of the arrow keys. Why is that?)

Hopefully this won't need any personal technical details but if it does I'll put it here.

Best Answer

Setup keyboard/locale in initramfs

  1. Edit /etc/initramfs-tools/initramfs.conf
    • KEYMAP=y
  2. Update initramfs
    • sudo update-initramfs -u

Ref: How to set keyboard layout in initramfs

Workaround

This might be a good idea if your disk is removable.

  1. Use an Ubuntu image and boot from that using CD/DVD or thumb drive.
  2. Setup your locale and keyboard.
  3. Identify encrypted file system.
    • This will be something like /dev/sda2
  4. Add password without £
    • sudo cryptsetup luksAddKey /dev/sda2
Related Question