Feature #301
Updated by Daniel Curtis almost 11 years ago
The VPS Infrastructure has recently encountered a power outage, and having no UPS backup led to an immediate outage of all web services. Only two machines were online when I arrived at the server space, the router (which is good) and a new unconfigured VPS node. Unfortunately the primary server that receives SSH traffic is web1, a PowerPC server. I found that PowerPC machines have the ability to turn back on when the Power Management Unit is set in the right way. The tool needed is in the @powerpc-utils@ package:
<pre>
sudo apt-get install powerpc-utils
</pre>
> Automatic boot enabled (Server Mode)
The command to set automatically power on after power loss, run:
<pre>
autoboot -v on
</pre>
h2. Boot script to automatically set autoboot
* Create boot script:
<pre>
vi /etc/init.d/autoboot
</pre>
* Add:
<pre>
#! /bin/sh
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
set -e
case "$1" in
start|restart|force-reload|reload)
echo -n "Autoboot..."
/sbin/autoboot -v on
echo
;;
stop)
exit 0
;;
*)
N=/etc/init.d/autoboot
echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
</pre>
* Make the script bootable
<pre>
chmod +x /etc/init.d/autoboot
</pre>
* And the symbolic link in @/etc/rcS.d@:
<pre>
ln -s /etc/init.d/autoboot /etc/rcS.d/S60autoboot
</pre>
h2. Resources
* https://lists.debian.org/debian-powerpc/2006/11/msg00214.html