You are not logged in.

#1 2012-08-28 14:47:36

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

[SOLVED]systemd and kexec doesn't work together!

Since I moved to systemd I noticed that my kexec isn't working anymore. 'systemctl kexec' just does a normal reboot.

[root@system ~]# systemctl status kexec.service
kexec.service - Legacy unit for kexec
	  Loaded: loaded (/etc/rc.conf)
	  Active: active (exited) since Tue, 28 Aug 2012 19:58:45 +0530; 9min ago
	    Docs: man:arch-daemons(8)
	 Process: 223 ExecStart=/etc/rc.d/kexec start (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/kexec.service

Aug 28 19:58:45 system kexec[223]: [107B blob data]
[root@system ~]#

I searched the ML and found this.
http://lists.freedesktop.org/archives/s … 04760.html

I tried a few options given there, but then I didn't quite understand what LP was saying about the workaround.
Any one has any thoughts on this?

Last edited by hadrons123 (2012-10-06 01:18:23)


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#2 2012-09-14 18:41:57

Floft
Member
Registered: 2009-11-15
Posts: 43

Re: [SOLVED]systemd and kexec doesn't work together!

Just so happens I was playing around with this earlier today. Not sure if you're still having problems, but if you are, you should be able to create something like that guy said.

[Unit]
DefaultDependencies=no
Before=shutdown.target umount.target final.target

[Service]
Type=oneshot
ExecStart=/sbin/kexec -l /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --reuse-cmdline

[Install]
WantedBy=kexec.target

Then you just enable it and run "systemctl kexec" to restart.

Offline

#3 2012-10-05 17:12:22

dhaines
Member
From: Boston, Massachusetts
Registered: 2011-01-07
Posts: 19

Re: [SOLVED]systemd and kexec doesn't work together!

I too am experiencing full reboots, even having followed Floft's (and the Wiki's) instructions. I have been able to do a dirty reboot with kexec, but I can't get systemd to do a clean one for me.

Anyone have any ideas?

Offline

#4 2012-10-05 17:38:52

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [SOLVED]systemd and kexec doesn't work together!

I tried already and didn't work out.
I should have posted.

Anyone have any ideas?

I don't think anyone here does.
The mention of systemd just makes people throw a fit.
I think some work is in progress about this , since the upstream Devs already know this issue.


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#5 2012-10-05 20:43:40

dhaines
Member
From: Boston, Massachusetts
Registered: 2011-01-07
Posts: 19

Re: [SOLVED]systemd and kexec doesn't work together!

I figured it out (at least for me).

Remove the shutdown hook from your mkinitcpio.conf, rebuild your initrd image and it should work. I believe that this is because the hook handles the unmounting of devices that systemd needs to kexec and which it would normally unmount on its own. Relatedly, you don't need the fsck hook in there either, as systemd fscks root for you.

Offline

#6 2012-10-06 01:17:56

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [SOLVED]systemd and kexec doesn't work together!

Thanks for inputs to the wiki. Now it works for me too.


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#7 2012-10-06 06:57:02

martadinata
Member
Registered: 2012-01-26
Posts: 26

Re: [SOLVED]systemd and kexec doesn't work together!

sorry for bumpe the thread, i dont have shutdown hooks but also doesn' work smile

Offline

Board footer

Powered by FluxBB