kiwi can not find keymap for debain 13

15 views
Skip to first unread message

Sven Wölfel

unread,
Sep 22, 2025, 5:32:57 AM (8 days ago) Sep 22
to kiwi
Hi again!
Maybe somebody experienced this as well and is able to point me in the right direction.
I'm setting my locale informations in the kiwi description like this:
<preferences>
<version>13.0</version>
<packagemanager>apt</packagemanager>
<rpm-check-signatures>false</rpm-check-signatures>
<locale>en_US</locale>
<keytable>us</keytable>
<timezone>Europe/Berlin</timezone>
</preferences>

This worked for Debian 12 no problem. But when trying to build Debian 13 I get the error during build saying keymap us is not installed.

[ DEBUG   ]: 09:08:52 | Looking for chroot in /usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

[ DEBUG   ]: 09:08:52 | EXEC: [chroot /result/build/image-root chown -R ansible:users /home/ansible]

[ INFO    ]: 09:08:52 | Setting up keytable: us

[ DEBUG   ]: 09:08:52 | Looking for chroot in /usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

[ DEBUG   ]: 09:08:52 | EXEC: [chroot /result/build/image-root systemd-firstboot --help]

[ DEBUG   ]: 09:08:52 | Looking for chroot in /usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

[ DEBUG   ]: 09:08:52 | EXEC: [chroot /result/build/image-root systemd-firstboot --keymap=us]

[ DEBUG   ]: 09:08:52 | EXEC: Failed with stderr: Keymap us is not installed., stdout: (no output on stdout)


Despite the fact that the keymap exists e.g. in /result/build/image-root/usr/share/keymaps/i386/qwerty/us.kmap.gz


Is there a way to see where systemd-firstboot searches for the keymap? I think the culprit could be a changed debian package that would contain the keymap but I'm not sure thats why I would like to see where firstboot looks for the keymap.

Any ideas or similiar experience?

Marcus Schäfer

unread,
Sep 22, 2025, 9:30:25 AM (8 days ago) Sep 22
to kiwi-...@googlegroups.com
Hi,

> I'm setting my locale informations in the kiwi description like this:
> <keytable>us</keytable>
>
> This worked for Debian 12 no problem. But when trying to build Debian
> 13 I get the error during build saying keymap us is not installed.

I believe this is related to how systemd-firstboot takes the name
of the keymap. Please note that kiwi just passes along the given
keytable value because some versions of systemd-firstboot wants only
the base name, others requires the filename.

In your case I would try:

<keytable>us.map.gz</keytable>

or

<keytable>us.kmap.gz</keytable>

and see if that makes a difference

Regards,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer Brunnenweg 18
Tel: +49 7562 905437 D-88260 Argenbühl
Germany
-------------------------------------------------------
signature.asc

Sven Woelfel

unread,
Sep 23, 2025, 4:35:37 AM (7 days ago) Sep 23
to kiwi-...@googlegroups.com
Thanks for the fast reply.

Sadly this doesn't work either. The only way to let the build finish is
to comment out the keymap entry and let it point to
/etc/default/keyboard which has a us keyboard as default setting.

I would very much like to avoid setting it via the configure.sh script,
I may do this as a last resort but I'm curious as to why it is not working.

Regards


Sven

Sven Woelfel

unread,
Sep 23, 2025, 5:27:57 AM (7 days ago) Sep 23
to kiwi-...@googlegroups.com
Could it be a Problem with the chroot environment and this validation
check
(https://github.com/systemd/systemd/blob/4d746373100ee85357b92e9b6b04753ee5c2e29a/src/firstboot/firstboot.c#L470)
done by systemd-firstboot?

I know this is far fetched but I tried basically everything and this was
the only clue I found.

On 9/22/25 15:29, Marcus Schäfer wrote:

Marcus Schäfer

unread,
Sep 24, 2025, 10:16:00 AM (6 days ago) Sep 24
to kiwi-...@googlegroups.com
Hi,

> Could it be a Problem with the chroot environment and this validation check (https://github.com/systemd/systemd/blob/4d746373100ee85357b92e9b6b04753ee5c2e29a/src/firstboot/firstboot.c#L470)
> done by systemd-firstboot?
>
> I know this is far fetched but I tried basically everything and this was the
> only clue I found.

It's interesting because I don't see this issue when building
for other OS'es.

I believe you could get some more hints if you drop the keymap
setting from the kiwi XML description and then add something like
this in config.sh

export SYSTEMD_LOG_LEVEL=debug
systemd-firstboot --keymap ...

This should provide further debug information which might lead
to some findings
signature.asc

Sven Woelfel

unread,
Sep 25, 2025, 11:08:07 AM (5 days ago) Sep 25
to kiwi-...@googlegroups.com

Hi,

I tried this today and sadly the only message I get is "Keymap us is not installed".

But skipping the keytable in the configuration leads to a successful build. The image then has a /etc/vconsole.conf that points to /etc/default which has the us keymap as default. 

But I'm able to reproduce the the systemd-firstboot behavior in the image itself.

ansible@kub001:~$ sudo systemd-firstboot --keymap=us

Keymap us is not installed.

 

ansible@kub001:~$ sudo systemd-firstboot --keymap=/usr/share/keymaps/i386/qwerty/us.kmap.gz

Keymap /usr/share/keymaps/i386/qwerty/us.kmap.gz is not valid.

 

ansible@kub001:~$ sudo systemd-firstboot --keymap=us.kmap.gz

Keymap us.kmap.gz is not installed.


I find the keymap not valid entry very interesting. It almost seems like systemd-firstboot has no search path for the keymaps.  But this is not a problem with kiwi it seems to be a debian specific systemd-firstboot issue.


Regards

Sven Woelfel

unread,
Sep 26, 2025, 4:02:24 AM (4 days ago) Sep 26
to kiwi-...@googlegroups.com
Hello Markus,

I found the issue and a somehow working solution.

The issue is described here:
https://www.claudiokuenzler.com/blog/1257/how-to-fix-missing-keymaps-debian-ubuntu-localectl-failed-read-list

TLDR: Debian does not ship the keymaps in the map format as localectl
and systemd would expect it. They even go so far as to strip those
keymaps from the kbd package.

By manually downloading the keymaps from the upstream kbd project and
placing them under /usr/share/keymaps this can be avoided.

For a kiwi build this means that you need to remove the keytable from
the description and place the upstream kbd keymaps in the target rootfs
of the image.

In the config script you then need to make the call to
systemd-firstboot, which will finally work.


I still don't know why it was working for Debian 12 since it seems this
"bug" exists for some time now. But I will at least try to make the
Debian systemd maintainer aware of this issue


Regards

Sven


On 9/24/25 16:15, Marcus Schäfer wrote:

Marcus Schäfer

unread,
Sep 27, 2025, 11:55:36 AM (3 days ago) Sep 27
to kiwi-...@googlegroups.com
Hi Sven,

> I found the issue and a somehow working solution.

Nice

> The issue is described here: https://www.claudiokuenzler.com/blog/1257/how-to-fix-missing-keymaps-debian-ubuntu-localectl-failed-read-list
>
> TLDR: Debian does not ship the keymaps in the map format as localectl and
> systemd would expect it. They even go so far as to strip those keymaps from
> the kbd package.

Ups, I wonder why Debian does this ?

> By manually downloading the keymaps from the upstream kbd project and
> placing them under /usr/share/keymaps this can be avoided.

ok.

> For a kiwi build this means that you need to remove the keytable from the
> description and place the upstream kbd keymaps in the target rootfs of the
> image.

Yes a workaround

> In the config script you then need to make the call to systemd-firstboot,
> which will finally work.

yep. But you added keymaps from somewhere not belonging to the system.
A package update of the standard Debian packages might "destroy" this
workaround data no ?

> I still don't know why it was working for Debian 12 since it seems this
> "bug" exists for some time now. But I will at least try to make the Debian
> systemd maintainer aware of this issue

Great and thanks much for letting us know. Something that could also
be mentioned as a troubleshooting section:

https://osinside.github.io/kiwi/troubleshooting.html

Just in case you are eager writing docs :)

https://github.com/OSInside/kiwi/tree/main/doc/source/troubleshooting
signature.asc
Reply all
Reply to author
Forward
0 new messages