On Mon, 2008-02-11 at 16:22 +0000, Richard W.M. Jones wrote:
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.
Hmmm, while sort of painful for the reasons you mention, the trivial
amount of change required is somewhat attractive in the short-term. And
I guess that in reality, it's always something that someone might for
some crazy reason want to do.
One thing you can do to make your script easier is just stick the iso in
another cpio.gz file and append it to the main initrd (which is an
initramfs). The kernel should then do the right thing with multiple
initramfs's.
Alternately, if you're expecting that people are using pxelinux (which
it seems you are), you don't even have to do the append. Just make the
cpio.gz of the iso image and use syntax like
append initrd=initrd0.img,isocpio.gz
in the pxelinux.cfg.
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:
Longer-term, I suspect this is something which is more interesting to
support but I also think that it needs to wait until we really have the
live initramfs process integrated with mkinitrd (which already has all
of the network bring-up bits). Redoing all of that is on the todo list,
but probably not for this time around.
Jeremy