Essentially localectl no longer supports setting keyboard config in Debian and Ubuntu.
So, we change to writing the keyboard config to /etc/default/keyboard instead.
I've tested this with elementary OS images based on Ubuntu 22.04 and the upcoming 24.04. I've confirmed that it fixes the 24.04 bug and continues to work correctly on 22.04.
My testing has involved setting non-US keyboard layouts (gb, gb/colemak), and checking they are used on the disk decryption screen, which they are.
Unsure how this behaves once in a graphical session, as we set the keyboard layout again in the initial setup in elementary OS. But I believe that this is all localectl was doing anyway before the functionality was removed.
Will need some further testing, but this should be a possible fix for installation failures on newer Ubuntu bases.
With Ubuntu Noble (24.04) based images, we get the following and the install fails:
See https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2030788
Essentially
localectl
no longer supports setting keyboard config in Debian and Ubuntu.So, we change to writing the keyboard config to
/etc/default/keyboard
instead.I've tested this with elementary OS images based on Ubuntu 22.04 and the upcoming 24.04. I've confirmed that it fixes the 24.04 bug and continues to work correctly on 22.04.
My testing has involved setting non-US keyboard layouts (
gb
,gb/colemak
), and checking they are used on the disk decryption screen, which they are.Unsure how this behaves once in a graphical session, as we set the keyboard layout again in the initial setup in elementary OS. But I believe that this is all
localectl
was doing anyway before the functionality was removed.Will need some further testing, but this should be a possible fix for installation failures on newer Ubuntu bases.