Hi, <snip>
Sorry for jumping in mid thread, but I just noticed this and some functionality like this has my interest too. I especially triggered on the cpio / initrd proposal. I have been discussing something similar with the systemd folks, see some background see: https://lists.freedesktop.org/archives/systemd-devel/2019-September/043498.html https://lists.freedesktop.org/archives/systemd-devel/2019-September/043515.html https://lists.freedesktop.org/archives/systemd-devel/2019-September/043520.html https://lists.freedesktop.org/archives/systemd-devel/2019-September/043521.html Where the last one goed into the cpio / appended initrd concept. What we were discussing there is a way to pass the kbd-layout to the bootloader and then having the bootloader pass it back to the initrd (so userspace in a way). The problem is that localectl updates /etc/vconsole.conf but that does not influence that file in existing initrds so the initrd has a wrong value after changing the kbd layout and regenerating the initrd is undesirable, since we keep old kernel + initrds around as a fallback in case something breaks and if it is the initrd which broke then regenerating it will break the fallback. So Lennart said that we should really also pass the kbdmap to the bootloader in case the bootloader supports it (for the cmdline mode). Lennart suggested dropping a kbdmap file next to say grubenv which contains the kbdmap info. I instead am suggesting a "config" file which contains key-value pairs to make the mechanism more generic. Now the problem is, we still need to get this info to the initrd. Typically the initrd does not mount /boot or the ESP, so it cannot directly get to the kbdmap or config file. Lennart suggested simply passing it on the kernel cmdline which will work for the kbdmap case, but again is not very generic. I instead suggested making the "config" (or whatever we are going to name ir) file available to the initrd variant by append an on the fly generated cpio archive to the initrd with that file in it. Which is why I triggered on the mentioning of using cpio to pass info from the bootloader to userspace. Please keep in mind that what I'm looking for is a bootloader agnostic solution. Requiring changes to the bootloader is fine, but it is something which should not be grub specific. Anyways TL;DR: I think that being able to pass an extra on the fly generated cpio archive appended to the initrd when booting is something which would be useful to have. Regards, Hans _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel