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. Commented Feb 3, 2017 at 20:39

2 Answers 2


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 Commented Feb 4, 2017 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 Commented Feb 4, 2017 at 9:56
  • Great solution, works perfectly. The keymap is sourced from /etc/vconsole.conf, in case anyone is wondering. Commented Jul 20, 2017 at 20:12
  • 1
    Note, you must regenerate the initrd after configuring /etc/vconsole.conf.
    – caseyWebb
    Commented Dec 4, 2018 at 21:55
  • Note that this solution is correct, if your /boot partition isn't also encrypted. In this case, the solution doesn't work, since GRUB has multiple stages and the above works for stage 2, but not for stage 1! In this case you need to manually configure a core.img using grub-mkimage (here's a superuser q&a). Took me hours to wrap my head around it.
    – jonashackt
    Commented Feb 4 at 12:06

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

You must log in to answer this question.

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