For WakeOnLan to work, you need the following items:
You will need to enable WOL in the machine's BIOS, and you will need to know the ethernet card's MAC address.
Then, (from another machine) you can use the ether-wake package to send the special ethernet frame. On debian: apt-get -u install etherwake.
Then from the command line, you can do
$ ether-wake <macaddress>
Or you can add an entry to /etc/ethers with macaddress to hostname entries and just do
$ ether-wake <hostname>
(Note that the version of etherwake in Debian Woody doesn't seem to support this)
Some network card drivers seem to disable the WOL ability of a network card. If you can use WOL just after you've booted into Windows, but not at all after you've booted into Linux, this probably applies.
There is a program called ethtool which you can use to fix this. It'll need to be applied every boot, so stick it in rc.local or somewhere.
ethtool eth0 Settings for eth0: Supports Wake-on: g Wake-on: d Link detected: yes
This shows that it supports MagicPacket WakeOnLan (type g), but it is disabled at the moment (Wake-on: d). You can fix this by running
ethtool -s eth0 wol g ethtool eth0 Settings for eth0: Supports Wake-on: g Wake-on: g Link detected: yes
4 pages link to WakeOnLanNotes: