this post was submitted on 07 Apr 2025
16 points (100.0% liked)

Linux

6891 readers
448 users here now

A community for everything relating to the GNU/Linux operating system

Also check out:

Original icon base courtesy of [email protected] and The GIMP

founded 2 years ago
MODERATORS
 

I am having issues with my linux machine running openSUSE MicroOS. It runs fine but I can't power it off via SSH. I tried shutdown, poweroff and halt but no command turned the machine off. I then have to physically push the power button but I don't feel comfortable doing that too often because I might interrupt some processes which are still running? Is there something I could still try or something I did wrong?

top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 3 days ago (1 children)

Did you use any arguments with shutdown? Does shutdown spin down the system, but not turn off the hardware, or does it not do anything? You can try " shutdown now -h". That should halt the system after a graceful shutdown.

[–] [email protected] 3 points 3 days ago (1 children)

I tried that now. It's still running but I can't access it via SSH.

[–] [email protected] 4 points 3 days ago (1 children)

Sounds like that shutdown the system, so the problem is just getting it to power off. You could try "halt -p”. That explicitly calls for the system to power off. If that doesn't work, perhaps try "halt -verbose", which will give a bunch of info on the next boot about what halt was doing, might show an error there that could you lead you in the right direction.

[–] [email protected] 1 points 3 days ago (1 children)

Will that show the info only when I connect a screen directly to the machine? Or also when I log into it with SSH the first time after the reboot?

[–] [email protected] 1 points 2 days ago

I would think it should be in the boot log, but I am unsure on that one.

[–] [email protected] 6 points 3 days ago* (last edited 3 days ago) (2 children)

SystemCTL systems need to use: "systemctl shutdown".

Not sure if openSUSE uses it.

[–] [email protected] 6 points 3 days ago

poweroff or shutdown will work on almost every distro. Even systemd ones (they are usually symlinks but doesn't really matter because they work).

[–] [email protected] 1 points 3 days ago

@doomsdayrs @theorangeninja Not entirely correct, most will have shutdown scripts that call systemd, but that is a direct way to accomplish it.

[–] [email protected] 4 points 2 days ago (1 children)

Can you power it off from the command line without SSH? You may have a hardware problem that's keeping the board from responding to soft poweroff at all.

Provided the machine isn't writing to disk or holding unwritten data in a disk cache at the moment you press the button, you're unlikely to damage anything with a hard poweroff.

[–] [email protected] 1 points 1 day ago

I hooked up a screen and keyboard but I couldn't even login using the TTY (I didn't install a DE). Maybe I fucked up when setting the machine up.

Good to know that at least I am not damaging anything. I should be more than safe if I halt the system and the do a hard poweroff.

[–] [email protected] 1 points 2 days ago* (last edited 2 days ago)

Running poweroff is one of the correct ways on anything Systemd (details). If that doesn't work then something is broken.

If you haven't done so already try looking into the journal. sudo journalctl -b -1 -e will take you to the end of the log for the last boot.

[–] [email protected] -1 points 3 days ago

This might sound stupid but before logging into SSH, open XTERM first and give the commands through it. On the other hand, be sure that the user you logged into it has sudo privileges on your MicroOS machine.