Kexec fail
Utility 'kexec' is in the 'kexec-tools' package. It enables to change the kernel, without having to perform a complete reboot. It can run a new kernel, new initrd and new kernel commandline parameters.
I posted a few days ago about compiling the kernel to support kexec:
- The pink and grey galahs have returned! — September 28, 2024
Both EasyOS and QV have a menu in the initrd, with one entry to run the Xorg Wizard instead of starting Xorg. A problem with that, is that ideally I want the kernel to boot with the "nomodeset" parameter, so as to start Xorg Wizard with a very basic video setup. This is where kexec would be useful. Unfortunately, cannot get it towork.
Here is the menu in the initrd. Item 8 is the one we want:
I put in code to execute kexec; however, it refused to load the kernel, with this error message:
Symbol: '__auxval' in common section
Hunted all over the place online, could not find anyone reporting that error. The kexec utility is compiled statically with klibc in OpenEmbedded/Yocto, using kexec-tools version 2.0.18. So, I bumped to version 2.0.28; now, the kernel loads.
There are two steps, kexec has to be run twice, first to load the kernel, second to execute the loaded kernel. There are usually more commandline parameters required, but this is the basic idea:
# kexec -l <path to new kernel>
# kexec -e
What happens now, is the second execution of kexec runs, a cursor appears on the screen, then ...nothing happens.
My knowledge of how kexec works is very superficial. Played around with various parameters, but no joy. Have commented-out the code in the 'init' script in the initrd:
https://github.com/bkauler/woof-quantum-vis/commit/877731dc37ae55313defb405b475c31d35d893c4
...have left the code in there, as maybe will figure out what is wrong sometime in the future.
Note, I had hoped to get kexec working for another reason. There
needs to be a mechanism to manage change of kernel version in QV.
Need to put some thought into that.
Tags: quirky