Command line vs. web UI reboot

I just had a strange experience.

I was logged in with a root shell, made some configuration changes, then thought I'd save time by not browsing (see my name, lol) and just rebooted from the command line with something like

shutdown -r +1 &

My node went offline, and didn't come back. When I connected through Lish, I was in the initramfs busybox shell, and attempts to continue booting were answered by a message that /dev/sda (ie. my root partition) didn't exist.

I gave up, opened the web UI, and pushed the Reboot button. This time my node came up perfectly.

Are we not supposed to use the command line to reboot?

5 Replies

Try sudo reboot instead. The UI reboots response is usually faster.

@LouWestin writes:

Try sudo reboot instead. The UI reboots response is usually faster.

reboot and shutdown -r are equivalent. From reboot(8):

Otherwise this simply invokes the shutdown(8) tool with the appropriate arguments.

The delay is caused by the +1 in the OPs original command. From shutdown(8):

TIME may have different formats, the most common is simply the word 'now' which will bring the system down immediately. Other valid formats are +m, where m is the number of minutes to wait until shutting down and hh:mm which specifies the time on the 24hr clock.

These days, systemd(8) handles all the system startup/shutdown logic:

https://www.systutorials.com/docs/linux/man/8-systemd-reboot/

My suspicion is that systemd(8) brought your system to the run level just before mount the system disc and quit (for whatever reason)… This is probably systemd(8) bug # 673542903156324 😉

See: https://www.liquidweb.com/kb/linux-runlevels-explained/ for an explanation of systemd(8)'s "new, improved" run levels. "More logical" indeed…

-- sw

@stevewi I wish I could blame it on systemd :) But in fact this is a system from which it was surgically removed some time ago, and even if I'm OK to go with the flow now I'm too lazy to undo that.

BTW, is systemd the init process even within the initramfs? I didn't know that.

is systemd the init process even within the initramfs?

I believe so…but I don't know for sure. After the system boots, control is typically handed to init…now systemd…to take your system to whatever it's idea of run level 3 (multi-user) or 5 (multi-user with X Windows) is.

This may be helpful:

https://freedesktop.org/wiki/Software/systemd/Debugging/

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct