[systemd-devel] Run "ipmitool power cycle" after lib/systemd/system-shutdown scripts

Adam Nielsen a.nielsen at shikadi.net
Fri Feb 11 09:54:01 UTC 2022


> > After flashing the firmware of some pcie card I need to power cycle
> > the server to finish the flashing process.  
> 
> Can you please tell us the PCIe device, where a normal system reboot is 
> not enough to reset it, so I can avoid buying it?

Most remote access cards work like this by design.  You might be
connected to a remote computer via a web browser, and need to get into
the BIOS to change some settings.  If you reboot the machine, the last
thing you want is the card to reset as well, causing your remote
session to drop out.  By the time the card's firmware has started and
you reconnect, you've probably missed the prompt to press F2/DEL/etc.

A lot of server hardware (e.g. SAS controllers) have onboard firmware
which may or may not restart during a reboot.  This is also by design,
because the cards can take many minutes for the firmware to boot up, so
by continuing to run the firmware across a restart they can cut the
server boot time down by many minutes, which makes a big difference if
you're running an OS that requires frequent reboots.

I think most hardware vendors (at least in the server space) view a
reboot as a means to apply operating system updates rather than a means
to actually reset hardware.  This would no doubt be why programs like
ipmitool have an option to automatically power cycle the machine, for
the rare cases where you do want the hardware reset as well.

It's only really a problem when you try to use this server hardware in
consumer machines, which don't really have a means to automatically
power cycle themselves.  Most servers seem to be configurable, to do
things like intercept a hardware reset and turn it into a power cycle
automatically, or have an "always on" mode configured where you just
tell the OS to shut down and power off, and the server will
automatically power itself back on a few seconds later, or at the very
least the server will have one of those remote access controllers that
you can use to remotely power it back on again after you've done a
normal shut down + power off.

So if you don't like the idea of parts of the system continuing to run
across reboots, just stay clear of hardware designed for enterprise
servers and you'll likely never encounter it.

Cheers,
Adam.


More information about the systemd-devel mailing list