Liudas Ali��auskas changed bug 942896
What Removed Added
CC   liudas.alisauskas@gmail.com

Comment # 50 on bug 942896 from
Hello everyone.

The error 'systemd-vconsole-setup[557]: cannot open file lt' is caused by
missing correct keymap file in /boot/initrd file.

Here are few findings that could help with solution:

1. Listing available keymaps for lithuanian language:

--
[~] localectl list-keymaps | grep "^lt"                                         
lt
lt-ibm
lt-lekp
lt-lekpa
lt-std
lt-us
lt.baltic
lt.l4
lt.std
--

we have several options. Listing keymap files:

--
[~] find /usr/share/kbd/keymaps -name "lt*"                                     
/usr/share/kbd/keymaps/xkb/lt-ibm.map.gz
/usr/share/kbd/keymaps/xkb/lt-lekp.map.gz
/usr/share/kbd/keymaps/xkb/lt-lekpa.map.gz
/usr/share/kbd/keymaps/xkb/lt-std.map.gz
/usr/share/kbd/keymaps/xkb/lt-us.map.gz
/usr/share/kbd/keymaps/xkb/lt.map.gz
/usr/share/kbd/keymaps/legacy/i386/azerty/lt.std.map.gz
/usr/share/kbd/keymaps/legacy/i386/qwerty/lt.baltic.map.gz
/usr/share/kbd/keymaps/legacy/i386/qwerty/lt.l4.map.gz
/usr/share/kbd/keymaps/legacy/i386/qwerty/lt.map.gz
--

2. Choosing Lithuanian as default language in Yast2 -> Languages, and selecting
"Adapt Keyboard Layout to Lithuanian" writes "KEYMAP=lt" option into
/etc/vconsole.conf file

--
[~] cat /etc/vconsole.conf                                                      
KEYMAP=lt
--

and 'mkinitrd' command is executed which generates /boot/initrd file
(initramfs) with keymap file against KEYMAP=lt option.

3. Extracting keymap file from generated initrd file shows that possibly wrong
file () is included:

--
initrd/usr/share/kbd/keymaps/legacy/i386/azerty/lt.std.map
--

4. That why we have error "systemd-vconsole-setup[xx]: cannot open file lt" -
systemd-vconsole-setup.servise tries load missing file.

5. If we change "KEYMAP=lt" option to "KEYMAP=lt-us" in /etc/vconsole.conf file

--
[~] cat /etc/vconsole.conf                                                      
KEYMAP=lt-us
--

and run command 'mkinitrd' manually - now initrd contains correct file:

--
initrd/usr/share/kbd/keymaps/xkb/lt.map
--

and no systemd-vconsole-setup.servise errors on "missing files".

6. Conclution:

- mkinitrd command inserts incorrect keymap file from /usr/share/kbd/keymaps/*
folder into initramfs file while reading /etc/vconsole.conf option KEYMAP=lt;
- due to this systemd-vconsole-setup.servise tries load missing file and we
have error (root file system is not loaded yet);
- later (when system is loaded) if we run 'systemctl restart
systemd-vconsole-setup.service' manually we have no error because file system
is mounted and we have correct file available in /usr/share/kbd/keymaps/*
folder;

we should look deeper why mkinitrd takes incorrect keymap file lt.std.map.gz
instead of lt.map.gz and inserts it info initramfs file. It could be parser
pattern lt[dot].

7. I have tried run 'mkinitrd' with KEYMAP=lt option while moved
/usr/share/kbd/keymaps/legacy/ folder away - correct keymap file is transferred
into initramfs and no error from systemd-vconsole-setup.servise.

Hope this will be useful.


You are receiving this mail because: