Download a copy of gPXE, formally known as "Etherboot," by your favorite method.
# git clone git://git.etherboot.org/scm/gpxe.git
Of course you could always download an official snapshot release from http://kernel.org/pub/software/utils/boot/gpxe/.
gPXE does have precompiled rom images available at http://rom-o-matic.net/ but for what we're doing that won't work. We actually need to compile our image to be able to embed our payload.
Using http://www.etherboot.org/wiki/scripting as a guide we can go ahead and embed our image and create a bootable image from any of the formats supported by gPXE.
Creating a Boot Script
With your favorite text editor create a file that contains valid gPXE scripting code using this reference, http://www.etherboot.org/wiki/commandline. Here is an example of mine
#!gpxe
# Load elver image
imgload elver
imgexec elver
Then I'm able to package everything up together by executing
# make EMBEDDED_IMAGE=../../barrelfish.gpxe,../../elver,../../cpu
Please note that you should not use the same paths as I have, these are specific to my application.
Now if you look in the src/bin directory of the gPXE source folder then there should be a new and shiny iso image, as well as like 5 or 6 other image formatted, file. The gPXE make file takes care of executing genisoimage (mkisofs) for you.
If you wanted to accomplish something similar with grub the final command to make the iso image might look something like,
# genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o bootGRUB.iso grubiso
Comments
Post new comment