[ipxe-devel] Non-ISO Diskless Boot - Pointers?

Brian Rak brak at gameservers.com
Wed Dec 4 15:56:49 UTC 2013

I've actually implemented this in the past, it's only a little bit tricky:


You can actually get away with not using NFS at all.

There are a couple operating systems that already do this, Joyent's 
SmartOS is one.

On 12/4/2013 10:42 AM, Richard Hornbaker wrote:
> Hi, Robin.
> Thanks for the pointers.  I left out what's probably an essential detail in my explanation...
> The goal is for a node to operate independently once it's booted, rather than continue to use the NFS mounted OS image.  What I'm striving for is a combination of the NFS model you mention, but with a local RAMdisk for the OS filesystem as done with the ISO method.
> My gut says this is possible, just unusual for an NFS setup.  Conceptually, I think what I want is the process used by ISO (where the source is copied to a RAMdisk, then booted), just using an NFS source instead of an ISO image in RAM.  I just don't understand enough about the boot loader and kernel processes to hack it out.
> The preference for simplicity & speed (I think) is to copy / boot a pre-built OS image, rather than launch an installer.  Pretty much exactly what I see with NFS-based diskless examples, but adding a step to copy the filesystem to a local RAMdisk and boot from there.
> Is it possible to spec this during the boot process, or... Is it possible to relocate the filesystem root after Linux boots?  If so, maybe a solution is to create the RAMdisk during OS boot, copy the filesystem there from NFS, and point the local filesystem root to the RAMdisk?  (I'm pushing the bounds of my OS skills here, so don't laugh.) The only drawback there is pulling the same content twice - once to boot, and again to create the RAMdisk.
> The torrent idea is blue sky at the moment, and not a requirement.  I agree it'll require some work at the DHCP server to dynamically steer booting nodes to different sources.
> As for the hardware validation tools, I haven't dug into their details yet - they're being used today under Linux, but manually and with no data logging or orchestration which were hoping to add here.  I'll explore your comments about memtest86 to see if we might add something more thorough there.
> Thanks!
> Richard
> Sent from a mobile device - pardon the typos!
> On Dec 4, 2013, at 1:54, Robin Smidsrød <robin at smidsrod.no> wrote:
>> On 03.12.2013 18:05, Richard Hornbaker wrote:
>>> I could use some pointers on a concept I'm chasing.  The idea is a diskless boot for CentOS, but using NFS or HTTP sources instead of ISO.
>> Couldn't you use the tried and true NFS root method that has been
>> available for years and years? Go to tldp.org and search for "NFS root"
>> and you'll find several HOWTOs. Not sure how well they work with current
>> distros, but I'm going to assume it hasn't changed that much.
>>> I've found examples of ISO diskless boot, and NFS/HTTP installers, but not NFS/HTTP diskless boot.
>> I've got Ubuntu Live (casper) booting over NFS in my example menu (see
>> http://ipxe.org/examples), but I'm guessing you don't want to boot a
>> live system, but something installed, right?
>>> * Easily modified boot files.  I need to hand this off to customers, and using NFS or HTTP sources make this very easy compared to ISO.  If folks need to change files, I'd like them to be able to just modify them in the boot server's filesystem.
>> Should be no problem. Change the file on the NFS server and you're done.
>> Reboot if required.
>>> * Upon boot, each node would operate like a torrent server, becoming an additional boot source and serving up its filesystem as source for other booting nodes.  Another reason for it to be filesystem-based and not ISO-based.
>> Well. That would probably require some form of orchestration and
>> clustering support tool. My guess you'd need to script a reasonable
>> amount of stuff to set up each node automatically. My favorite is
>> currently SaltStack.org.
>>> If push came to shove, I could tolerate the duplicate RAM consumption with an ISO boot if the ISO could be accessed and served up by the node once booted.  But this image is for hardware verification (incl. RAM tests), so a small footprint is preferred.
>> If you've already booted Linux you can't run tools like memtest86+.
>> Those would have to be part of what you do before you boot your kernel.
>> My guess is that you might find some use in PuppetLabs Razor product. It
>> has a microkernel that does inventory and a way to boot a node in
>> verification mode (for memory tests and such) before it is put into
>> production. Not sure exactly how it all works. Just copying what I've heard.
>>> I haven't had a lot of success booting from HTTP or NFS in a diskless scenario, only ISO.  Any pointers?  Maybe to folks who've done this before?
>> Boot a kernel + initrd (use either NFS or HTTP protocol, or even TFTP,
>> doesn't matter), specify kernel options to mount the nfs root system,
>> that should be it.
>> Also browse forum.ipxe.org. You might find some useful information in
>> the archives there.
>> -- Robin
>> _______________________________________________
>> ipxe-devel mailing list
>> ipxe-devel at lists.ipxe.org
>> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
> _______________________________________________
> ipxe-devel mailing list
> ipxe-devel at lists.ipxe.org
> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

More information about the ipxe-devel mailing list