1 |
On Mon, Nov 17, 2014 at 01:52:28AM +0000, thegeezer wrote: |
2 |
> kexec is a great little utility. when you run "/etc/init.d/kexec start" |
3 |
> it creates references in the existing kernel for a soft reboot into a |
4 |
> new kernel. you can then at a time of your choosing run "reboot" and |
5 |
> the system will appear to go through a clean shutdown cycle, but instead |
6 |
> of triggering the power cycle, it will access the referenced kernel and |
7 |
> initram and load them into memory as though we are just coming from the |
8 |
> grub boot menu. the kernel image and initramfs must be visible at the |
9 |
> time you choose to reboot. |
10 |
|
11 |
I've heard a little about this and have been curious to try it, but |
12 |
haven't had the opportunity to dig into it yet. |
13 |
|
14 |
> using the tools manally is possible too -- /etc/init.d/kexec automounts |
15 |
> boot and searches for the bits to use. you can do it manually by |
16 |
|
17 |
/etc/init.d/kexec - is this a SysV/OpenRC-based init script? How does it |
18 |
play with systemd, do you know? |
19 |
|
20 |
> ## load a kernel and initram |
21 |
> kexec -l /boot/vmlinux --append=dolvm, root=/dev/vg/root |
22 |
> --initrd=/boot/initrd |
23 |
> |
24 |
> ## reboot hard and fast into new kernel (warning does not go through |
25 |
> shutdown so mounted fs acts as though you hit the reset button) |
26 |
> kexec -e |
27 |
|
28 |
Would I be correct in guessing that this is dependant on |
29 |
sys-apps/kexec-tools being installed and CONFIG_KEXEC being enabled in |
30 |
the kernel? And, with CONFIG_KEXEC, is that required for the old kernel, |
31 |
new kernel or both? |
32 |
|
33 |
Also, how would one go about manually using kexec while still adhearing |
34 |
to a clean shutdown (going down through init, rather than just "reset" |
35 |
into the new kernel)? |
36 |
|
37 |
> hope this has been interesting! |
38 |
|
39 |
It has, and having read this I'm going to try and play around with it in |
40 |
the next couple of days. |
41 |
|
42 |
Thanks for the info on it. |
43 |
|
44 |
Cheers. |
45 |
-- |
46 |
wraeth <wraeth@×××××××××.au> |
47 |
GnuPG Key: B2D9F759 |