`shutdown -r now` command completely shutting down instead of restarting
9,679
Restart using init
:
sudo init 6
The init 6
command gracefully reboots the system running all the K*
shutdown scripts first, before rebooting. The reboot
command does a very quick reboot. It doesn’t execute any kill scripts, but just unmounts filesystems and restarts the system.
Related videos on Youtube
Author by
green
Updated on September 18, 2022Comments
-
green over 1 year
Hi we've just installed Ubuntu 12.04 LTS onto a new server. It's on a SuperMicro X9SCA-f Motherboard .
Now we're aiming to locate this in a remote server room - however when we execute a
shutdown -r now
the system completly shuts down and has to be restarted using the power button!! I cant find any BIOS setting that seems applicable.Any help/pointers greatly appreciated.
-
Admin over 11 yearsHave you tried "reboot" ?
-
Admin over 11 yearsBehaviour of shutdown is a setting in Ubuntu not in BIOS.
-
Admin over 11 yearsAs a workaround tour could just use 'sudo reboot'.
-
Admin over 11 yearsreboot does exactly the same :-(
-
Admin over 11 yearsWhile this is not a duplicate but the opposite from why-cant-i-restart-shutdown the answers there might provide a clue for you too.
-
Admin about 11 yearsI am really curious to know Why 'shutdown -r' doesn't reboot the server !! Can anyone tell us why ?
-
Admin almost 11 yearsThe only thing I could think of is that perhaps there's something reinterpreting your command and adding some extra switches? As in, an alias in a ~/.bash_profile or ~/.bashrc file?
-
Admin almost 11 yearsSomething is going on here, it looks like halt is being called instead of reboot. Please use strace to log all the actors on behalf of shutdown. <pre> strace -f /sbin/shutdown -r > /root/shutdown-trace.out 2>&1 </pre>
-
-
Eliah Kagan about 11 yearsThis is incorrect.
reboot
is only more abrupt thaninit 6
orshutdown -r now
if you usereboot --force
(or equivalentlyreboot -f
). Normal operation ofreboot
(when run simply withsudo reboot
) is to invokeshutdown
, which in turn invokesinit
to change the runlevel. Seeman 8 reboot
andman 8 shutdown
for details. In other words, it is simply false to say thatK*
scripts are not run when rebooting withsudo reboot
. They are.