kexec-reboot icon indicating copy to clipboard operation
kexec-reboot copied to clipboard

Support for multiple initrd arguments

Open ghost opened this issue 6 years ago • 2 comments

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).

ghost avatar May 29 '19 07:05 ghost

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.

error10 avatar May 29 '19 16:05 error10

@Num2 When intel-ucode is loaded, it persists a kexec reboot. You can not load it twice. (I tried)

My test:

  1. boot without ucode
  2. ucode revision old
  3. kexec reboot with 'normal' initrd
  4. ucode revision still old
  5. kexec reboot with merged initrd (see resource 1 below)
  6. ucode got updated (journalctl -o cat -k --grep=microcode gives "updated early")
  7. ucode revision newer than 'old'
  8. kexec reboot with 'normal' initrd
  9. no update during boot but still the same 'newer' revision from step 7

Resources:

  1. Combine ucode and initramfs (old bootloaders do not support multiple initrd images) https://wiki.archlinux.org/title/microcode#LILO
  2. 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.

auipga avatar Jun 16 '21 06:06 auipga