Bug 55248 - systemd incorrectly hardcodes /sbin/kexec
Summary: systemd incorrectly hardcodes /sbin/kexec
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-23 18:12 UTC by Jonathan Callen
Modified: 2013-07-16 03:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jonathan Callen 2012-09-23 18:12:47 UTC
In systemd-shutdown, the path to kexec is hardcoded as /sbin/kexec, but on some Linux distributions, kexec is installed in /usr/sbin/kexec and /sbin is not a symlink to /usr.  Systemd should search in more locations than just /sbin for this program.
Comment 1 Lennart Poettering 2012-09-24 08:24:20 UTC
On distributios where /bin is not a symlink to /usr/bin, i.e. where split off /usr is supported kexec needs to be in the root fs, since /usr is not necessarily available that late.

So, from what I understand your setup is contradictory. Can you elaborate?
Comment 2 Jonathan Callen 2012-09-24 23:50:04 UTC
On Gentoo, /usr is never unmounted by the default init system (sysvinit+openrc) on shutdown; it's treated like / and just remounted read-only.  This means that /usr is always considered available during the final stages of shutdown and /usr/sbin/kexec can be called to complete the reboot.
Comment 3 Lennart Poettering 2012-09-25 10:39:04 UTC
But systemd doesn't do that. It really tries hard to unmount everything that works, and all the storage below it. And that includes /usr. Only the root fs itself stays read-only.

I mean, I am not opposed to making this detectable at boot, like we do it for the quota tools (But I'd need a patch for that). However, I'd just like to point out that sucha setup makes little sense.
Comment 4 Lennart Poettering 2013-04-04 01:09:18 UTC
(In reply to comment #3)

> I mean, I am not opposed to making this detectable at boot, like we do it
> for the quota tools (But I'd need a patch for that). However, I'd just like
> to point out that sucha setup makes little sense.

detectable at "build" is what i meant here, not boot.
Comment 5 Zbigniew Jedrzejewski-Szmek 2013-07-16 03:23:14 UTC
Path to kexec will now be detected at build time: http://cgit.freedesktop.org/systemd/systemd/commit/?id=7801356.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.