Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyboard: fix wrong keyboard layout in initramfs #1411

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Conversation

ogayot
Copy link
Member

@ogayot ogayot commented Sep 8, 2022

During the installation, in the curthooks stage, curtin generates the initramfs. Unfortunately, the generated initramfs did not honor the keyboard mapping selected by the user during installation. Therefore, when LUKS encryption is used for the root file-system, the prompt for the passphrase ignores the keyboard layout set by the user.

To ensure that the initramfs uses the right keyboard layout, the /etc/console-setup/cached_* files must be updated before the initramfs gets created. At the beginning of the curthooks stage, we now call setupcon --save-only in the target to refresh those files if needed.

This PR addresses https://bugs.launchpad.net/subiquity/+bug/1894009

During the installation, in the curthooks stage, curtin generates the
initramfs. Unfortunately, the generated initramfs did not honor the
keyboard mapping selected by the user during installation. Therefore,
when LUKS encryption is used for the root file-system, the prompt for
the passphrase ignores the keyboard layout set by the user.

To ensure that the initramfs uses the right keyboard layout, the
/etc/console-setup/cached_* files must be updated before the initramfs
gets created. At the beginning of the curthooks stage, we now call
setupcon --save-only in the target to refresh those files if needed.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Copy link
Collaborator

@dbungert dbungert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with this if it has been VM tested.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
@ogayot ogayot merged commit 8c7df86 into canonical:main Sep 12, 2022
@ogayot ogayot deleted the FR-2404 branch September 12, 2022 15:33
@mwhudson
Copy link
Collaborator

I realize we don't really have the setup for this now, but given we run each curtin 'stage' separately, we don't need to get curtin to run these commands for us, we can just run them ourselves (this is true for the mount --bind /cdrom /target/cdrom command too of course)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants