aMIGA_dUDE
Posts: 19
Joined: Sat Sep 08, 2012 3:51 pm

RPi4 shutdown -r not restarting up

Sat Feb 08, 2020 11:42 pm

I have RPi4 4GB using buster (2020-02-05) using all current updates. I have flash SD from new using the
Raspbian Buster with desktop and recommended software image and just updating everything.

If use sudo shutdown -r now well the RPi4 will shutdown but seam not to restart, the is no (HDMI) rainbow connection screen/no 4 raspberrys etc, no display.

I haven't check to see if over my network if has rebooted up there.

If use sudo reboot all is fine. there is a (HDMI) rainbow connection.

https://www.youtube.com/watch?v=WS3Lkc6Gzlk

PS I had to edit it becuase I stated wrong version of buster I put down 2019-09-26 when should stated 2020-02-05
Last edited by aMIGA_dUDE on Sat Feb 08, 2020 11:56 pm, edited 1 time in total.

GlowInTheDark
Posts: 390
Joined: Sat Nov 09, 2019 12:14 pm

Re: RPi4 shutdown -r not restarting up

Sat Feb 08, 2020 11:49 pm

Well, the obvious question is: Why does it matter? Just use what works (e.g., "reboot", or 'init 6")

There is probably a reason why shutdown isn't working - but does it really matter? Is it worth the effort to figure it out? Note: This isn't facetious; there might actually be a reason why it does matter.

FWIW, I never liked "shutdown" and have never used it (on Unix/Linux). I just use "reboot".

BTW, does "init 6" still work in the age of systemd? I haven't tried it in quite some time...
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

transmitterdan
Posts: 5
Joined: Sun Sep 10, 2017 11:57 pm

Re: RPi4 shutdown -r not restarting up

Sat Feb 08, 2020 11:54 pm

Try:

sudo shutdown now --reboot

It works on my Pi 4.

aMIGA_dUDE
Posts: 19
Joined: Sat Sep 08, 2012 3:51 pm

Re: RPi4 shutdown -r not restarting up

Sun Feb 09, 2020 12:10 am

init 6 works
reboot works
sudo shutdown now --reboot works

also this very strange
shutdown now --reboot works

sudo shutdown -r now not working.
shutdown -r now works.



You don't need superuser(root) status, I am using normal pi user (unless that now is a superuser) that a little worrying if that is so

GlowInTheDark
Posts: 390
Joined: Sat Nov 09, 2019 12:14 pm

Re: RPi4 shutdown -r not restarting up

Sun Feb 09, 2020 1:06 am

I, too, find it strange that you can do it without becoming root. I wonder if it is keyed to some group that pi is a member of. Anyway, shutdown is now a link to /bin/systemctl, but note that systemctl is not setuid root. Maybe systemctl sends a message to some other process that is setuid root and that process does the work? The point is that everything is different now, in the age of systemd.

Also, I'm thinking the reason that you're having trouble with something like:

sudo shutdown -r

but it works without the sudo - is because sudo is trying to parse the -r. This is a side-effect of GNU getopt, which parses args anywhere on the command line. This would explain why --reboot works, but -r doesn't. The fix would be to do something like:

sudu -- shutdown -r

P.S. I just checked and reboot is also a link to systemctl. Bizarre world we live in...
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

klricks
Posts: 6860
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: RPi4 shutdown -r not restarting up

Sun Feb 09, 2020 3:20 am

GlowInTheDark wrote:
Sun Feb 09, 2020 1:06 am
I, too, find it strange that you can do it without becoming root. ......
The ability to shutdown without sudo is not new in Raspbian Desktop. Been that way for years........
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

GlowInTheDark
Posts: 390
Joined: Sat Nov 09, 2019 12:14 pm

Re: RPi4 shutdown -r not restarting up

Sun Feb 09, 2020 6:44 am

klricks wrote:
Sun Feb 09, 2020 3:20 am
GlowInTheDark wrote:
Sun Feb 09, 2020 1:06 am
I, too, find it strange that you can do it without becoming root. ......
The ability to shutdown without sudo is not new in Raspbian Desktop. Been that way for years........
Since you mention "Desktop", I assume you are referring to doing it via the menu (clicking). Presumably, clicking invokes some setuid program to do the shutdown.

You are right, but that's not the point. We are talking about the command line here.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

klricks
Posts: 6860
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: RPi4 shutdown -r not restarting up

Sun Feb 09, 2020 2:45 pm

GlowInTheDark wrote:
Sun Feb 09, 2020 6:44 am
klricks wrote:
Sun Feb 09, 2020 3:20 am
GlowInTheDark wrote:
Sun Feb 09, 2020 1:06 am
I, too, find it strange that you can do it without becoming root. ......
The ability to shutdown without sudo is not new in Raspbian Desktop. Been that way for years........
Since you mention "Desktop", I assume you are referring to doing it via the menu (clicking). Presumably, clicking invokes some setuid program to do the shutdown.

You are right, but that's not the point. We are talking about the command line here.
NO!
I am talking about shutdown -r now from the LXTerminal command prompt and also with desktop version when booted to CLI.
If I remember correctly someone said sudo was still required on shutdown commands when using Raspbian Lite but I haven't tried it myself.

From release notes: http://downloads.raspberrypi.org/raspbi ... _notes.txt
2016-05-27:
* Removed sudo from shutdown options
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

GlowInTheDark
Posts: 390
Joined: Sat Nov 09, 2019 12:14 pm

Re: RPi4 shutdown -r not restarting up

Sun Feb 09, 2020 4:49 pm

I'm assuming it has nothing to do with dates or operating systems or anything RPF has done.

Rather, it seems to be tied to the move to systemd - where, as I said, now everything is different, in the age of systemd.

I did some testing (on a system running Jessie) and when I do "reboot" from the command line as user pi, it gives me a rather long message saying that I can't reboot because other users (e.g., root) are currently logged in. It gives various suggestions, but TLDR is nothing works (presumably, unless/until I log out the root logins I have running).

You can do your own testing and verify this if you like.

I realize that most users won't have root logins going, so it, presumably, would "just work" for most people, most of the time.

I rarely use the GUI/clicky shutdown thingie, but I'm guessing that would fail if you have non-pi users (e.g.., root) logged in. I'm assuming this because you say that, according to the RPF notes, they removed "sudo".

Anyway, I just always use root/sudo when I want to reboot. Seems better/safer/most-reliable.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

carver1
Posts: 6
Joined: Sun Feb 09, 2020 11:23 pm

Re: RPi4 shutdown -r not restarting up

Mon Feb 10, 2020 11:35 am

Many thanks to the op for posting this.
I thought I was losing my mind when a script I routinely use on my Raspberry Pi 4 (running Raspbian Desktop with latest updates via sudo apt update && sudo apt full-upgrade -y) that I'm running headless via SSH all of a sudden would only end with a shutdown (solid red status & no error messages in $ dmesg output) instead of a full restart.

The script that's run as root/sudo contains the same commands to restart as the op started experiencing shutdowns-only with

Code: Select all

sudo shutdown -r now
at some point after installing the latest standard updates on his rpi4.

When I change the restart command in the script to

Code: Select all

sudo reboot
, the rpi4 promptly fully reboots as normal.

hippy
Posts: 6863
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: RPi4 shutdown -r not restarting up

Mon Feb 10, 2020 2:09 pm

aMIGA_dUDE wrote:
Sat Feb 08, 2020 11:42 pm
If use sudo shutdown -r now well the RPi4 will shutdown but seam not to restart
It works for me and my Pi 3B (non-plus) under Buster.

The plethora of ''reboot', 'shutdown', 'poweroff' and 'halt' commands have always confused me so I just stick with "sudo reboot" and "sudo shutdown -h now" and have had no issues.

MagPi 88 specifies 'sudo shutdown -r now' for restarting a Pi ( page 73 ) though includes an erroneous space between the minus and 'r' to catch the noobs out.

And, regarding 'sudo'; both 'reboot' and 'shutdown -r now' work for me from a Terminal under the Desktop, but neither work without when connected over Telnet -

Code: Select all

[email protected]:~ $ reboot
Failed to set wall message, ignoring: Interactive authentication required.
Failed to reboot system via logind: Interactive authentication required.
Failed to open initctl fifo: Permission denied
Failed to talk to init daemon.
[email protected]:~ $ shutdown -r now
Failed to set wall message, ignoring: Interactive authentication required.
... same ...
That's understandable. It just means I have got into the habit of always using 'sudo'.

dennisdunbar
Posts: 24
Joined: Sun Aug 26, 2012 9:56 am
Location: Washington, DC

Re: RPi4 shutdown -r not restarting up

Mon Feb 10, 2020 4:46 pm

I have a RPi4 4GB running Raspbian 2020-2-5 with all updates.
When I command reboot from the desktop it shuts down but does not reboot.
I have to power cycle it.
Ideas?
Many many many RPi, RPi B, RPi 3, RPi B+, RPi 3 B+, RPi4, Zero and ZeroW. I use these t run 20 websites, Word Press, FreePBX, PiAware, PrivateEyePi.

carver1
Posts: 6
Joined: Sun Feb 09, 2020 11:23 pm

Re: RPi4 shutdown -r not restarting up

Mon Feb 10, 2020 8:54 pm

dennisdunbar wrote:
Mon Feb 10, 2020 4:46 pm
I have a RPi4 4GB running Raspbian 2020-2-5 with all updates.
When I command reboot from the desktop it shuts down but does not reboot.
I have to power cycle it.
Ideas?
If you don't mind me asking, I'm curious to know:
--When you rebooted, did you use 'sudo reboot' or just 'reboot' ?
--Were you typing into a terminal on an keyboard directly attached to your RPi4, or have you been experiencing this over SSH, VNC, etc?
—Raspbian Desktop or Raspbian Lite?


It looks like both this latest 2020-02-05 version of Raspbian, and some of the apt updates leading up to its release has made a lot of people's RPi 4's unstable and unpredictable.

See RonR's advice in his reply to me at the following link, in case you'd like to try that, as so far it that's the only reasonably potentially effective stop-gap solution to at least some of the problems. (Probably best to backup any data you don't want to risk losing first.)

https://www.raspberrypi.org/forums/view ... 5#p1609681

dennisdunbar
Posts: 24
Joined: Sun Aug 26, 2012 9:56 am
Location: Washington, DC

Re: RPi4 shutdown -r not restarting up

Tue Feb 11, 2020 5:39 am

If you don't mind me asking, I'm curious to know:
--When you rebooted, did you use 'sudo reboot' or just 'reboot' ?

I use the drop down button under the Raspberry in "Shutdown Options" It sometimes comes back up but generally requires power cycle.
I have also had the same experience when using "sudo reboot" from terminal.

--Were you typing into a terminal on an keyboard directly attached to your RPi4, or have you been experiencing this over SSH, VNC, etc?
Click button with mouse.

—Raspbian Desktop or Raspbian Lite?
Raspbian Buster with desktop and recommended software. Removed Office, games, Wolram, Mathetica, Education.
Added Conky, Audacity, and Webmin.

Running headless but via local RealVNC.
Many many many RPi, RPi B, RPi 3, RPi B+, RPi 3 B+, RPi4, Zero and ZeroW. I use these t run 20 websites, Word Press, FreePBX, PiAware, PrivateEyePi.

GlowInTheDark
Posts: 390
Joined: Sat Nov 09, 2019 12:14 pm

Re: RPi4 shutdown -r not restarting up

Tue Feb 11, 2020 10:08 am

It sounds like there may actually be something here. People have reported all sorts of problems since the latest Buster updating (it seems to be busting a lot of things, so to speak...)

We've been treating this as the usual sort of educational problem, but it sounds now like there may actually be something to it.

Note that I have not updated in a while - and it sounds like I'll be avoiding it until the bugs are out.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

LTolledo
Posts: 2861
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: RPi4 shutdown -r not restarting up

Tue Feb 11, 2020 10:58 am

I've just setup another NAS last sunday Feb 9, using the latest image of Raspbian Buster Lite 2020-02-05 downloaded from the Raspberry Pi Download page, updated and upgraded, then installed samba and minidlna.

right now its powered so I tried the following
sudo reboot
sudo init 6
sudo shutdown -r now

every time it rebooted properly....

I did noticed that the boot-up time was taking so long so I edited /etc/fstab and changed the last digit from "2" to "0" on my two mounted HDDs.
upon the change... it booted faster.

updated and upgraded just now (while writing this post)
then tried the 3 above
it reboots normally every time....

is there something wrong with my setup? :shock: that am not having the same problems as the others that have been posting here? :o

Add:

Code: Select all

[email protected]:~ $ sudo reboot
Connection to 192.168.111.90 closed by remote host.
Connection to 192.168.111.90 closed.
[email protected]:~ $ ssh [email protected]
[email protected]'s password: 
Linux RPi4B-2GHWRaid 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 11 10:44:13 2020 from 192.168.111.233

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

[email protected]:~ $ sudo init 6
Connection to 192.168.111.90 closed by remote host.
Connection to 192.168.111.90 closed.
[email protected]:~ $ ssh [email protected]
[email protected]'s password: 
Linux RPi4B-2GHWRaid 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 11 10:54:01 2020 from 192.168.111.233

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

[email protected]:~ $ sudo shutdown -r now
Connection to 192.168.111.90 closed by remote host.
Connection to 192.168.111.90 closed.
[email protected]:~ $ ssh [email protected]
[email protected]'s password: 
Linux RPi4B-2GHWRaid 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 11 10:55:59 2020 from 192.168.111.233

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

[email protected]:~ $ 
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

dennisdunbar
Posts: 24
Joined: Sun Aug 26, 2012 9:56 am
Location: Washington, DC

Re: RPi4 shutdown -r not restarting up

Wed Feb 12, 2020 2:18 pm

After running:

https://www.raspberrypi.org/forums/view ... 5#p1609681
I have not experienced this again.
Many many many RPi, RPi B, RPi 3, RPi B+, RPi 3 B+, RPi4, Zero and ZeroW. I use these t run 20 websites, Word Press, FreePBX, PiAware, PrivateEyePi.

Return to “Raspbian”