PXE Dispatcher for iPXE
|
2011-04-05, 18:10
(This post was last modified: 2011-04-05 18:16 by robinsmidsrod.)
Post: #1
|
|||
|
|||
PXE Dispatcher for iPXE
I have created a simple Perl-based script which can be hooked into any web server that supports a standard CGI interface.
You can find the code at: http://github.com/robinsmidsrod/pxe-dispatcher What I usually do is to symlink this script in the root of my TFTP root (/srv/tftp/ on Ubuntu, which I use) and then I share out that folder as a Samba share (so I can edit the files from a Windows desktop machine). At the end I create a symlink in /var/www/tftp that points to /srv/tftp. This way I can easily boot from either TFTP or HTTP with the same files. If I create /srv/tftp/pxeboot/default.pxe, this script will automatically be executed by iPXE on boot. If default.pxe doesn't exist, pxelinux.0 is booted if it exists. pxelinux.0 should be installed alongside pxeboot.cgi. The more interesting part of the script is the part that allows you to create custom boot scripts by MAC of the client. They should be named something like /srv/tftp/pxeboot/0025b35fd52f.pxe. The content of the file is just a normal iPXE script. My laptop has a boot script file which contains the following code: Code: #!ipxe And for that to work I have a separate file named /srv/tftp/pxeboot/freedos.pxe with the following code in it: Code: #!ipxe This enables me to boot FreeDOS on my laptop entirely from an iSCSI target. Another script I have is named ubuntu-install.pxe and it contains the following code: Code: #!ipxe For booting Ubuntu, I just use a script similar to the FreeDOS variant, just with the strings "freedos" replaced with "ubuntu". Hope some of you will find it useful, and I would love if any of you have any ideas for improvements. If you make any improvements, do send me a pull request on GitHub. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
PXE Dispatcher for iPXE - robinsmidsrod - 2011-04-05 18:10
RE: PXE Dispatcher for iPXE - mcb30 - 2011-04-05, 18:24
RE: PXE Dispatcher for iPXE - robinsmidsrod - 2011-04-05, 18:34
RE: PXE Dispatcher for iPXE - mcb30 - 2011-04-05, 20:22
RE: PXE Dispatcher for iPXE - robinsmidsrod - 2011-04-05, 22:51
RE: PXE Dispatcher for iPXE - mcb30 - 2011-04-06, 00:01
RE: PXE Dispatcher for iPXE - Sha0 - 2011-08-08, 15:46
RE: PXE Dispatcher for iPXE - robinsmidsrod - 2011-08-08, 16:10
RE: PXE Dispatcher for iPXE - mymycracra - 2011-10-14, 11:14
RE: PXE Dispatcher for iPXE - robinsmidsrod - 2011-10-14, 11:36
|
User(s) browsing this thread: 1 Guest(s)