dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
573 stars 396 forks source link

fw_cfg support for qemu module #2617

Closed LaszloGombos closed 3 months ago

LaszloGombos commented 5 months ago

Enhance the qemu dracut module so that it can extend the command line that was passed in when Linux kernel started.

This can happen either using the fw_cfg or smbios qemu arguments.

See https://www.qemu.org/docs/master/specs/fw_cfg.html and https://www.qemu.org/docs/master/system/invocation.html#hxtool-4

systemd has similar feature for credential management - https://github.com/systemd/systemd/blob/main/docs/CREDENTIALS.md?plain=1#L53

When qemu is used with UKI (and not Direct Linux Boot), -append command line option is not available to control kernel command line arguments.

To read the value from within the guest passed in via qemu cat /sys/firmware/qemu_fw_cfg/by_name/opt/io.dracut.cmdline-extra/raw