[gPXE] executing in memory gpxe script
Brandon Penglase
bpenglase-gpxe at Spaceservices.net
Tue Jul 26 07:27:27 EDT 2011
If you are building via Rom-O-Matic, you'll need to hit Customize and
enter your script in the very bottom box.
I suggest you read over the Scripting wiki
(http://etherboot.org/wiki/scripting) if you haven't already. I think
the one thing you are missing is the shebang, #!gpxe.
I have my scripts bounce around a bit, but basically the one that gets
embedded into gPXE at build time is this:
#!gpxe
set use-cached 1
dhcp net0
chain https://netboot1.domain.edu/boot.asp?MAC=${net0/mac}&plembed=1&cs=1
It will run this, hit the web server with that file, and pass on it's
MAC address, that it has pxelinux embedded, and that it's part of the
computing services netboot. The boot.asp script then points it to the
correct files to use based on those parameters.
Hope this helps!
Brandon Penglase
On Mon, 25 Jul 2011 22:39:44 -0700
Larry Brigman <larry.brigman at gmail.com> wrote:
> I'm trying to use gpxe for a process that need to boot an ISO image to
> upgrade systems.
> The systems are scattered all over the world and don't have an
> internet connection.
> For the most part I have remote access to these machines with remote
> consoles.
>
> I would like to be able to use grub to load gpxe pointing to the
> script that got
> loaded into memory by grub as it's initrd file.
>
> Since these machines all have different addresses and the networks
> that the machines
> are on don't have DHCP, I need to code the static IP and the static
> web server addresses
> in during the install of gpxe.
>
> So how do I get gpxe to execute a script that is in memory or
> append a new script to gpxe without the full source.
>
> Here is the things I have tried.
> Grub entry.
> title gpxe network boot
> root (hd0,0)
> kernel /gpxe.lkrn
> initrd /config.gpxe
>
> Tries:
> rom-o-matic without any options
> Same as above but move the /config.gpxe to kernel line
> rom-o-matic with single line script "imgexec" leaving the initrd line
> in grub
>
> None of these work. I can and have gotten gpxe to boot via network
> but I don't
> have that option in the field where I have to upgrade the machines.
>
> My google searching found one promising post about a patch but it
> seems that patch
> didn't make it into the code.
> http://markmail.org/message/mbd2ettqly5btb7v#query:launch%20gpxe%20from%20grub+page:1+mid:tcxo6klsz7rqyind+state:results
More information about the gPXE
mailing list