Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Keymap at boot time & LUKS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Sun Jan 28, 2018 10:49 pm    Post subject: Keymap at boot time & LUKS Reply with quote

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:
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) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Fri Feb 02, 2018 5:53 pm    Post subject: Reply with quote

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) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41320
Location: 56N 3W

PostPosted: Fri Feb 02, 2018 6:02 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
weiypan_us
n00b
n00b


Joined: 25 Feb 2017
Posts: 60

PostPosted: Fri Feb 02, 2018 6:56 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Sat Feb 03, 2018 8:21 am    Post subject: Reply with quote

Quote:
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.

Quote:
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:
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) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]
Back to top
View user's profile Send private message
freifunk_connewitz
Apprentice
Apprentice


Joined: 08 Feb 2006
Posts: 179

PostPosted: Sat Feb 03, 2018 12:00 pm    Post subject: Reply with quote

I can confirm this, same setup, same error.

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

(edited)
Back to top
View user's profile Send private message
freifunk_connewitz
Apprentice
Apprentice


Joined: 08 Feb 2006
Posts: 179

PostPosted: Wed Feb 14, 2018 8:12 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41320
Location: 56N 3W

PostPosted: Wed Feb 14, 2018 8:59 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
freifunk_connewitz
Apprentice
Apprentice


Joined: 08 Feb 2006
Posts: 179

PostPosted: Thu Feb 15, 2018 10:02 am    Post subject: Reply with quote

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:
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.
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Sat Feb 24, 2018 9:35 am    Post subject: Reply with quote

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) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]
Back to top
View user's profile Send private message
freifunk_connewitz
Apprentice
Apprentice


Joined: 08 Feb 2006
Posts: 179

PostPosted: Tue Mar 06, 2018 9:38 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Wed Mar 21, 2018 8:42 am    Post subject: Reply with quote

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) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]
Back to top
View user's profile Send private message
mslt
n00b
n00b


Joined: 24 Oct 2017
Posts: 5
Location: Germany

PostPosted: Wed Mar 21, 2018 8:53 am    Post subject: Reply with quote

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 T430
Core i5-3320M
NVIDIA NVS-5400M
8GB RAM
i3wm, zsh, vim, spaces > tabs
gentoo - Obviously
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Wed Mar 21, 2018 5:24 pm    Post subject: Reply with quote

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) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]
Back to top
View user's profile Send private message
freifunk_connewitz
Apprentice
Apprentice


Joined: 08 Feb 2006
Posts: 179

PostPosted: Fri Apr 20, 2018 8:42 am    Post subject: Reply with quote

Same for me. I added
Code:
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.)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum