FS#22950 - [kexec-tools] kexec -e fails if /usr is a separate partition
Attached to Project:
Arch Linux
Opened by Matteo Sasso (m.sasso) - Friday, 18 February 2011, 17:26 GMT
Last edited by Allan McRae (Allan) - Saturday, 19 February 2011, 03:39 GMT
Opened by Matteo Sasso (m.sasso) - Friday, 18 February 2011, 17:26 GMT
Last edited by Allan McRae (Allan) - Saturday, 19 February 2011, 03:39 GMT
|
Details
The kexec executable is dynamically linked to libraries
under /usr (/usr/lib/liblzma.so.5 and /usr/lib/libz.so.1 in
kexec-tools-2.0.2-2).
This means that kexec fails (when launched from rc.shutdown) if /usr is a separate partition. Possible solutions: 1) Change zlib and xz packages so that they install those libraries under /lib. 2) Change kexec so that it installs its own copies of those libraries under /lib. 3) Change the shutdown script so that it remounts /usr read-only instead of unmounting it (doesn't work if /usr is a network share) 4) Change the shutdown script so that it creates a temporary ramdisk, copies all needed libraries before unmounting /usr and LD_PRELOADs them. Solutions 3) and 4) are a little hackish, and not in a good sense. I could implement solution 4) if asked. I believe solution 1) is the best, especially since other binaries under /bin and /sbin use them. On my system, for example, they are: /bin/ping6 /sbin/fsck.cramfs /sbin/mkfs.cramfs /sbin/mksquashfs /sbin/mount.fuse.ntfs /sbin/unsquashfs Tell me if I should open bugs for zlib and xz. |
This task depends upon
Closed by Allan McRae (Allan)
Saturday, 19 February 2011, 03:39 GMT
Reason for closing: Fixed
Additional comments about closing: kexec-tools 2.0.2-3
Saturday, 19 February 2011, 03:39 GMT
Reason for closing: Fixed
Additional comments about closing: kexec-tools 2.0.2-3
And here's the same bug report in Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=256241 -- they opted for static compilation
export LDFLAGS+=" -static"
It builds without error and file reports that it is indeed static:
kexec: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.6.27, stripped