Hi, Description of problem: In file /etc/dracut.conf.d/50-mageia.conf we have: i18n_vars="/etc/sysconfig/i18n:SYSFONT-FONT,SYSFONTACM-FONT_MAP,UNIMAP-FONT_UNIMAP,LANG,LC_ALL /etc/sysconfig/keyboard:KEYTABLE,KEYMAP,GRP_TOGGLE" On my system, after running drakkeyboard and draklocale, /etc/sysconfig/keyboard contains: KEYBOARD=fr_latin9 KEYTABLE=fr-latin9 XkbLayout=fr XkbModel=pc104 XkbOptions=compose:rwin XkbVariant=latin9 And /etc/sysconfig/i18n contains: COUNTRY=FR LANG=fr_FR.UTF-8 LANGUAGE=fr_FR.UTF-8:fr LC_ADDRESS=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8 LC_CTYPE=fr_FR.UTF-8 LC_IDENTIFICATION=fr_FR.UTF-8 LC_MEASUREMENT=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_NAME=fr_FR.UTF-8 LC_NUMERIC=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_TELEPHONE=fr_FR.UTF-8 LC_TIME=fr_FR.UTF-8 SYSFONT=lat0-16 But /etc/vconsole.conf contains: FONT=lat0-16 KEYMAP=fr-latin1 or on my other system: FONT=lat0-16 KEYMAP=fr-latin9 XKBLAYOUT=fr XKBMODEL=pc105 XKBOPTIONS=terminate:ctrl_alt_bksp XKBVARIANT=latin9 When I generate an initrd (with systemd included), the service systemd-vconsole-setup.service fails on loadkeys invocation because the KEYMAP file was never included. It comes from /etc/dracut.conf.d/50-mageia.conf which try to get KEYMAP from /etc/sysconfig/keyboard where it's not defined and thus don't include the keymap file... As stated in /usr/lib/dracut/modules.d/10i18n/README, the minimum is FONT and KEYMAP, both defined in /etc/vconsole.conf I see few ways to fix it in /etc/dracut.conf.d/50-mageia.conf First one is to map KEYTABLE defined in /etc/sysconfig/keyboard to KEYMAP: i18n_vars="/etc/sysconfig/i18n:SYSFONT-FONT,SYSFONTACM-FONT_MAP,UNIMAP-FONT_UNIMAP,LANG,LC_ALL /etc/sysconfig/keyboard:KEYTABLE-KEYMAP,GRP_TOGGLE" Or simply extract FONT and keymap from /etc/vconsole.conf: i18n_vars="/etc/vconsole.conf:FONT,KEYMAP" Or load minimum from /etc/vconsole and try to load the rest where available: i18n_vars="/etc/vconsole.conf:FONT,KEYMAP /etc/locale.conf:LANG /etc/sysconfig/i18n:SYSFONT-FONT,SYSFONTACM-FONT_MAP,UNIMAP-FONT_UNIMAP,LANG,LC_ALL /etc/sysconfig/keyboard:KEYTABLE,KEYMAP,GRP_TOGGLE" In my opinion, at this early stage, we only really require keymap to type luks password without mind-mapping to querty or have keyboard set in rescue shell. Font seems usefull only for cosmetic reason. I didn't look the usefullness of FONT_MAP, FONT_UNIMAP, LANG, LC_ALL and GRP_TOGGLE effect on initrd stage messages. In my case it seems that systemd vconsole service don't use KEYTABLE when KEYMAP is undefined, it seems to load only vconsole.(keymap|keymap_toggle|font|font_map|font_unimap) Version-Release number of selected component (if applicable): dracut-057-4.mga9 How reproducible: Always Steps to Reproduce: 1. draklocale 2. drakkeyboard 3. echo 'omit_dracutmodules=" network "' > etc/dracut.conf.d/99-systemd.conf 4. mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r) 5. drop to dracut rescue shell with a cmdline like rd.break=mount 6. systemctl status systemd-vconsole-setup.service
It seems that it's a regression when moving to systemd because a behaviour defined in /usr/lib/dracut/modules.d/10i18n/README is not valid anymore with systemd vconsole service: « KEYTABLE - base name for keyboard translation table; if UNICODE is true, Unicode version will be loaded. Overrides KEYMAP. » I am unsure if it's possible to try to load the same variable from various files in i18n_vars definition and which one is elected in case of diverging duplicate definition I am unsure how to makes sure dracut include i18n stuff, on a chroot install, it include nothing. I am sure to have experienced the bug where systemd vconsole service fails because keymap is not included in initrd. It was both time with a fr locale and keyboard with a luks encrypted /
It seems that the problem reside with dracut, the i18n_vars do not set the configuration of /etc/vconsole.conf and /etc/locale.conf inside the initrd. It will only serve to include the keymap and font files plus maybe files related to other variables.
I replayed generating a host only initrd in various configuration: Without change to /etc/dracut.conf.d/50-mageia.conf and no extra config in /etc/dracut.conf.d with a fr-latin9 configured keyboard, country to FR and lang to fr_FR.UTF-8, I get: # DRACUT_SKIP_FORCED_NON_HOSTONLY=1 mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r) # cat /tmp/dracut.*/initramfs/etc/vconsole.conf KEYMAP="fr-latin9.uni" EXT_KEYMAPS=" " UNICODE="1" FONT="lat0-16" # cat /tmp/dracut.*/initramfs/etc/locale.conf LANG="fr_FR.UTF-8" # tree /tmp/dracut.*/initramfs/usr/lib/kbd /tmp/dracut.SW9dIY/initramfs/usr/lib/kbd └── consolefonts ├── eurlatgr.psfu └── lat0-16.psfu It will fail to loadkeys fr later in the boot process. With omit_dracutmodules=" network ": # tree /tmp/dracut.*/initramfs/usr/lib/kbd /tmp/dracut.EkNcyt/initramfs/usr/lib/kbd └── consolefonts ├── eurlatgr.psfu └── lat0-16.psfu Same result it will fail to load the required fr-latin9 keymap. With omit_dracutmodules=" network " + i18n_vars="/etc/vconsole.conf:FONT,KEYMAP /etc/locale.conf:LANG": # tree /tmp/dracut.*/initramfs/usr/lib/kbd /tmp/dracut.nrK4Ey/initramfs/usr/lib/kbd ├── consolefonts │ ├── eurlatgr.psfu │ └── lat0-16.psfu └── keymaps └── i386 └── azerty └── fr-latin9.map Not sure it has ever worked in the first place, we may want to replace i18n_vars to this value in /etc/dracut.conf.d/50-mageia.conf
In summary, i18n_vars is not used to set the configuration inside the initrd, but only as /etc/vconsole.conf and /etc/locale.conf are included as is. It seems smart to change /etc/dracut.conf.d/50-mageia.conf to i18n_vars="/etc/vconsole.conf:FONT,KEYMAP /etc/locale.conf:LANG" to makes keymap load succeed.
To get vconsole.service working on my install I changed ... $ cat /etc/vconsole.conf FONT=lat0-16 FONT_UNIMAP=/usr/share/kbd/unimaps/cp437AB.uni KEYMAP=us The font comes from ... $ rpm -q -f /usr/lib/kbd/consolefonts/lat0-16.psfu.gz kbd-2.5.1-1.mga9 The unimap comes from ... $ rpm -q -f /usr/share/kbd/unimaps/cp437AB.uni hxtools-20221120-2.mga9 The keymap comes from ... $ rpm -q -f /usr/lib/kbd/keymaps/i386/qwerty/us.map.gz kbd-2.5.1-1.mga9 Assigning to the Mageia tools group as this should be configured during installation.
CC: (none) => davidwhodginsAssignee: bugsquad => mageiatools