FS#30380 - [kexec-tools] Implement wether we want to reboot with kexec with a configuration option

Attached to Project: Arch Linux
Opened by Olivier (olive) - Wednesday, 20 June 2012, 15:21 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 28 June 2012, 09:38 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

The way the system decides whether kexec should be used for reboot seems odd. We enable a "service" at boot time and kexec is used if this service is "running". That seems odd because there are in reality no process running. Moreover how this feature is implementing is very confusing with /etc/rc.d/kexec supporting unstandard option load/unload and the stop option not doing at all the same thing in runlevel 6 (loading the kernel to make the kexec) or the normal runlevel (not using kexec on the next reboot). This reflects that there are in reality no services to stop.

I think it would make much more sense to enable this via a configuration option. I propose the following change:

1) Add an option
USE_KEXEC=yes/no in /etc/conf.d/kexec

2) In case USE_KEXEC is yes;
Load the initrd and the kernel somewhere in /etc/rc.shutdown (before the pivot_root) and perform the reboot via kexec at the end of the script. Probably add sanity checks and enable a normal BIOS reboot if anything fails.

Package version kexec-tools 2.0.2-5
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 28 June 2012, 09:38 GMT
Reason for closing:  Won't implement
Comment by Dave Reisner (falconindy) - Saturday, 23 June 2012, 01:05 GMT
Sure, would you like to see alsa converted to USE_ALSA=y as well, since it isn't really a daemon? i don't really understand the point of this. The end result is the same. The logic to determine whether to kexec or reboot is already in place. It's just a matter of ensuring _something_ loads the jump kernel if desired. The /etc/rc.d script is that something.
Comment by Tom Gundersen (tomegun) - Saturday, 23 June 2012, 01:34 GMT
Seems a bit odd to make kexec a static configuration (either as a variable somewhere or as a DAEMON). Wouldn't the admin just load the kernel when s/he wants to reboot into a new kernel?
Comment by Dave Reisner (falconindy) - Saturday, 23 June 2012, 01:35 GMT
Most distros automate this somehow, and to some degree. To point out the other extreme, ubuntu will always use kexec if its installed.
Comment by Tobias Powalowski (tpowa) - Saturday, 23 June 2012, 07:59 GMT
Systemd has also a daemon for it.

Loading...