Description of problem: If using kexec to do a fast reboot on a system where /usr is a different fs than / then the initscripts halt/reboot code will have unmounmted /usr before it attempts to call $kexec_command -e -x Version-Release number of selected component (if applicable): initscripts-8.45.19.EL-1 and earlier How reproducible: 100% Steps to Reproduce: 1. install machine with seperate / and /usr 2. /sbin/kexec -l /boot/vmlinuz-2.6.18-92.1.10.el5 --append="ro root=/dev/ZexSys00/root" --initrd=/boot/initrd-2.6.18-92.1.10.el5.img (or whatever the lines are from your grub config) 3. /sbin/reboot Actual results: it goes throuh the full reboot via the bios despite the kexec code being in the script. Expected results: faster reboot via kexec and no bios Additional info: $ ldd /sbin/kexec linux-gate.so.1 => (0x00aac000) libz.so.1 => /usr/lib/libz.so.1 (0x00fce000) libc.so.6 => /lib/libc.so.6 (0x006c3000) /lib/ld-linux.so.2 (0x0038b000) so perhaps either the script should avoid unmounting /usr or have a copy of libz.so.1 in / Of course it probably only needs libz to load in the kernel/initrd so a stub libz might in fact be enough to allow the call to kexec -e -x to work or maybe it can onlyo load libz if it actually needs functions from it. I've added some debugging to /etc/rc.d/init.d/halt to show that /usr is unmounted before kexec is called but then you can probably see that easily enough without my pathetic hacks. Or I suppose you could just add some docs saying that /, /usr must be on the same fs for reboot to call kexec.
The tools need to be able to work with just /. Assigning to kexec-tools.
Created attachment 316198 [details] patch to statically link zlib here, please confirm that this fixes the problem for you. Thanks
I take it that this specfile patch is against kexec-tools-1.102pre-21.el5 I'll try rebuilding with that patch applied and see what happens...
With a minor tweak to move the --without-zlib outside the %ifarch that seems to work for me...
Created attachment 316204 [details] fix to patch to specfile Trivial change...
Hmm, configure using --without-zlib results in a very different content of Makefile.conf which seems to be missing all the HAVE_<feature> options in DEFS. I don't know if it really matters - the resulting kexec binary seems to work for me but I may be lucky or it might be a problem on certain platforms. Also since HAVE_ZLIB_H is missing it doesn't link against zlib at all since the function in kexec/kexec.c is #ifdef'd out so slurp_decompress_file() doesn't do any decompression. I don't know if that really matters or not. Here is a terrible hack to leave the configure alone and directly patch the Makefile.conf to add the static-link option... You can probably make this a lot cleaner...
Created attachment 316215 [details] different patch to specfile edit Makefile.conf after running comnfigure...
Created attachment 316216 [details] make that a unidiff (doh!)
Comment on attachment 316215 [details] different patch to specfile wrong diff options
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0105.html