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