Mounting ISOs and configuring kernels for NFS boot
Firstly, I went out and got every popular spin of Ubuntu and used wget to put them in a temp folder. After that I used the following to mount the image and copy the whole livecd over to where it belonged in the /tftpboot/ folder structure. Here is a step by step for my Ubuntu 11.10 Desktop x86:
mkdir -p /tmp/iso
mount -o loop,ro ubuntu-11.10-desktop-i386.iso iso/
cp -r * /tftpboot/ubuntu/11/10/desktop/x86/
Note: Most of the above command are repeated (alot) with different filenames and directories, so you’ll have to use some substitution and your own parameters obviously. Creating a good directory structure in /tftpboot/ will save you some headaches I imagine. *hint hint*
Next step is to configure each option to boot correctly. To do this, we will be editting the menu files made in Step 2 and changing the boot parameters. This is different depending on the boot method used, but here are my changes for the above Ubuntu 11.10 Desktop x86:
The lines we are interested in are “KERNEL” and “APPEND”. Ubuntu uses casper, so the paths for mine are:
APPEND initrd=/ubuntu/11/10/desktop/x86/casper/initrd.lz boot=casper text vga=789 netboot=nfs nfsroot=172.16.100.100:/tftpboot/ubuntu/11/10/desktop/x86
Note: If you are unsure of what to change the kernel or initrd parameters to you can usually search for vmlinuz in the directory you are configuring for and that should give a good indication as to what options the distro you are using is booting. You should also double check the correct filename for both kernel and initrd (sometimes they are a bit different i.e. vmlinuz0 or initrd.gz instead of what I have above).
Once this is all said and done, we need to configure NFS by editing our /etc/exports configuration file. Here is a excerpt from mine pertaining to the above:
Note: There will need to be a share established for each image.
That should just about do it. Mine is working fine here as I stated prior and I will definitely be building another to add to my lab. Next thing to tackle is booting a few Windows flavors (for reinstalls and such) I’ll be posting a video of the boot menu and such when I get a chance so you can see what it is like. Hope you enjoyed the breeze through so far! Feel free to leave any relevant questions/comments.