On Sun, Nov 16, 2014 at 10:25 PM, wraeth <wra...@wraeth.id.au> wrote: > On Mon, Nov 17, 2014 at 01:52:28AM +0000, thegeezer wrote: > >> using the tools manally is possible too -- /etc/init.d/kexec automounts >> boot and searches for the bits to use. you can do it manually by > > /etc/init.d/kexec - is this a SysV/OpenRC-based init script? How does it > play with systemd, do you know?
Kexec is a generic tool. The init.d script is openrc-specific. If you have a kernel loaded, you can reboot to it in systemd by just running systemctl kexec - that will shutdown the system and run the new kernel. You can also set up a systemd unit to load the kernel at boot time - kexec-tools installs one such unit already, and arch has an example of an instance-based one. > > Would I be correct in guessing that this is dependant on > sys-apps/kexec-tools being installed and CONFIG_KEXEC being enabled in > the kernel? And, with CONFIG_KEXEC, is that required for the old kernel, > new kernel or both? Yes, and I believe it is needed for the running kernel (though you'd probably want it on the new one too). > > Also, how would one go about manually using kexec while still adhearing > to a clean shutdown (going down through init, rather than just "reset" > into the new kernel)? kexec -e is the command you want to run when you're ready to reboot. Obviously you don't want to run that until you're shut down. How to shut down is a function of your init implementation. -- Rich