kexec-reboot
kexec-reboot copied to clipboard
Support for multiple initrd arguments
When, having multiple arguments (files) in the initrd parameter
(for example: initrd /intel-ucode.img /initramfs-4.19-x86_64.img),
the script fails to read the corresponding kernel (I guess this happens to due loading both arguments as one file).
Strange, I got an email with what looked like a patch. I don't see it here though. Did it actually not work? If it does work, I'm happy to accept a pull request.
@Num2 When intel-ucode is loaded, it persists a kexec reboot. You can not load it twice. (I tried)
My test:
- boot without ucode
- ucode revision old
- kexec reboot with 'normal' initrd
- ucode revision still old
- kexec reboot with merged initrd (see resource 1 below)
- ucode got updated (
journalctl -o cat -k --grep=microcodegives "updated early") - ucode revision newer than 'old'
- kexec reboot with 'normal' initrd
- no update during boot but still the same 'newer' revision from step 7
Resources:
- Combine ucode and initramfs (old bootloaders do not support multiple initrd images) https://wiki.archlinux.org/title/microcode#LILO
- Check the loading itself and the loaded ucode revision https://wiki.archlinux.org/title/microcode#Verifying_that_microcode_got_updated_on_boot
Edit:
Multiple initrd's are not supported by kexec. If you run e.g. sudo kexec -l /boot/vmlinuz-linux --initrd=/boot/intel-ucode.img --initrd=/boot/initramfs-linux.img --reuse-cmdline the 2nd initrd will override the 1st.