Wake-on-LAN (wol)

On the to-be-woken-up computer make sure to enable ACPI/APM (S3/STR) and Wake-On-Lan(WOL) in the BIOS and add in /etc/network/interfaces:

post-up /usr/sbin/ethtool -s eth0 wol g
post-down /usr/sbin/ethtool -s eth0 wol g

Write down the MAC-ADDRESS. Powerdown the computer. Only when the computer is powered down to S3 or STR(Suspend to ram), the computer can be woken up. A sudden power-failure might mess with everything so the computer might not respond then to WOL requests. For STR some additional action are necessary, because STR in Linux might/will totaly power-off the ethernet device. See this link for more info on that subject.

On another computer install a wake-on-lan package:

dpkg -i wakeonlan

and wake up the sleeping computer:

wakeonlan MAC-ADDRESS

note: create a small shell script in for example ~/bin/wol_dev.sh to make life easier and to not forget the MAC-ADDRESS:

#!/bin/sh
#
# Wake on lan server: dev
#
# dev eth0 00:02:44:57:dc:33
# dev eth1 00:10:4b:0e:ce:13
 
wakeonlan 00:02:44:57:dc:33

That’s all!

Links:

Comments are closed.