[systemd-devel] Make systemd-localed modify the kernel commandline for the initrd keymap?

Hans de Goede hdegoede at redhat.com
Fri Sep 27 08:20:56 UTC 2019


Hi,

On 26-09-2019 14:13, Alberto Ruiz wrote:
> Hello Hans,
> 
> Thanks for starting this discussion.
> 
> Looking at this from a Fedora/Dracut POV, I think we should look at this as the start of implementing a configuration-only initramfs, (something Matthew Garret has been advocating for a while) rather than making this a vconsole.conf/plymouth specific solution.

Yes there seems to be consensus that the best way to handle this is using an overlay initramfs.

Let me copy and paste my comment on the silverblue issue about this here:

"So my plan for regular Fedora for this is as follows:

1. Have a /boot/initramfs-config.img which for now will just contain /etc/vconsole.conf (chances are this will get more files added over time)
2. Modify mkbls from /usr/lib/kernel/install.d/20-grub.install to add an initrd line for this image to the generated bls .conf file if the image is present
3. Add a new update-config-initramfs command to the install-kernel script, which generates /boot/initramfs-config.img
4. Make systemd-localed call "install-kernel update-config-initramfs: on locale (and keymap) setting changes"

I am waiting for feedback from the silverblue people to see if this will also
work for them. If they are happy with this then I plan to start implementing
this when I'm done with the plymouth keyboard layout indicator stuff.

Regards,

Hans



> 
> On Thu, Sep 26, 2019 at 12:43 PM Hans de Goede <hdegoede at redhat.com <mailto:hdegoede at redhat.com>> wrote:
> 
>     Hi,
> 
>     On 26-09-2019 11:53, Michael Chapman wrote:
>      > On Thu, 26 Sep 2019, Hans de Goede wrote:
>      >> Hi,
>      >>
>      >> On 26-09-2019 11:10, Michael Chapman wrote:
>      >>> On Thu, 26 Sep 2019, Hans de Goede wrote:
>      >>> [...]
>      >>>> I believe that the best alternative is to have localed append / update
>      >>>> a rd.vconsole.keymap=foo argument to the kernel commandline, to override
>      >>>> the vconsole.conf KEYMAP setting, but only in the initrd (so that later
>      >>>> runtime changes when booted still work).
>      >>>>
>      >>>> The way I see this working is that localed does a read-modify-write of
>      >>>> all the BLS .conf files under /boot/loader/entries and updates their
>      >>>> "options" line to have rd.vconsole.keymap=foo appended or updated if
>      >>>> already present.Hi,
>      >>>
>      >>> To be honest, I really do think having the initrd rebuilt completely is a
>      >>> better approach... but I do not think localed should be directly
>      >>> responsible for that.
>      >>
>      >> As I already mentioned there are 2 issues with rebuilding the initrd:
>      >>
>      >> 1) It might break booting the system and, assuming we rebuild the initrd
>      >> for all installed kernels on a locale change, then their will not be
>      >> an older one to fallback to as there normally is, which is BAD.
>      >>
>      >> 2) We are moving (and in case of rpmostree based distros already shipping)
>      >> to pre-generated (on the distros buildsys) initrds, which likely will
>      >> also be signed.
>      >>
>      >> How do you propose to solve these 2 issues?
>      >
>      > Hmm, these are good points. I do like the idea of using a
>      > locally-generated overlay initrd though.
> 
>     Ok, looking at:
>     https://github.com/fedora-silverblue/issue-tracker/issues/3
> 
>     It seems that this might be the preference of the silverblue
>     developers too and Javier also seems to favor that, so I guess
>     the first thing to do is to give that approach a try.
> 
>     I've added a comment to:
>     https://github.com/fedora-silverblue/issue-tracker/issues/3
>     asking the silverblue devs to confirm that the overlay initramfs
>     is still their preferred approach, once that is confirmed I will
>     give this a try by manually creating on overlay initramfs and then
>     we will see from there.
> 
>     Regards,
> 
>     Hans
> 
> 
> 
> -- 
> Alberto Ruiz
> Engineering Manager - Desktop Hardware Enablement
> Red Hat


More information about the systemd-devel mailing list