1) Setup the hardware - older PCI network cards may require a little cable from the card to the motherboard, onboard adaptors don't.
2) Setup the BIOS - enable WOL in the BIOS, usually under the Power->APM screen, may be a separate entry or covered by something like "Allow PCI/PCIe devices to wake the PC"
3) Check the driver supports WOL, as root run
Code: Select all
ethtool eth0
Code: Select all
Supports Wake-on: g
Wake-on: d
Code: Select all
ethtool -s eth0 wol g
4) Stop the kernel from powering off the network card at shutdown. Most distributions call "halt" with the "-i" parameter at the end of the shutdown scripts. That "-i" powers off the network card. Under Ubuntu we can stop this by editing /etc/default/halt as root
Code: Select all
# Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff".
HALT=poweroff
# Enable WOL
NETDOWN=no
5) Find the MAC address of the system by running
Code: Select all
ifconfig eth0
Code: Select all
HWaddr 00:17:31:83:a0:f5
6) Power down the machine and check the lights on the network interface are still on.
7) On the machine that will boot up the other one, install "wakeonlan" e.g.
Code: Select all
sudo apt-get install wakeonlan
You can now do
Code: Select all
wakeonlan 00:17:31:83:a0:f5
Code: Select all
wakeonlan f5:a0:83:31:17:00