[mythtv-users] Questions on PXE booting a frontend

Jarod Wilson jarod at wilsonet.com
Sun Aug 2 01:14:37 UTC 2009


On 08/01/2009 09:04 PM, Jim Stichnoth 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?

No. Stock kernel can handle that just fine.

> 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.

Having two DHCP servers on the same network is problematic, and most 
routers don't have enough bits exposed to set up things like pxe 
booting. There may be ways around it, but not any that I'm personally 
aware of.

> 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.

If the NFS server is down, obviously, the frontend is going to hang when 
it tries to access the fs, but in my experience, NFS mounts typically 
recover just fine if the server comes back up in a reasonable amount of 
time. Can't say I've looked specifically at this use case though.

> 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?

You're doing something wrong.

> 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

That much is fine, but you need to create a new initrd that knows root 
is an nfs share. For one, you need your network drivers pulled into the 
initrd so the nfs share can be mounted.

> Any advice on this?  Thanks,

My advice would be that this mess isn't worth the hassle if its booting 
fine from a usb flash stick. I've been there, done that, and ultimately, 
found it much easier to put a small low-power storage device in the 
frontend, rather than screw around with maintaining everything required 
for netbooting w/nfs root.

-- 
Jarod Wilson
jarod at wilsonet.com


More information about the mythtv-users mailing list