I have installed Arch Linux with LUKS on a btrfs file system.

When logging in, I can't mount my filesystem on /dev/sda2 because the keyboard is US (I need a French key map).

I try change /etc/vconsole.conf to FR and generate locale-gen but the keyboard don't change in next boot.

  • Or you could make use of LUKS supporting up to 8 keys, to add your passphrase in US layout as well so it will be accepted either way. – frostschutz Feb 3 '17 at 20:39

Your /etc/mkinitcpio.conf needs to look like this:

HOOKS="... keyboard keymap encrypt..."

You need to load the keymap during boot, which is done by an mkinitcpio hook. Make sure that the keymap or sd-vconsole hook (depending on whether you use sd-* style hooks) occurs before encrypt/sd-encrypt and regenerate your initrd.

  • I added keymap before encrypt on the file /etc/mkinitcpio.conf and I have generate initrd. After adding keymap at startup the keyboard does not work. And now I can't start in my system – Micael André Feb 4 '17 at 9:02
  • I mount encrypt partitions on archiso And I added on mkinitcpio.conf --> HOOKS: "... keyboard keymap encrypt ..." and regenerate. Thanks for you help – Micael André Feb 4 '17 at 9:56
  • Great solution, works perfectly. The keymap is sourced from /etc/vconsole.conf, in case anyone is wondering. – Yohaï-Eliel Berreby Jul 20 '17 at 20:12
  • 1
    Note, you must regenerate the initrd after configuring /etc/vconsole.conf. – caseyWebb Dec 4 '18 at 21:55

I use luks encryption for home and root files. If it can help some guys

vim /etc/vconsole.conf

Add this


and also check this

vim /etc/mkinitcpio.conf

It MUST be in the good order

HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck)

Regenerate initrd

mkinitcpio -P

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.