[vbox-dev] [PATCH]: Enabling PXE for NAT configurations - MIT LICENCE-

Erwan Velu erwan.velu at free.fr
Fri Feb 16 11:29:19 GMT 2007


This patch allow users to do PXE netbooting when they select NAT 
networking mode.
In NAT mode, we'll use the slirp dhcp & tftpserver, the content of the 
tftpserver will be a "simple user directory" (in my case my home dir).

So this patch fills the filename field of a bootp answer if the dhcp 
client announce to looking at a pxe server.

I did my tests with the famous pxelinux (thx HPA for this tool) but it 
shows that the slirp tftp server didn't allow tsize negociation.
I did a very simple hack to make this working. So the patch adds the 
tsize negociation to the slirp tftp server.

At the end, I did a patch for allowing the configuration of the tftp dir 
and the name of the boot strap.
You can define them by setting the setextradata on

"VBoxInternal/Devices/pcnet/0/LUN#0/Config/bootp_filename" "/pxelinux.0"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/tftpdir" 
"/home/erwan/.VirtualBox/tftpboot/"

This patch is not perfect, I'm not a developper so I may missed a lot of 
things, did some things which doesn't watch your quality process.
I did a Proof-of-concept, it works but may need some improvements to 
make it "ready to use". It may just need a cleanup from experienced VBox 
devs.

As I said in the subject, this contribution is under the MIT licence.

I hope this patch could be integrated from a way or another because it 
provides users a very easy way to do pxe booting without having the 
knowledge of how to setup the dhcp/tftp/bridge stuff.

Regards,
Erwan Velu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbox-pxe-nat.patch
Type: text/x-patch
Size: 13342 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20070216/4cb0d70a/attachment.bin>


More information about the vbox-dev mailing list