#1111737 orphan-sysvinit-scripts: please include scripts for kexec-tools, which were dropped in trixie

#1111737#5
Date:
2025-08-21 15:24:51 UTC
From:
To:
Dear Maintainer,

the kexec-tools package in trixie has lost its SysV scripts, because

Is it possible to take over at least /etc/init.d/kexec in o-s-s?

Without that script, the kexec mechanism is unusable under sysvinit, because

# kexec -l /vmlinuz --initrd=/initrd.img --reuse-cmdline
# init 6

results in a standard reboot, instead of a fast reboot the user expects.

Best regards,
	g.b.

#1111737#10
Date:
2025-08-21 16:14:16 UTC
From:
To:
Hi,
needs kexec package, but why then remove support for for users who
still rely on it?
Perhaps kexec maintainer can be convinced to restore the sysvinit
script?

Regards,
Lorenzo

#1111737#15
Date:
2025-08-21 16:14:16 UTC
From:
To:
Hi,
needs kexec package, but why then remove support for for users who
still rely on it?
Perhaps kexec maintainer can be convinced to restore the sysvinit
script?

Regards,
Lorenzo

#1111737#20
Date:
2025-08-21 18:14:55 UTC
From:
To:
lifting is done by /sbin/kexec.

If I understand correctly, what changed in 2023 (see #1039248) is the
addition of a proper systemd unit for a kexec reboot, instead of the
auto-generated stub which used to invoke /etc/init.d/kexec (i.e. a
wrapper around "kexec -e") at the right time in the shutdown sequence.
Therefore, /etc/init.d/kexec is now superfluous and can be dropped:
sysvinit users don't matter.

Perhaps, but similar requests for e.g. rsyslog and nftables have been
summarily discarded, so I'm a bit pessimistic.  Anyway, it might be too
late for trixie.

Regards,
	g.

#1111737#25
Date:
2025-08-21 18:14:55 UTC
From:
To:
lifting is done by /sbin/kexec.

If I understand correctly, what changed in 2023 (see #1039248) is the
addition of a proper systemd unit for a kexec reboot, instead of the
auto-generated stub which used to invoke /etc/init.d/kexec (i.e. a
wrapper around "kexec -e") at the right time in the shutdown sequence.
Therefore, /etc/init.d/kexec is now superfluous and can be dropped:
sysvinit users don't matter.

Perhaps, but similar requests for e.g. rsyslog and nftables have been
summarily discarded, so I'm a bit pessimistic.  Anyway, it might be too
late for trixie.

Regards,
	g.

#1111737#30
Date:
2025-08-21 19:01:38 UTC
From:
To:
[...]

It *is* too late for trixie but often package maintainers simply don't
realise there remains a constituency of users for the initscript and
will accept them back into the package, so I think it's worth a try!

One thing I like to do is to trim unnecessary complexity that is no
longer relevant, doing convoluted things with legacy environment
variables which is contrary to initscript best practice. A slimmer
script may be more palatable to an uncertain maintainer.

Often one can go further and write a fresh initscript using
init-d-script(5) with only a few lines - that might help change package
maintainers' preconceptions about initscripts!

Andrew

#1111737#33
Date:
2025-08-22 07:53:54 UTC
From:
To:
Hi,

A similar request was made to Devuan a while ago[1].

My reading is that an initscript is no longer required. Based on
the changelog entry[2], the non-systemd way of doing this is now

 kexec-load-kernel; reboot

Mark


[1]  https://bugs.devuan.org/871

[2]  https://sources.debian.org/src/kexec-tools/1%3A2.0.29-2/debian/changelog#L60

#1111737#38
Date:
2025-08-22 08:02:36 UTC
From:
To:
submitted #1111802
#1111737#43
Date:
2025-08-22 09:12:39 UTC
From:
To:
Not sure about Devuan, but definitely it is required on debian.

I tried "kexec-load-kernel; reboot" on my trixie system, and it did
not work as expected: just a standard reboot through the boot loader.

A kexec reboot requires two steps:

1. load kernel, initrd, and command line with "kexec -l": this is done
   by kexec-load-kernel (or manually)

2. in the /etc/rc6.d sequence, just after the root filesystem is unmounted,
   invoke "kexec -e" instead of the usual "reboot -f -d".

Don't know about systemd: perhaps it detects that a kernel has been loaded
(peeking at /sys/kernel/kexec_loaded) and does the right thing.

But for SysV, /etc/init.d/kexec is the only place where "kexec -e"
is invoked.  If it's missing, then after /etc/init.d/umountroot the
sequence proceeds to /etc/init.d/reboot, which just does "reboot -d -f".

Regards,
	g.b.

#1111737#46
Date:
2025-08-22 16:19:41 UTC
From:
To:
Thanks.

Just following up the latest (non-maintainer) comment in #1111802, even if the
maintainer of kexec-tools refuses to reinstate the LSB initscript, I am not sure
o-s-s is the right place for it. IIUC, o-s-s triggers on the systemd unit but
kexec-tools has no unit.

I wonder if bin:initscripts might be a better option.

Matthew, what do you think?

But I hope this is moot and the kexec-tools maintainer is more enlightened.

Mark

#1111737#51
Date:
2025-08-24 17:15:59 UTC
From:
To:
Hi,

o-s-s does require a service file to trigger on (I think any path under
/lib/systemd/system/ would do at a pinch), which kexec-tools doesn't
have. So I think initscripts would fit better if it's necessary (it's
not clear to me that an init script is still needed, and/or whether
shutdown or equivalent should do the necessary instead now).

Regards,

Matthew

#1111737#56
Date:
2026-08-20 15:30:39 UTC
From:
To:
Hi,

I see that #1111802 has been fixed, and it looks like kexec-tools have
init scripts again, so I'm closing this bug.

Thanks,

Matthew