[mythtv-users] HOW TO: Early boot backend server from frontend

John Veness John.Veness.myth at pelago.org.uk
Tue Mar 25 10:23:05 UTC 2008


Bill wrote:
> Reposting this with a different title and some new info.
> 
> I've come up with a way to send a WOL packet to my master backend server 
> almost immediately after the frontend boots.  This gains about 15-20 seconds 
> on the backend boot time, compared to using an init.d script to wake the 
> server.   This way the frontend and server boot together, and the frontend 
> does not have to wait long for the backend to be up and running.
> 
> I use gpxe on a USB key modified to send a WOL packet.  The frontend first 
> boots gpxe off the USB key, then continues a normal boot from the harddrive. 
> Normally gxpe will try to boot off the network, but I disable this portion 
> of the code and use it strictly for sending the WOL packet to the backend.
> 
> The wol code is now available on contrib/wakeonlan of the gpxe code base 
> (http://www.etherboot.org/wiki/download).  The file wol.c needs to be put in 
> src/util and wol.h in src/include/usr.  The make scripts will automatically 
> generate the rules to build wol.c.  I can post my main.c, but essentially I 
> comment out the code that calls shell() and autoboot() and then add a call 
> to wakeup_server with the mac address as the parameter.
> 
> I've only tested the code with the e1000 driver, but it is generic and 
> should work with other drivers.
> 
> Note that gxpe has a limited set of ethernet drivers, and you may want to 
> check if your ethernet chip is supported first.  If your using the e1000 
> driver, there are a few bugs when using it with a 82573 (and likely with 
> many other intel chips) that I have posted a fix to the etherboot mailing 
> list, but can also send that to those in need.
> 
>   Bill

Nice. How long does the gpxe bit of the bootup take?

Is there any way to stick this on the hard disk (maybe on a different 
partition and some kind of boot manager), rather than needing a USB drive?

Cheers,

John

-- 
John Veness, MythTV user, UK, DVB-T


More information about the mythtv-users mailing list