[Fedora-livecd-list] [PATCH] Add support for pxeboot
Richard W.M. Jones
rjones at redhat.com
Mon Feb 11 16:22:21 UTC 2008
The attached patch adds support for turning a liveCD ISO image into a
network-bootable PXE image.
Myself and Chris Lalancette looked into this in some detail and came up
with two different ways to do this. This is the simpler of the two
methods and results in the least invasive changes to livecd-creator --
just a single line patch to mayflower and a 100-or-so-line extra script
called 'livecd-iso-to-pxeboot' which works analogously to
'livecd-iso-to-disk'.
The way it works is to bundle the complete ISO image inside the initrd.
The kernel and (bloated) initrd are downloaded using PXE in the normal
way, and the init script finds and loopback-mounts the ISO image and
booting continues as normal.
One possible con of this approach is whether or not it's a good idea to
download a very large (min 200 MB) initrd image over TFTP. There are
two reasons we can think of why you *wouldn't* want to do this:
(1) "traditional" TFTP is limited to 32 MB max file size, although all
modern TFTP implementations supersede that with a 4 GB limit (RFC 2348).
(2) TFTP uses its own transport layer which might not be able to
back-off as nicely as TCP on busy networks.
However in my testing there was no problem at all using TFTP on large
files over an ethernet LAN.
The other approach which we looked at and partially implemented was to
modify the normal initrd/init so that it could do a separate request to
download the ISO. It could possibly do this over another protocol such
as HTTP (although in Chris's tests he just used a separate TFTP
connection). The implementation of this is considerably more complicated:
(a) The initrd has to carry around dhclient, network scripts, and all
the network programs like '/sbin/ip'.
(b) The initrd has to be able to find the TFTP server again, which
basically involves making another DHCP query. In Chris's original
implementation he also added specific DHCP options to carry the TFTP
server information since it wasn't clear how to get this out of stock
dhclient.
(c) After booting, because of (b), the network is already set up, which
is not how a live CD expects it to be. Therefore the live CD itself
would need to be changed if it does any network configuration.
All in all, I would say that the attached patch is a simpler and better
approach.
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: livecd-pxeboot.patch
Type: text/x-patch
Size: 5683 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/livecd/attachments/20080211/f05437e7/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/livecd/attachments/20080211/f05437e7/attachment-0001.bin
More information about the livecd
mailing list