1

I want to have the message system halted after command shutdown -H now, but my new PC after this command power-off the machine.

With my old PC that command worked fine. But my new PC is powered down after the command shutdown -H now instead of halting with message system halted on screen. What happened?

How to return normal behaviour of the shutdown -H now command?

OS version is Debian 8.5. Same version of OS is using on both machines, but reactions on shutdown -H now command are different.

Could it be settings in BIOS? Could it be a hardware problem?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250

1 Answers1

0

In Debian 9.x and, if I recall correctly, also in 8.x, the default behavior of shutdown -h now is determined by file /etc/default/halt.

By default, it says:

# Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff".
HALT=poweroff

Change the second line to HALT=halt, and then you should have your halt without an automatic power-down.

Older versions of the shutdown command did not care about the case of the -H option, for compatibility with other Unix-style systems; Debian 9 seems to have shutdown -H always halt, shutdown -P always power-down, and shutdown -h will do whatever the configuration file says. I don't have a Debian 8 system at hand, but it might be that Debian 8 is old enough to have a version of shutdown that still treats -H as equivalent to -h.

telcoM
  • 87,318
  • 3
  • 112
  • 232
  • Thanks for answer but you don't read my ask properly. "**Same** version of OS is using on both machines, but reactions on `shutdown -H now` command are different." On my old PC command works correctly. – Андрей Серегин Jul 18 '19 at 13:32
  • Does your old PC have the `/etc/default/halt` file configured differently? – telcoM Jul 18 '19 at 13:42
  • No no. Both systems configured absolutely equally straight from box. – Андрей Серегин Jul 18 '19 at 13:45
  • Then the old PC might be incapable of powering down by software control, causing fallback to classic "halt" even with no modifications to `/etc/default/halt` configuration file. Maybe it has all its power management features disabled in BIOS, which might disable software power control too. On the new PC, you seem to be getting the default halt behavior of old Debian: "power down if possible, unless specifically configured not to." – telcoM Jul 18 '19 at 14:10