create new tag
view all tags

PXE Booting

In engineering we're using PXELINUX to network boot machines in order to build the OS. It turns out that the version of PXELINUX we're using (TODO replace this with the version from the syslinux rpm and see if it still works) supports booting from http targets. This reduces the loading time from about 60s to under 10s.

commit 45be362cf7b4749f644f62c583c4b9f4b0918190
Author: bduncan/eng.admin@EASE.ED.AC.UK <bduncan/eng.admin@EASE.ED.AC.UK@d7b6154b-7022-0410-a36f-deca04b7da91>
Date:   Wed May 30 12:26:48 2018 +0000

    Use http via PXELINUX for SL7.
    git-svn-id: https://lcfg.is.ed.ac.uk/svn/see_policies@6836 d7b6154b-7022-0410-a36f-deca04b7da91

diff --git a/options/pxeserver.h b/options/pxeserver.h
index 1e25293..c49eec6 100644
--- a/options/pxeserver.h
+++ b/options/pxeserver.h
@@ -71,8 +71,8 @@ pxeserver.initrd_sl6_64       lcfg64/initram.img
 pxeserver.options_sl6_64       nomodeset root=nfs:pxe.see.ed.ac.uk:/nfsroot/lcfg64
 pxeserver.descr_sl7    LCFG SL^7 64 bit install
-pxeserver.kernel_sl7   lcfg64_sl7/vmlinuz
-pxeserver.initrd_sl7   lcfg64_sl7/initram.img
+pxeserver.kernel_sl7   http://pxe.see.ed.ac.uk/lcfg64_sl7/vmlinuz
+pxeserver.initrd_sl7   http://pxe.see.ed.ac.uk/lcfg64_sl7/initram.img
 pxeserver.options_sl7  nomodeset root=nfs:pxe.see.ed.ac.uk:/nfsroot/lcfg64_sl7
 pxeserver.descr_memtest ^MemTest86+

It should also be possible to host the kernel and initrd on www.lcfg.org and boot directly. I didn't test this.

iPXE also supports booting from the web. You can give it a script (e.g. http://boot.ipxe.org/demo/boot.php) which offers kernels and initrds. It can also use menus and seems more flexible and easier to configure than syslinux.

It's worth noting what the syslinux page has to say about http support:

Older versions of PXELINUX supported HTTP by using a hybrid bootloader that also contained gPXE/iPXE, with such images named either gpxelinux.0 or ipxelinux.0.

Since version 5.10, a special PXELINUX binary, lpxelinux.0, natively supports HTTP and FTP transfers, greatly increasing load speed and allowing for standard HTTP scripts to present PXELINUX's configuration file. To use HTTP or FTP, use standard URL syntax as filename; use DHCP options to transmit a suitable URL prefix to the client, or use the "pxelinux-options" tool provided in the "utils" directory to program it directly into the lpxelinux.0 file.

While using HTTP/FTP (syntax), trying to use pxelinux.0 (i.e. without the letter "l" prefix) without iPXE/gPXE running underneath, will result in a "file not found" warning without any explanation as to the cause!

-- Bruce Duncanedacuk - 2018-05-31



Topic revision: r3 - 2018-06-08 - squinney
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback