Wake-on-Lan
I installed in the living room small PC I use to listen to the music and watch movies.
As it is really a small machine which fits in the rack together with the amplifier and the DVD-Player, it has as just a small 2.5'' HD with 200GB of space. Recently the space was running out, so I set up the big PC in the "office" to be a fileserver hosting all the video file that were before stored in the small PC (the two PCs are connected through LAN and I share the files using NFS).
The problem is that I often forgot to first switch on the server, so I wondered how I could do make it power-on automatically each time I started the small PC. The answer is Wake-on-Lan and this is a fast description of how it has to be setup.
- Power on the server and check in its Bios settings that wake-on-lan or Power on by Ring or something similar is enabled.
- After eventually changing and saving the settings boot Linux.
- Issue the command
ethtool ethXwhere ethX is your lan card and check what you see under Wake-on. If there is a "g" it means that the PC will power-on upon receiving a so called "Magic packet", which is fine. If you see other values refer to "man ethtool" and eventually set it withethtool -s ethX wol g - For Gentoo (don't know about other Linux distributions) check that the entry
RC_DOWN_INTERFACEis set to "no" and eventually change it. - Issue the command "ifconfig" and write down the hardware address of your ethX network card. In my case it shows up as
HWaddr 00:12:F0:C5:BF:12, so I make note of 00:12:F0:C5:BF:12. - Issue the usual command "shutdown -h now".
- Now you should be able to wake up your PC by issuing from a client the command
wakeonlan 00:12:F0:C5:BF:12. If this does not work you can eventually try with the commandwol 00:12:F0:C5:BF:12
An automatic power-on can now be easily implemented by a script which pings the remote machine and eventually wakes it up if it cannot be reached.
Based on http://www.vdr-wiki.de/wiki/index.php/WAKE_ON_LAN and http://de.gentoo-wiki.com/Wake_On_Lan.