[mythtv-users] SOLVED: Questions on PXE booting a frontend

Jim Stichnoth stichnot at gmail.com
Thu Aug 6 08:35:30 UTC 2009


On Sat, Aug 1, 2009 at 6:04 PM, Jim Stichnoth <stichnot at gmail.com> wrote:

> I have a Zotac IONITX frontend that I'm interested in making
> completely diskless and PXE booting, and I have a bunch of questions.
> Currently it boots off a 4GB USB flash drive.  It is running MythDora
> 10.21, using the kernel 2.6.27.9-159.fc10.i686.  I have rsync'd the
> root file system to the backend machine, and that directory is
> NFS-exported.  I understand that I will need to set up dhcp, tftp, and
> syslinux (i.e. pxelinux.0) on the server.
>
> 1. Should I expect to have to recompile the kernel to allow an NFS
> root file system?  What config options should I look for?
>
> 2. Can the DHCP service in a home router and a Linux DHCP/PXE server
> coexist on the same network?  I would prefer the home router to handle
> most DHCP requests and the Linux server to handle just the PXE-related
> requests for this frontend, so that e.g. my wife doesn't lose DHCP for
> her laptop computer when the Linux server is down.
>
> 3. How reliably does NFS work as a root file system, if the NFS server
> goes down and up?  I had trouble using NFS to serve up
> videos/posters/pictures until I started using autofs.
>
> 4. Related to question #1, I tried setting up grub to boot off the
> flash drive but NFS-mount the root file system, to see if my kernel
> was capable.  It appeared to do lots of things and boot up partially,
> until it reported that it couldn't mount /dev/root.  Am I doing
> anything overtly wrong, or is it a kernel problem?  I modified the
> frontend's /etc/fstab on the NFS server to mount the NFS version of
> the root file system.  I modified grub.conf to look like the
> following, where the first boot option was already there and the
> second one was added:
>
> default=1
> timeout=0
> splashimage=(hd0,0)/grub/splash.xpm.gz
> hiddenmenu
> title MythDora (2.6.27.9-159.fc10.i686)
>        root (hd0,0)
>        kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro
> root=UUID=bb5aa553-5a5a-4c2c-8077-b6dcb9749223 rhgb quiet
>        initrd /initrd-2.6.27.9-159.fc10.i686.img
>
> title MythDora with NFS root
>        root (hd0,0)
>        kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro root=/dev/nfs
> nfsroot=192.168.0.205:/storage1/frontends/mythfe2/ROOT
>        initrd /initrd-2.6.27.9-159.fc10.i686.img
>
> I added this line to /etc/exports on the NFS server:
> /storage1/frontends/mythfe2/ROOT
> 192.168.0.0/255.255.255.0(rw,no_root_squash,sync)<http://192.168.0.0/255.255.255.0%28rw,no_root_squash,sync%29>
> and verified that I could mount it on the frontend.
>
> So you can see that I'm trying to load the kernel and the initrd image
> as before from the (hd0,0) partition of the flash drive but then use
> the NFS root file system.
>
> Any advice on this?  Thanks,
>
> Jim
>

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.

1. No kernel or kernel module recompilation was needed.

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.

3. I'm too busy basking in the success of PXE booting and NFS root mounting
to do torture testing on NFS fault tolerance...

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:
    kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro root=192.168.0.205:
/storage1/frontends/mythfe2/ROOT
Also be sure to run mkinitrd against an /etc/fstab that lists an NFS root
file system type.

Other tips:

o Disable the NetworkManager service, otherwise the system will probably
hang during bootup.

o My files in the pxelinux.cfg directory look like this:
    DEFAULT linux
    LABEL linux
    KERNEL vmlinuz-2.6.27.9-159.fc10.i686
    APPEND ro root=192.168.0.205:/storage1/frontends/mythfe2/ROOT
initrd=initrd-nfs-2.6.27.9-159.fc10.i686.img
Notice the addition of initrd=... to the kernel arguments.  I have a
separate file for each frontend because each NFS root path is different.

o I noticed that mkinitrd and the associated nash program support a "dhcp"
root file system type, which seems basically the same as "nfs" except that
the root-path is taken from the DHCP server's response.  It would probably
be better to add the root paths to /etc/dhcpd.conf, and then only have a
single "default" file in the pxelinux.cfg directory.

o The frontend now idles at 18 watts according to the Kill-a-Watt device.
I'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...

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090806/48efa77f/attachment-0001.htm>


More information about the mythtv-users mailing list