After beeing using MythTV for several years, I'm now desided to change my setup from ArchLinux to Debian, for trying to get a more stabil system.
One of my big thoughts is using electricity, so trying to make my MBE use more CPU-power (It's allmost not using anything CPU or RAM) so though this might be an idea.
My idea was to make all my frontends diskless only running on a LTSP setup. But the a challange is to have both 32 and 64bit system in network boot. So starting out with these settings on my MasterBackEnd to make everything runs smoothly.
Maindirectory in this setup:
|
Diskless setup: TFTP server: |
These dir needs to be made for getting the sources for installing everything to diskless frontends. Now we should get all the packages etc to make our network images for each machine in the network.Starting with the different packages needed on the masterbackend:
|
Getting the packages for the network machines:
|
# For getting the 64bit system:
# For getting the 32bit system |
This will automaticly get all the packages, and will take looong time.But we need to edit some files files before going further - /etc/network/interface andd /etc/hostname
|
# /etc/network/interfaces:
# and put in the name for the client hostname in /etc/hostname |
But afterwards we'll chroot into the machines and install kernels and create a bootimage! To do that - you need these commands:
| # Changing chroot chroot /diskless/stuen # Installing the packages needing:
|
This will install a new kernel for the machine. This means it'll create a initrd.img and vmlinuz which are files needed for booting on network. But now we copy the files for boot on the PXE.
|
And for the 64bit systems default file should look like this:
|
DISPLAY boot.txt And for the 32bit system: DISPLAY boot.txt |
NOTICE: look at the end of the boot line which is quite important when you have more than 1machine, you'll need to make this rigth and be sure of it! Bit now we need to change the bootimage - to actually have nfs-module enabled and booting on the network!
|
cd /srv/tftp
MODULES=netboot # repack the image: |
Remember to give your bootimages different names depending on which machine you're booting on. Now we shall look on our DHCP-server running somewhere in our setup (in my system - on my Soekris Router ) In /etc/dhcp/dhcpd.conf we should make these changes to make it run smoothly:
| subnet 172.16.20.0 netmask 255.255.255.0 { range 172.16.20.200 172.16.20.254; option broadcast-address 172.16.20.255; filename "pxelinux.0"; next-server 172.16.20.10; option routers 172.16.20.1; option domain-name "pbj-design.dk"; } |
which are the setting that tells the machine where to find its bootimage. Last part is setting up the NFS export and it should look like this:
| /diskless 172.16.20.0/255.255.0.0(sync,no_subtree_check,fsid=0,rw) /diskless/stuen 172.16.20.0/255.255.0.0(rw,no_subtree_check,async,no_root_squash) /diskless/koekken 172.16.20.0/255.255.0.0(rw,no_subtree_check,async,no_root_squash) /diskless/unger 172.16.20.0/255.255.0.0(rw,no_subtree_check,async,no_root_squash) /diskless/sove 172.16.20.0/255.255.0.0(rw,no_subtree_check,async,no_root_squash) |
And afterwards restart the NFS-server service.
Now you have a machine that'll boot from the network and actually have all files on the MasterBackEnd!
Afterwards I found out that there's some extra thing when running a NFS-diskless system, so on all clients I've added this to /etc/rc.local
|
# Setting the time on the client |
This will make sure the time is right according to the MBE, and also the mounted drives. Now you're ready to install your applications(in my case MythTV) - and this is the time its installed on Debian instead of ArchLinux. So boot up your machine and start the mythtv installation. You'll need to start with adding the Debian Multimedia repos to your apt-sources. Afterwards you'll be able to install the packages needed for at stable Mythtv setup:
| apt-get install mythtv mythmusic python-mythtv mythtv-common mythtv-themes mythtv-frontend mythtv-plugins nuvexport openssh-server automake autoconf ntpdate |
This will install the default packages for Mythtv - and you're ready to go - you can allso use the git version but then you'll need to make som more changes!