I use OpenRC-0.9.4 and baselayout-2.
I can't manage to log in at single-user boot prompt (maintenance password asked): it looks like my default keyboard layout (IT) is not loaded.
Is there a way to configure a non-US keyboard layout for runlevel S, without tweaking my inittab? Better off would be having it in GRUB...

I can't manage to log in at single-user boot prompt (maintenance password asked): it looks like my default keyboard layout (IT) is not loaded.

Of course it's not loaded if keymap init service is not started. The same is true for consolefont and other init services. If you can boot into boot runlevel, then go ahead and you'll be able to login.

If ever you have an initramfs with loadable keymap/font at boot time (kernel cmdline or default behaviour of the init script), you could get your keymap/font loaded. Alternatively, if that said initramfs offers a minimal/rescue shell, you could pretty well load manually the keymap/font and then switch root with something like `exec switch_root /newroot /sbin/init 1' to boot to single mode with your it keymap loaded.

NOTE: looak at my signature for such an initramfs that offers all that easily. You can even boot to single/boot, any runlevel with a kernel cmdline as well. Anyway, youu can pretty much add any aditional reasonable tools to it for maintenance purpose, fsck for example._________________home/:mkinitramfs-ll/:supervision(-scripts)/:e-gtk-theme/:(bar-)overlay/

If ever you have an initramfs with loadable keymap/font at boot time (kernel cmdline or default behaviour of the init script), you could get your keymap/font loaded.

I thought of doing that, but I wonder if there is a more direct way (my PC is a laptop and I don't use any external keyboard).
I see that loadkeys allows to dump a 'defkeymap' for the kernel sources, so f.i. (found at http://en.gentoo-wiki.com/wiki/TinyGentoo)

As I wrote before, this hack of building a custom keymap into the kernel worked fine, until I tried by mistake to load a different keymap ('us') and... damn, *crashed* the kernel
I don't know if that's a kernel bug...

If you boot into single user mode no password is required, just add init=/bin/bash to the kernel command line.

Yep, I know that, thanks (and with openrc, rc_shell=/sbin/sulogin should be changed as well, in '/etc/rc.conf'). My problem is that I never managed to use a keyboard with a physical layout that doesn't match the keymap...

Let's say that, instead of the hassle of blindly fiddling with keys + mounting /usr read-only + calling loadkeys, I chose the risk of hacking. I'm quite proud anyway to have found a way of crashing the kernel in a repeatable manner .

BTW, another annoying issue I have is that the keyboard (standard AT, driver compiled into the kernel) doesn't go up immediately after sysinit is started: it takes approximately 20 seconds -- that's also preventing me from using opnerc's interactive feature I searched around a lot for an explanation but found nothing. Has anybody any idea?