<div class="gmail_quote">On Sat, Aug 1, 2009 at 6:04 PM, Jim Stichnoth <span dir="ltr">&lt;<a href="mailto:stichnot@gmail.com">stichnot@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have a Zotac IONITX frontend that I&#39;m interested in making<br>
completely diskless and PXE booting, and I have a bunch of questions.<br>
Currently it boots off a 4GB USB flash drive.  It is running MythDora<br>
10.21, using the kernel 2.6.27.9-159.fc10.i686.  I have rsync&#39;d the<br>
root file system to the backend machine, and that directory is<br>
NFS-exported.  I understand that I will need to set up dhcp, tftp, and<br>
syslinux (i.e. pxelinux.0) on the server.<br>
<br>
1. Should I expect to have to recompile the kernel to allow an NFS<br>
root file system?  What config options should I look for?<br>
<br>
2. Can the DHCP service in a home router and a Linux DHCP/PXE server<br>
coexist on the same network?  I would prefer the home router to handle<br>
most DHCP requests and the Linux server to handle just the PXE-related<br>
requests for this frontend, so that e.g. my wife doesn&#39;t lose DHCP for<br>
her laptop computer when the Linux server is down.<br>
<br>
3. How reliably does NFS work as a root file system, if the NFS server<br>
goes down and up?  I had trouble using NFS to serve up<br>
videos/posters/pictures until I started using autofs.<br>
<br>
4. Related to question #1, I tried setting up grub to boot off the<br>
flash drive but NFS-mount the root file system, to see if my kernel<br>
was capable.  It appeared to do lots of things and boot up partially,<br>
until it reported that it couldn&#39;t mount /dev/root.  Am I doing<br>
anything overtly wrong, or is it a kernel problem?  I modified the<br>
frontend&#39;s /etc/fstab on the NFS server to mount the NFS version of<br>
the root file system.  I modified grub.conf to look like the<br>
following, where the first boot option was already there and the<br>
second one was added:<br>
<br>
default=1<br>
timeout=0<br>
splashimage=(hd0,0)/grub/splash.xpm.gz<br>
hiddenmenu<br>
title MythDora (2.6.27.9-159.fc10.i686)<br>
        root (hd0,0)<br>
        kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro<br>
root=UUID=bb5aa553-5a5a-4c2c-8077-b6dcb9749223 rhgb quiet<br>
        initrd /initrd-2.6.27.9-159.fc10.i686.img<br>
<br>
title MythDora with NFS root<br>
        root (hd0,0)<br>
        kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro root=/dev/nfs<br>
nfsroot=192.168.0.205:/storage1/frontends/mythfe2/ROOT<br>
        initrd /initrd-2.6.27.9-159.fc10.i686.img<br>
<br>
I added this line to /etc/exports on the NFS server:<br>
/storage1/frontends/mythfe2/ROOT<br>
<a href="http://192.168.0.0/255.255.255.0%28rw,no_root_squash,sync%29" target="_blank">192.168.0.0/255.255.255.0(rw,no_root_squash,sync)</a><br>
and verified that I could mount it on the frontend.<br>
<br>
So you can see that I&#39;m trying to load the kernel and the initrd image<br>
as before from the (hd0,0) partition of the flash drive but then use<br>
the NFS root file system.<br>
<br>
Any advice on this?  Thanks,<br>
<font color="#888888"><br>
Jim<br>
</font></blockquote></div><br>Thanks to everyone who helped me on this.  I now have both Zotac IONITX machines doing PXE boots from the master backend, with no attached storage whatsoever.  They are running MythDora 10.21 which is based on FC10.  Here is a summary for the record.<br>
<br>1. No kernel or kernel module recompilation was needed.<br><br>2. A lot of people reported success with two DHCP servers on the same network, as long as care is taken to avoid conflicts.  I set up a DHCP server on the master backend to assign static IPs to the two frontends, with PXE enabled, and nothing else.  So far, so good.<br>
<br>3. I&#39;m too busy basking in the success of PXE booting and NFS root mounting to do torture testing on NFS fault tolerance...<br><br>4. The mkinitrd man page is 5 years out of date.  The correct grub kernel line for NFS-mounting root (without involving PXE) in my example above is simply:<br>
    kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro root=192.168.0.205:/storage1/frontends/mythfe2/ROOT<br>Also be sure to run mkinitrd against an /etc/fstab that lists an NFS root file system type.<br><br>Other tips:<br><br>o Disable the NetworkManager service, otherwise the system will probably hang during bootup.<br>
<br>o My files in the pxelinux.cfg directory look like this:<br>    DEFAULT linux<br>    LABEL linux<br>    KERNEL vmlinuz-2.6.27.9-159.fc10.i686<br>    APPEND ro root=192.168.0.205:/storage1/frontends/mythfe2/ROOT initrd=initrd-nfs-2.6.27.9-159.fc10.i686.img<br>
Notice the addition of initrd=... to the kernel arguments.  I have a separate file for each frontend because each NFS root path is different.<br><br>o I noticed that mkinitrd and the associated nash program support a &quot;dhcp&quot; root file system type, which seems basically the same as &quot;nfs&quot; except that the root-path is taken from the DHCP server&#39;s response.  It would probably be better to add the root paths to /etc/dhcpd.conf, and then only have a single &quot;default&quot; file in the pxelinux.cfg directory.<br>
<br>o The frontend now idles at 18 watts according to the Kill-a-Watt device.  I&#39;m thinking of replacing the 2 1GB SDRAM modules with a single 2GB module, which would leave more open space for passive cooling, and perhaps even drop the power usage by a watt...<br>
<br>Jim<br>