Scheduling a reboot
echo "reboot" | at 06:00
However, whenever I use "reboot" or "shutdown -r 0", my Linode just shuts down, doesn't reboot, and I have to boot it manually from the Linode manager. Is this normal? How can I get my Linode to boot back up automatically?
I'm running Ubuntu 10.10
10 Replies
shutdown -r 06:00
or:
shutdown -r +60 # to do it 60 minutes from now
And an optional message:
shutdown -r 06:00 "Reticulating splines"
If you have folks that use the shell, it will give them reminders that it is going down, and it will also prevent logins during the final 5 minutes.
(Lassie still applies, however
Why do you need to reboot nightly? Are you sure you need to reboot? You may be doing something that you think needs a reboot but which can actually be done without reboots.
@Guspaz:
Why do you need to reboot nightly? Are you sure you need to reboot? You may be doing something that you think needs a reboot but which can actually be done without reboots.
@plasticboy:When my Linode needs a reboot due to, say, a kernel upgrade, I'd like to be able to schedule that to happen at a convenient time.
Don't know how I missed that. There's also ksplice, which will get you kernel updates without rebooting. There's another thread somewhere around here about a guy who set it up on his linode. It does mean switching away from Linode's kernel, though.
If you want a reboot, you can use the "reboot" command in Lish, which signals your init to do a graceful reboot just like the in-system "reboot" command does and restarts the Linode afterwards, or make sure you have Lassie enabled, and accept a bit longer delay before the system coming back up.
Lassie re-starts a Linode that has been powered off "from the inside" (as opposed to LISH or the manager interface), but it does it after a few minutes of delay.
PS. I heard you could use Linode API to issue a reboot command in an unattended way, but I don't know the details.
curl
I haven't tested this.
EDIT: or, of course, you can "ssh linode${LINODEID}@${LINODEHOST}.linode.com reboot", but that requires knowledge of the Linode host server and pre-negotiated credentials.