Wake On LAN
It is really easy to leave your workstation powered off and turn it on remotely as needed. All you need is:
Your ethernet card and workstation to support it. Run ethtool eth0. The output should contain the lines:
Supports Wake-on: g Wake-on: g
This indicates that wake on LAN will work with a MagicPacket. You may need to modify your initscripts to set this. For example on RH/Fedora edit/etc/sysconfig/network-scripts/ifcfg-eth0 and add
ETHTOOL_OPTS="wol g"
Take note of your MAC address: ip link.
Shut down your machine from Linux. Some BIOSes will only power on from the ACPI S5 state which is set when the OS shuts down. Powering off the machine (e.g. from the BIOS or outside the OS) will not set the ACPI state to S5.
Simply run:
ether-wake YOUR_MAC_ADDRESS
from another machine. Voila!
Trouble shooting
- Try pulling out the power cord to reset any card state
Upgrade to the latest kernel, or [http://fedoraproject.org/wiki/Docs/CustomKernel recompile] your kernel to have the latest ethernet driver
Ensure that your when shutdown scripts call halt that it is not called with the -i flag
You may need to change your shutdown scripts to enable Wake On Lan just before power off. For RH/Fedora you could make an executable /sbin/halt.local with contents of:
echo "Running local halt script" ifconfig eth0 up ethtool -s eth0 wol g ethtool eth0 | grep -i wake sleep 5
For an older BIOS you may need to boot with acpi=force
