|
Bugzilla – Full Text Bug Listing |
| Summary: | systemd: kexec reboots instead of kexecing | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.4 | Reporter: | Jiri Slaby <jslaby> |
| Component: | Basesystem | Assignee: | Frederic Crozat <fcrozat> |
| Status: | VERIFIED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Factory | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Jiri Slaby
2011-02-14 11:10:48 UTC
systemd has native kexec support. does: systemd kexec work? oops, systemctl, i meant (In reply to comment #1) > systemd has native kexec support. does: > systemd kexec > work? Hmm, no. How the parameters are supposed to be passed: # systemctl kexec /boot/vmlinuz --initrd abc systemctl: unrecognized option '--initrd' "kexec -l ..." loads the kernel and the parameters "kexec -e" boots the kernel with native systemd, the "kexec -e" step should be "systemctl kexec" (In reply to comment #4) > "kexec -l ..." loads the kernel and the parameters > "kexec -e" boots the kernel > > with native systemd, the "kexec -e" step should be "systemctl kexec" There is a third functionality of kexec. Without loading you do: kexec /boot/vmlinuz --initrd=/boot/initrd --command-line='...' and it does all the needed steps including services shutdown. And that one doesn't work with systemd. Manpage says: It's also possible to invoke kexec without an option parameter. In that case, kexec loads the specified kernel and then invokes shutdown(1). If the shutdown scripts of your Linux distribution support kexec-based rebooting, they then call kexec -e just before actually rebooting the machine. That way, the machine does a clean shutdown including all shutdown scripts. Yeah, that's currently the expected behavior with systemd. /sbin/shutdown is linked to "systemctl poweroff" For kexec execution, systemd does not do implicit different behavior depending on the load-state of a possible kexec kernel like the sysv halt script did, it requires the explicit "kexec" command to be given. We might want to patch the kexec binary to know about systemd, or just the sysv compat code in systemctl. I'll check with upstream ... Added code to the systemctl sysv compat support: http://cgit.freedesktop.org/systemd/commit/?id=5622dde36deb414ab372a2d767584eaca73aec46 This: kexec /boot/vmlinuz --initrd=/boot/initrd --command-line='...' now results in: systemd[1]: About to execute: /bin/systemctl --force kexec during reboot. (In reply to comment #8) > Added code to the systemctl sysv compat support: > > http://cgit.freedesktop.org/systemd/commit/?id=5622dde36deb414ab372a2d767584eaca73aec46 The commit is part of systemd 19. But it still doesn't work with factory (systemd 33). It just reboots... hmm, I just ran "kexec /boot/vmlinuz --initrd=/boot/initrd --command-line='3'" under a Factory system running with systemd and system shutdowned, ran kexec on the kernel and booted correctly. Could you give me a complete test case ? (In reply to comment #10) > hmm, I just ran > "kexec /boot/vmlinuz --initrd=/boot/initrd --command-line='3'" under a Factory > system running with systemd and system shutdowned, ran kexec on the kernel and > booted correctly. > > Could you give me a complete test case ? Hmm, this is interesting. I don't know what exactly I should provide. When I boot with sysvinit and do the command you do, it works. With systemd it shutdowns the system and reboots. It is an updated factory with the -next kernel. But I also tried 3.0 and 2.6.37 from kernel:11.4 and kernel:stable respectively with the same result. hmm, interesting indeed, now, I tried again to run the test and running the command reboots the system (and it was working this morning).. After testing more, there is a different behaviour if systemd-sysvinit is installed or not : - if systemd-sysvinit is installed, kexec works as expected - if systemd-sysvinit is not installed, reboot is done instead of kexec, because /sbin/shutdown is handled by sysvinit and systemd doesn't check for kexec_loaded value. I'll fix that. fixed in home:fcrozat:systemd/systemd. Will land in Base:System (and Factory) later. landed in Base:System This is an autogenerated message for OBS integration: This bug (671673) was mentioned in https://build.opensuse.org/request/show/79689 Factory / systemd |