This page explains how to enable use Wake-on-LAN in systems which have Ubuntu installed.
In order to use WoL to power on a system which has Ubuntu installed, WoL should be enabled both in the BIOS and in the NIC.
To enable WoL in the BIOS, enter the BIOS setup and look for something called "Wake up on PCI event", "Wake up on LAN" or similar.
WoL in the NIC
Determining whether the NIC supports WoL
First, determine which NIC will be used, and then check whether it supports the MagicPacket(tm) using
sudo ethtool <NIC>
and look for
Supports Wake-on: <letters>
If one of the letters is g, that means that the NIC should support the WoL MagicPacket(tm) method (for the other letters look at man ethtool).
Enabling WoL in the NIC
To check whether WoL is enabled in the NIC, one could use
sudo ethtool <NIC>
and look for
Wake-on: <letters>
If one of the letters is g and not d, then one should be able to power on the system (after it has been powered off) using the WoL MagicPacket(tm).
If the letter is d, however, one must issue something like
sudo ethtool -s <NIC> wol g
On most systems, issuing this command would be required after each boot. If the system's networking is configured via ifupdown, then it would be easy to add the line up ethtool -s <NIC> wol g below the interface's configuration stanza. For example:
shahar@shahar-backup:~$ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 10.0.0.1 netmask 255.255.255.0 gateway 10.0.0.138 up ethtool -s eth0 wol g
This will ensure that WoL is enabled in the NIC on each boot. Fore more information see man interfaces.
Test it
One can test WoL by powering off the system and trying to send it the magic packet using:
Command-line tools
GTK+ tool
Configure other operating systems
If the system dual-boots with other operating systems, they should be configured to also enable or, at least, not disable WoL in the NIC. This is beyond the scope of this document but here's a starting point for Microsoft's OS's.