On Mon, Nov 17, 2014 at 01:52:28AM +0000, thegeezer wrote:
> kexec is a great little utility.  when you run "/etc/init.d/kexec start" 
> it creates references in the existing kernel for a soft reboot into a 
> new kernel.  you can then at a time of your choosing run "reboot" and 
> the system will appear to go through a clean shutdown cycle, but instead 
> of triggering the power cycle, it will access the referenced kernel and 
> initram and load them into memory as though we are just coming from the 
> grub boot menu. the kernel image and initramfs must be visible at the 
> time you choose to reboot.

I've heard a little about this and have been curious to try it, but
haven't had the opportunity to dig into it yet.

> 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?

> ## load a kernel and initram
> kexec      -l /boot/vmlinux       --append=dolvm, root=/dev/vg/root 
> --initrd=/boot/initrd
> 
> ## reboot hard and fast into new kernel (warning does not go through 
> shutdown so mounted fs acts as though you hit the reset button)
> kexec      -e

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?

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

> hope this has been interesting!

It has, and having read this I'm going to try and play around with it in
the next couple of days.

Thanks for the info on it.

Cheers.
-- 
wraeth <wra...@wraeth.id.au>
GnuPG Key: B2D9F759

Attachment: signature.asc
Description: Digital signature

Reply via email to