Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Keymap at boot time & LUKS

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
17 posts • Page 1 of 1
Author
Message
Myu
Apprentice
Apprentice
User avatar
Posts: 164
Joined: Wed Oct 22, 2014 7:28 am
Location: Belgium

Keymap at boot time & LUKS

  • Quote

Post by Myu » Sun Jan 28, 2018 10:49 pm

Hello there,

Since a recent update (udev?), my custom keymap at boot time is not loaded, hence I need to type my LUKS password as if I'm using a QWERTY keyboard which is pretty annoying...

Is there a "proper" way to fix that ?

Right now my openRC is setup like this :

Code: Select all

rc-config list | grep "dmcrypt\|keymaps"
  dmcrypt                   boot
  keymaps                   boot
My /etc/conf.d/keymaps is properly configured.

Appreciate any insight :)
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Top
Myu
Apprentice
Apprentice
User avatar
Posts: 164
Joined: Wed Oct 22, 2014 7:28 am
Location: Belgium

  • Quote

Post by Myu » Fri Feb 02, 2018 5:53 pm

Small bump (sorry if not allowed) ?

I tried to play with rc_need and the like but no luck so far.
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Feb 02, 2018 6:02 pm

Myu,

I guess its the keymap in the initrd if you have everything except /boot encrypted.
openRC isn't normally in the initrd.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
weiypan_us
Tux's lil' helper
Tux's lil' helper
Posts: 124
Joined: Sat Feb 25, 2017 5:35 pm

  • Quote

Post by weiypan_us » Fri Feb 02, 2018 6:56 pm

Hi, are your directory /usr on root fs or on an independent volume mounted on root fs?

Could you try command 'udevadm trigger' to see any errors ?
Myu wrote:Small bump (sorry if not allowed) ?

I tried to play with rc_need and the like but no luck so far.
Top
Myu
Apprentice
Apprentice
User avatar
Posts: 164
Joined: Wed Oct 22, 2014 7:28 am
Location: Belgium

  • Quote

Post by Myu » Sat Feb 03, 2018 8:21 am

Myu,

I guess its the keymap in the initrd if you have everything except /boot encrypted.
openRC isn't normally in the initrd.
Hello Neddy !

Actually, no only my /home is encrypted, / and /boot are in clear and I don't have an initrd, so just setting up /etc/conf.d/keymaps + enabling the openrc service should be (and has been for years) enough but somehow now the order is messed up and keymaps is loaded waaay after.
Hi, are your directory /usr on root fs or on an independent volume mounted on root fs?

Could you try command 'udevadm trigger' to see any errors ?
Hi weiypan_us !

Nope, my /usr in an integral part of my rootfs, same partition

udevadm trigger seems ok, looks present in rc-config list

Code: Select all

Dwarf ~ # udevadm trigger
Dwarf ~ # echo $?
0
Dwarf ~ # rc-config list | grep "udev"
  udev                      sysinit
  udev-settle
  udev-trigger              sysinit
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Top
freifunk_connewitz
Apprentice
Apprentice
Posts: 243
Joined: Wed Feb 08, 2006 6:54 pm
Contact:
Contact freifunk_connewitz
Website

  • Quote

Post by freifunk_connewitz » Sat Feb 03, 2018 12:00 pm

I can confirm this, same setup, same error.

last possibly relevant packages updated since this occurs: udev, curl, busybox

(edited)
Top
freifunk_connewitz
Apprentice
Apprentice
Posts: 243
Joined: Wed Feb 08, 2006 6:54 pm
Contact:
Contact freifunk_connewitz
Website

  • Quote

Post by freifunk_connewitz » Wed Feb 14, 2018 8:12 pm

Maybe a hint: one update that happened before the problem occured was the keymaps under /usr/share/keymaps. that would be the package sys-apps/kbd.

I tried to find a probable reason there but to no avail.

Anybody else an idea?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed Feb 14, 2018 8:59 pm

freifunk_connewitz,

Unpack your initrd and look for the keymap being provided and set.
There will need to be a line in the init script and the keymap you want to use will need to be included too.

If its missing, you can add things and repack the initrd. Its a bit of a hack doing it that way.
Be sure the keymap is set before the initrd asks for your LUKS pass phrase.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
freifunk_connewitz
Apprentice
Apprentice
Posts: 243
Joined: Wed Feb 08, 2006 6:54 pm
Contact:
Contact freifunk_connewitz
Website

  • Quote

Post by freifunk_connewitz » Thu Feb 15, 2018 10:02 am

Neddy,

Thanks for helping. But as I said, I have basically the same setup as the OP. No initrd, just plain normal booting with unencrypted /root. LUKS only unlocks /home. And a 'de-latin1' keymap.

I had a closer look at /var/log/rc.log and it seems that the reason for the problem could be the init-script order. Keymaps are loaded way after the dm-crypt mappings are initialized.

I tried to add to /etc/conf.d/dmcrypt:

Code: Select all

RC_AFTER="keymaps"
But that broke my boot process, with init complaining that root, bootmisc and mtab could not be started because fsck could not be started. It seems like keymaps are not able to be loaded before dmcrypt, right?

If that is the case, I could live with just typing my LUKS passwords as if I used a default QWERTY keyboard, not the one I really have. But then there should be a big warning in the elog of the cryptsetup package that people with other than default english keymaps should only use passwords where they know the keys are at the default keyboard.

And it does not explain why it worked until recently.
Top
Myu
Apprentice
Apprentice
User avatar
Posts: 164
Joined: Wed Oct 22, 2014 7:28 am
Location: Belgium

  • Quote

Post by Myu » Sat Feb 24, 2018 9:35 am

freifunk_connewitz summed up my experience as well, it worked for years before for sure.

Would it be useful to enter a bug for such behaviour ?
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Top
freifunk_connewitz
Apprentice
Apprentice
Posts: 243
Joined: Wed Feb 08, 2006 6:54 pm
Contact:
Contact freifunk_connewitz
Website

  • Quote

Post by freifunk_connewitz » Tue Mar 06, 2018 9:38 am

Myu,
I would think so, too. But against which package? cryptsetup? kbd? openrc? Maybe we should start with the Gentoo cryptsetup maintainers.
I also wonder why we two seem to be the only ones affected here. Is it that exotic nowadays to have an encrypted /home instead of whole system?
Top
Myu
Apprentice
Apprentice
User avatar
Posts: 164
Joined: Wed Oct 22, 2014 7:28 am
Location: Belgium

  • Quote

Post by Myu » Wed Mar 21, 2018 8:42 am

Hello,

I was about to (finally) take the time to open a bug but there's one here already

Let's see how it goes !
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Top
mslt
n00b
n00b
Posts: 8
Joined: Tue Oct 24, 2017 4:09 pm
Location: Germany

  • Quote

Post by mslt » Wed Mar 21, 2018 8:53 am

For me the easy "fix"/workaround was to add the "keymap=de" (de ofc only for a german keymap) parameter to the kernel cmdline in my grub cfg. It works just fine for me.
Thinkpad T480
Core i5-8250U
16GB RAM
i3wm, zsh, nvim, spaces > tabs
gentoo - Obviously
Top
Myu
Apprentice
Apprentice
User avatar
Posts: 164
Joined: Wed Oct 22, 2014 7:28 am
Location: Belgium

  • Quote

Post by Myu » Wed Mar 21, 2018 5:24 pm

Hey mslt,

Thanks for the comment, I tried with be and be-latin1 but it doesn't work for me. No initramfs, /home encrypted but not /
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Top
freifunk_connewitz
Apprentice
Apprentice
Posts: 243
Joined: Wed Feb 08, 2006 6:54 pm
Contact:
Contact freifunk_connewitz
Website

  • Quote

Post by freifunk_connewitz » Fri Apr 20, 2018 8:42 am

Same for me. I added

Code: Select all

append = "keymap=de-latin1"
(or "de") to the boot section in my lilo.conf but nothing changed. (There is also a lilo function to create keymaps for boottime use - keytab-lilo - but this seems to be broken, too.)
Top
freifunk_connewitz
Apprentice
Apprentice
Posts: 243
Joined: Wed Feb 08, 2006 6:54 pm
Contact:
Contact freifunk_connewitz
Website

  • Quote

Post by freifunk_connewitz » Wed Jul 01, 2020 9:29 am

After years of typing LUKS passwords on bootup as if I had a QWERTY keyboard, on a number of machines, also ones set up freshly, with lilo or grub, but all on openrc, yesterday's world update solved the issue. Now I have to type the passwords using the correct keymap (in my case QWERTZ-DE).

Here is the list of packages updated. I removed obvious non-relevant ones.

It seems it was NOT openrc. I suspect util-linux.

Code: Select all

grep '> emerge' /var/log/emerge.log
1593524893:  >>> emerge (1 of 35) sys-devel/llvm-common-10.0.0 to /
1593524916:  >>> emerge (2 of 35) sys-kernel/linux-firmware-20200619 to /
1593524944:  >>> emerge (3 of 35) sys-devel/binutils-config-5.3.1 to /
1593524950:  >>> emerge (4 of 35) sys-devel/gcc-config-2.3 to /
1593524956:  >>> emerge (5 of 35) dev-libs/vala-common-0.48.6 to /
1593524963:  >>> emerge (6 of 35) virtual/os-headers-0-r2 to /
1593524969:  >>> emerge (7 of 35) virtual/libc-1-r1 to /
1593524974:  >>> emerge (8 of 35) sys-devel/clang-common-10.0.0 to /
1593525032:  >>> emerge (10 of 35) net-misc/curl-7.71.0 to /
1593525086:  >>> emerge (11 of 35) net-misc/rsync-3.2.0-r1 to /
1593525217:  >>> emerge (15 of 35) sys-process/lsof-4.93.2-r1 to /
1593525225:  >>> emerge (16 of 35) sys-libs/libomp-10.0.0 to /
1593525243:  >>> emerge (17 of 35) dev-db/mariadb-connector-c-3.1.9 to /
1593525257:  >>> emerge (18 of 35) sys-apps/util-linux-2.35.2 to /
1593525303:  >>> emerge (19 of 35) dev-db/mariadb-10.4.13 to /
1593525618:  >>> emerge (20 of 35) sys-devel/llvm-10.0.0 to /
1593527460:  >>> emerge (23 of 35) app-admin/syslog-ng-3.26.1-r1 to /
1593527528:  >>> emerge (24 of 35) dev-lang/vala-0.48.6 to /
1593527618:  >>> emerge (26 of 35) sys-apps/accountsservice-0.6.55 to /
1593527648:  >>> emerge (28 of 35) net-libs/signond-8.60-r2 to /
1593527921:  >>> emerge (31 of 35) sys-devel/clang-10.0.0 to /
1593529991:  >>> emerge (32 of 35) sys-libs/compiler-rt-10.0.0 to /
1593530010:  >>> emerge (33 of 35) sys-libs/compiler-rt-sanitizers-10.0.0 to /
1593530073:  >>> emerge (34 of 35) sys-devel/clang-runtime-10.0.0 to /
Top
freifunk_connewitz
Apprentice
Apprentice
Posts: 243
Joined: Wed Feb 08, 2006 6:54 pm
Contact:
Contact freifunk_connewitz
Website

SOLVED again

  • Quote

Post by freifunk_connewitz » Tue Sep 09, 2025 8:11 am

I have to unearth this thread so that others with this problem find a solution. Reason: After 5 years, some update broke the Luks device decrypting process again. Typing password for encrypted /home as if using an EN keyboard works, typing according to my DE keyboard layout does not, as described above. I refrain from speculating which update did it because I've updated a 173 packages after returning from holidays.

Solved by changing the order of the rc services: service 'dmcrypt' needs service 'keymaps':

in /etc/rc.conf

Code: Select all

rc_dmcrypt_need="keymaps"
Top
Post Reply

17 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic