Re: technical explanation of process

65 views
Skip to first unread message

Josh Boon

unread,
Oct 19, 2011, 2:58:58 PM10/19/11
to netbootm...@googlegroups.com
Basically netboot.me is a web frontend to a gpxe backend.  

gPXE can request anything you want and let the CPU load it.  A basic setup can be had with just apache, syslinux, and manually written config files. You'll script gPXE to boot to this server and pull down its menu which will then load syslinux and its config file.  The config file will have the options you specify and then you select it and syslinux the requests the final gPXE script and boots it.  It looks like this:

intial gPXE script for rom-o-matic

#!gpxe
dhcp net0

contents of menu.gpxe 

#!gpxe
#This file loads vesamenu.c32 (graphical syslinux) and menu.cfg (syslinux config) from the root of the web server
chain vesamenu.c32 menu.cfg

You'll need to work out a syslinux menu.cfg that works for you with an excerpt from mine which setups a mandriva installer option relative to the root of your web server.  The kernel is the final gPXE boot script which actually then boots the tool or distro you were interested in.  

label 0.0.0
		menu label Ubuntu Installer
        text help
Ubuntu Network installer
        endtext
        kernel /netboot/1/boot.gpxe
Contents of /netboot/1/boot.gpxe

#!gpxe 
imgfree 
kernel -n img http://someserver.com/dists/lucid/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux expert locale=en_US.UTF-8 debian-installer/keymap=us preseed/url=http://someserver.com/netboot/files/jeos.seed
initrd -n img http://someserver.com/dists/lucid/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz 
boot img

You'll notice I also passed kernel arguments which is quite useful when your netbooting really takes off.  


That's the layout of static configuration done by hand.  If your tools don't change often it works well but if you have a dynamic tool set or would like to allow multiple users their own configs you'll need to write up something to handle this dynamically.   I wrote mine using Django but you're welcome to use whatever you fancy.  Feel free to ask any other questions you need.


Best,
Josh

On Tue, Oct 18, 2011 at 12:57, PiousMinion <clayton....@gmail.com> wrote:
I'm trying to recreate netboot.me for my own (personal) uses with the
distros and tools that I prefer. I've come a bit far and can boot an
image over the internet from my remote server.

One thing I can't figure out though, is how netboot.me is using a
menu.  From what I understand the boot process goes something like
this:
(usb/floppy/etc) -> mbr -> gpxe(loads '1' file from remote) ->
executes that one file.

From what I understand about menus with grub or syslinux, is that they
need multiple files. i.e. bootloader, menu executable, and config.

Also, gPXE supports HTTP URLs, and afaik, no other bootloaders do
which means using a URL in a menu wouldn't work.  Yet, it works in
netboot.me somehow.


Can anyone clarify this process?

Reply all
Reply to author
Forward
0 new messages