FS#32541 - [mkinitcpio] doesn't ship kexec binary for shutdown logic

Attached to Project: Arch Linux
Opened by Jan (medhefgo) - Thursday, 08 November 2012, 11:00 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 10 December 2012, 15:43 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

mkinitcpio's shutdown hook has kexec logic, but it ultimately cannot work because it is missing the /sbin/kexec binary. This results in a normal reboot using "systemctl kexec".

On a side note: with a nifty 7.8MiB /run/initramfs could go on a diet. Cause quite some binaries aren't even used by the shutdown script, this should be possible.
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Monday, 10 December 2012, 15:43 GMT
Reason for closing:  Implemented
Comment by Dave Reisner (falconindy) - Saturday, 10 November 2012, 00:38 GMT
Not interested in adding the dep. If you want kexec, then add it to BINARIES.

Patches welcome if you want to point out what else can be removed from the image. The hook already nukes the modules directory from the root, which is the bulk of most images. Note that "quite some binaries" are actually just symlinks back to busybox.
Comment by Jan (medhefgo) - Saturday, 10 November 2012, 12:50 GMT
I was thinking about an optdep for kexe-tools saying something like "kexec support for shutdown hook". And the hook would then add it if it finds kexec. That shoouldn't hurt anyone. I wouldn't mind making the patches if they would be accepted.
Comment by Dave Reisner (falconindy) - Friday, 16 November 2012, 22:08 GMT
I've crafted something that will copy the kexec binary off the host at shutdown so that we can avoid packing it in the initramfs. Binary dependencies (only really libz.so) are implicitly fulfilled by the presence of kmod (part of the base hook).

Will likely push this into the next feature release.
Comment by Dave Reisner (falconindy) - Sunday, 02 December 2012, 15:28 GMT
If you're using testing, this was implemented in 0.12.0. mkinitcpio will copy the binary from the host at shutdown if it isn't available.

Loading...