[mythtv-users] Multiple diskless frontends off one image
Scott Alfter
scott at alfter.us
Fri Mar 18 17:58:14 UTC 2011
On 17 Mar 11 23:34, Robin Gilks wrote:
> I want to add another frontend, a second diskless Ztoac ION m/b. I'm
> currently doing a diskless network boot (keeps the noise down) and would
> like to do the same again for the new frontend...
>
> I would guess I'd need to have separate /var, /tmp and maybe /etc and
> /home directories with /usr, /sbin, /opt, /mnt and /lib as common ones.
> Does this sound reasonable and just how do I do it?
I've not done this (yet) with my MythTV setup at home, but I have a
digital-signage system at work based on Concerto that has diskless clients (set
up with large plasma or LCD panels) netbooting from the content server.
I started with Gentoo, as that's what I prefer. I got the server and a client
running separately at first. Once everything was running, I imaged the
client's hard drive and unpacked it to a directory under /export (which has all
of the NFS-exported directories). A shell script I wrote sets up root
filesystems for the diskless clients by providing each with its own copies of
the following:
/bin /sbin /dev /lib /mnt /proc /root /sys /tmp
The most recently created root-filesystem image takes about 136 MB, so you can
support a fairly large number of different hosts with a modest amount of disk
space.
Empty directories are created for /opt, /usr, and /home, which are NFS-mounted
from those directories on the server. The script also removes SSH server keys
and saved ALSA mixer settings so they can be regenerated for the new client.
tftp-hpa serves up pxelinux and a kernel image to the clients.
One snag that popped up during setup is that the Gentoo initscripts that
control the network interfaces like to restart them during boot. When / lives
on the network, this is a Bad Thing. To keep this from happening, disable plug
services for network interfaces in /etc/conf.d/rc:
RC_PLUG_SERVICES="!net.*"
Another snag was that xargs, find, and getent should be copied from /usr/bin to
/bin so that they're available throughout the boot process; some initscripts
that run before /usr is mounted won't work without them.
At this point, we have two or three diskless clients running here. Adding
another takes a few minutes to create a new root image on the content server
and appropriate DNS and DHCP entries (which are handled here by Windows Server
2003, but dnsmasq is a lightweight option for a Linux server that handles both
functions).
Scott Alfter
scott at alfter.us
More information about the mythtv-users
mailing list