Difference between revisions of "Diskless LTSP Frontend"

From MythTV Official Wiki
Jump to: navigation, search
(Create the initial client image)
(Diskless Alternatives)
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
This guide is based on Ubuntu 12.04
+
= Introduction =
  
There are two parts to this guide.  One part will have commands to install a 32-bit client, the other part will have commands to install a 64-bit client.
+
This guide is based on Ubuntu 12.04 and LTSP 5.3.x.  Please update it as needed with other Linux Distribution instructions.
 +
 
 +
Note: If you are using a newer version of Ubuntu and you get an error like this:
 +
 
 +
  overlayfs: missing `workdir`
 +
 
 +
On your client you need to install the "Greek Schools" PPA.
 +
 
 +
  root@ltsp-server:~# add-apt-repository --yes ppa:ts.sch.gr
 +
  root@ltsp-server:~# apt-get update
 +
  root@ltsp-server:~# apt-get dist-upgrade
 +
 
 +
...both in your server and your chroot.
 +
 
 +
  root@ltsp-server-chroot:~# add-apt-repository --yes ppa:ts.sch.gr
 +
  root@ltsp-server-chroot:~# apt-get update
 +
  root@ltsp-server-chroot:~# apt-get dist-upgrade
 +
 
 +
== Why Diskless? ==
 +
 
 +
This setup allows you to run a client frontend without a hard disk in it.
 +
 
 +
* Saves you money
 +
* Possibly keeps the client quieter
 +
* Less heat generated.
 +
* The client OS is "read only", you do not need to be concerned with system crashes.
 +
* Possibly less power used on the frontend.  You may use more power on your LTSP server though.
 +
 
 +
== MythTV Versions Supported ==
 +
 
 +
These instructions are valid for MythTV 0.25, 0.26 and 0.27.  They should also be valid for future versions as long as LTSP 5.x is used.  Refer to the section on upgrading MythTV.
 +
 
 +
== Diskless Alternatives ==
 +
 
 +
* MiniMyth. http://www.minimyth.org
 +
* Minimyth2. http://minimyth2.homenet.org/
 +
 
 +
This LTSP method gives you more flexibility and allows you to customize your frontend.  You get to control when and what version of mythtv you upgrade to.  You also get to use a "regular" linux desktop.
 +
 
 +
== Conventions used with this guide ==
 +
 
 +
There are two main parts to this guide.  One part has commands to install a 32-bit client, the other part has commands to install a 64-bit client.  The final parts are for troubleshooting and maintenance updates.
 +
 
 +
There are many steps involved.  This guide has been written this way so you can slowly work through the process of getting your client installed.  Hopefully it will make it easier for you to customize your own LTSP client.
  
 
When you see this
 
When you see this
Line 25: Line 68:
 
#You mythtv frontend has a mac address of 87:01:2a:ab:08:56
 
#You mythtv frontend has a mac address of 87:01:2a:ab:08:56
  
 +
= Install the LTSP Server Software =
  
== Install the LTSP Server Software ==
+
  root@ltsp-server:~# apt-get install ltsp-server-standalone
  
  root@ltsp-server:~# apt-get install ltsp-server-standalone
+
= Configure DHCP =
 +
 
 +
Dhcpd is used to provide the client frontend with an IP address.
 +
 
 +
== DD-WRT ==
 +
 
 +
Note: You can also configure your main dhcp server to make your mythtv fontend boot.  It is possible to do this with DD-WRT.
 +
 
 +
For DD-WRT you need something like this.  Add this line to the '''Services -> Additional, dnsmasq options''' section on the router
 +
 
 +
  dhcp-boot=/ltsp/i386/pxelinux.0,,192.168.1.150
 +
 
 +
or this for a 64 bit client
 +
 
 +
  dhcp-boot=/ltsp/amd64/pxelinux.0,,192.168.1.150
  
== Configure DHCP ==
+
== LTSP Server ==
  
 
Installing the ltsp server software will create a dhcpd config file '''/etc/ltsp/dhcpd.conf'''
 
Installing the ltsp server software will create a dhcpd config file '''/etc/ltsp/dhcpd.conf'''
  
You already have dhcpd running, this new file will override it.
+
If you already have dhcpd running, this new file will override it.
 
 
Dhcpd is used to provide the client frontend with an IP address.
 
  
  
Line 44: Line 100:
 
# This will be the subnet your client will use.  Your server must have an interface serving this range.
 
# This will be the subnet your client will use.  Your server must have an interface serving this range.
 
subnet 192.168.1.0 netmask 255.255.255.0 {
 
subnet 192.168.1.0 netmask 255.255.255.0 {
 +
 
     range 192.168.1.150 192.168.1.200;
 
     range 192.168.1.150 192.168.1.200;
 
     option domain-name "example.com";
 
     option domain-name "example.com";
Line 53: Line 110:
 
     option subnet-mask 255.255.255.0;
 
     option subnet-mask 255.255.255.0;
 
     option root-path "/opt/ltsp/i386";
 
     option root-path "/opt/ltsp/i386";
 +
 
     if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
 
     if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
 
         filename "/ltsp/i386/pxelinux.0";
 
         filename "/ltsp/i386/pxelinux.0";
Line 60: Line 118:
  
 
   host mythfront {
 
   host mythfront {
  # tftp client hardware address
 
  hardware ethernet 87:01:2a:ab:08:56;
 
  fixed-address 192.168.1.150;
 
  # Uncomment the line below if your client is 32-bit
 
  # filename "/ltsp/i386/pxelinux.0";
 
  # Uncomment the line below if your client is 64-bit
 
  filename "/ltsp/amd64/pxelinux.0";
 
  
}
+
    # tftp client hardware address, mac address of your LTSP client
 +
    hardware ethernet 87:01:2a:ab:08:56;
 +
 
 +
    # Dedicated IP address for your LTSP client
 +
    fixed-address 192.168.1.150;
 +
 
 +
    # Uncomment the line below if your client is 32-bit
 +
    # filename "/ltsp/i386/pxelinux.0";
 +
 
 +
    # Uncomment the line below if your client is 64-bit
 +
    filename "/ltsp/amd64/pxelinux.0";
 +
 
 +
  }
  
 
}
 
}
Line 77: Line 140:
 
   root@ltsp-server:~# service isc-dhcpd-server restart
 
   root@ltsp-server:~# service isc-dhcpd-server restart
  
== Build client settings ==
+
=Configure tftpd =
 +
 
 +
Ensure it listens on the IPv4 address.  You also need to create files.
 +
{{code_box|/etc/default/tftpd-hpa|<pre>
 +
# /etc/default/tftpd-hpa
 +
 
 +
TFTP_USERNAME="tftp"
 +
TFTP_DIRECTORY="/var/lib/tftpboot"
 +
TFTP_ADDRESS="0.0.0.0:69"
 +
TFTP_OPTIONS="--ipv4 --secure --create"
 +
</pre>}}
 +
 
 +
 
 +
= Build client settings =
 +
 
  
 
{{code_box|/etc/ltsp/ltsp-build-client.conf|<pre>
 
{{code_box|/etc/ltsp/ltsp-build-client.conf|<pre>
 
 
# ubuntu-desktop and edubuntu-desktop are tested.
 
# ubuntu-desktop and edubuntu-desktop are tested.
 
# Ubuntu 12.04 LTS working perfectly with Unity and Unity 2D.
 
# Ubuntu 12.04 LTS working perfectly with Unity and Unity 2D.
Line 93: Line 169:
  
 
{{code_box|/etc/ltsp/ltsp-update-image.conf|<pre>
 
{{code_box|/etc/ltsp/ltsp-update-image.conf|<pre>
 +
 
#configuration file for ltsp-update-image
 
#configuration file for ltsp-update-image
 
# Do not compress the client image. Comment out the line below to enable again.
 
# Do not compress the client image. Comment out the line below to enable again.
Line 98: Line 175:
 
</pre>}}
 
</pre>}}
  
== Set up Thin Client user ==
+
 
 +
= Set up Thin Client user =
  
 
This account is created on your LTSP server.  The LTSP client will use it to login.
 
This account is created on your LTSP server.  The LTSP client will use it to login.
  
   root@ltsp-server:~# useradd -m mythltsp -G sudo mythtv
+
   root@ltsp-server:~# useradd -m -G sudo,mythtv mythltsp
 
   root@ltsp-server:~# passwd mythltsp
 
   root@ltsp-server:~# passwd mythltsp
 +
 +
Update default mythtv configuration settings for your new user
 +
 
   root@ltsp-server:~# su - mythltsp
 
   root@ltsp-server:~# su - mythltsp
 
   $ mkdir .mythtv
 
   $ mkdir .mythtv
Line 111: Line 192:
 
   $ exit
 
   $ exit
  
=Start of 32 bit LTSP Client Instructions=
+
= Start of 32 bit LTSP Client Instructions =
  
==Create the initial client image==
+
== Create the initial client image ==
  
   root@ltsp-server:~# ltsp-build-client
+
   root@ltsp-server:~# ltsp-build-client --arch i386
  
==Boot the LTSP client==
+
== Boot the LTSP client ==
  
 
Try to login, if you get an error that gnome failed to load
 
Try to login, if you get an error that gnome failed to load
  
 
   root@ltsp-server:~# ltsp-chroot
 
   root@ltsp-server:~# ltsp-chroot
 +
  root@ltsp-server-chroot:/# mount -t proc proc /proc
 
   root@ltsp-server-chroot:/# apt-get install gnome
 
   root@ltsp-server-chroot:/# apt-get install gnome
 
   root@ltsp-server-chroot:/# exit
 
   root@ltsp-server-chroot:/# exit
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image --arch=i386
 
   root@ltsp-server:~# ltsp-update-image --arch=i386
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
Client boots and can now login.  MythTV is not installed
 
Client boots and can now login.  MythTV is not installed
  
==Update repositories the client can use==
+
== Update repositories the client can use ==
  
 
   root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list
 
   root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list
 
   root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/i386/etc/apt/sources.list.d/
 
   root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/i386/etc/apt/sources.list.d/
  
==Install MythTV Frontend==
+
== Install MythTV Frontend ==
  
 
   root@ltsp-server:~# ltsp-chroot
 
   root@ltsp-server:~# ltsp-chroot
Line 145: Line 227:
 
   root@ltsp-server-chroot:/# exit
 
   root@ltsp-server-chroot:/# exit
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image --arch=i386
 
   root@ltsp-server:~# ltsp-update-image --arch=i386
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
This time mythtv frontend will be available
 
This time mythtv frontend will be available
  
Now configure it
+
== Now configure the client ==
 
 
  root@ltsp-server:~# ltsp-chroot
 
  
 
Update the settings for your backend, DBHostName and DBPassword will have to be changed.
 
Update the settings for your backend, DBHostName and DBPassword will have to be changed.
  
   root@ltsp-server-chroot:/# vi /etc/mythtv/mysql.txt
+
  root@ltsp-server:~# ltsp-chroot
 +
   root@ltsp-server-chroot:/# vi /etc/mythtv/config.xml
  
 
This assumes you have a link from your local user home dir to the /etc/mythtv config dir
 
This assumes you have a link from your local user home dir to the /etc/mythtv config dir
  
eg.
+
   root@ltsp-server-chroot:/# ln -s /etc/mythtv/config.xml /home/mythltsp/.mythtv/config.xml
 
 
   /home/mythltsp/.mythtv/mysql.txt -> /etc/mythtv/mysql.txt
 
 
 
 
   root@ltsp-server-chroot:/# exit
 
   root@ltsp-server-chroot:/# exit
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image --arch=i386
 
   root@ltsp-server:~# ltsp-update-image --arch=i386
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
This time, mythtv frontend should connect to the backend.
 
This time, mythtv frontend should connect to the backend.
  
==Enable auto login==
+
== Enable auto login ==
  
 
   root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/i386/lts.conf
 
   root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/i386/lts.conf
Line 187: Line 265:
 
LOCAL_APPS = True
 
LOCAL_APPS = True
 
LDM_SESSION = "lightdm-gtk-greeter"
 
LDM_SESSION = "lightdm-gtk-greeter"
 +
#Disable screen going blank after a few mintutes
 +
X_BLANKING=0
  
[192.168.92.120]
+
[192.168.1.150]
 
LDM_USERNAME = mythltsp
 
LDM_USERNAME = mythltsp
 
LDM_PASSWORD = mythltsp
 
LDM_PASSWORD = mythltsp
 
</pre>}}
 
</pre>}}
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
This time, mythtv frontend should automatically login and connect to the backend.
+
This time, mythtv frontend should automatically login.
  
=End of 32 bit LTSP Client Intructions=
+
= End of 32 bit LTSP Client Intructions =
  
  
  
  
=Start of 64 bit LTSP Client Instructions=
+
= Start of 64 bit LTSP Client Instructions =
  
==Create the initial client image==
+
== Create the initial client image ==
  
 
   root@ltsp-server:~# ltsp-build-client --arch amd64
 
   root@ltsp-server:~# ltsp-build-client --arch amd64
  
==Boot the LTSP client==
+
== Boot the LTSP client ==
  
 
Try to login, if you get an error that gnome failed to load
 
Try to login, if you get an error that gnome failed to load
  
 
   root@ltsp-server:~# ltsp-chroot
 
   root@ltsp-server:~# ltsp-chroot
 +
  root@ltsp-server-chroot:/# mount -t proc proc /proc
 
   root@ltsp-server-chroot:/# apt-get install gnome
 
   root@ltsp-server-chroot:/# apt-get install gnome
 
   root@ltsp-server-chroot:/# exit
 
   root@ltsp-server-chroot:/# exit
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
Client boots and can now login.  MythTV is not installed
 
Client boots and can now login.  MythTV is not installed
  
==Update repositories the client can use==
+
== Update repositories the client can use ==
  
 
   root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/amd64/etc/apt/sources.list
 
   root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/amd64/etc/apt/sources.list
 
   root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/amd64/etc/apt/sources.list.d/
 
   root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/amd64/etc/apt/sources.list.d/
  
==Install MythTV Frontend==
+
== Install MythTV Frontend ==
  
 
   root@ltsp-server:~# ltsp-chroot
 
   root@ltsp-server:~# ltsp-chroot
Line 236: Line 317:
 
   root@ltsp-server-chroot:/# exit
 
   root@ltsp-server-chroot:/# exit
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
This time mythtv frontend will be available
 
This time mythtv frontend will be available
  
Now configure it
+
== Now configure LTSP Client ==
 
 
  root@ltsp-server:~# ltsp-chroot
 
  
 
Update the settings for your backend, DBHostName and DBPassword will have to be changed.
 
Update the settings for your backend, DBHostName and DBPassword will have to be changed.
  
   root@ltsp-server-chroot:/# vi /etc/mythtv/mysql.txt
+
  root@ltsp-server:~# ltsp-chroot
 +
   root@ltsp-server-chroot:/# vi /etc/mythtv/config.xml
  
 
This assumes you have a link from your local user home dir to the /etc/mythtv config dir
 
This assumes you have a link from your local user home dir to the /etc/mythtv config dir
  
eg.
+
   root@ltsp-server-chroot:/# ln -s /etc/mythtv/config.xml /home/mythltsp/.mythtv/config.xml
 
 
   /home/mythltsp/.mythtv/mysql.txt -> /etc/mythtv/mysql.txt
 
 
 
 
   root@ltsp-server-chroot:/# exit
 
   root@ltsp-server-chroot:/# exit
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
This time, mythtv frontend should connect to the backend.
 
This time, mythtv frontend should connect to the backend.
  
==Enable auto login==
+
== Enable auto login ==
  
 
   root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/amd64/lts.conf
 
   root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/amd64/lts.conf
Line 278: Line 355:
 
LOCAL_APPS = True
 
LOCAL_APPS = True
 
LDM_SESSION = "lightdm-gtk-greeter"
 
LDM_SESSION = "lightdm-gtk-greeter"
 +
#Disable screen going blank after a few mintutes
 +
X_BLANKING=0
  
[192.168.92.120]
+
[192.168.1.150]
 
LDM_USERNAME = mythltsp
 
LDM_USERNAME = mythltsp
 
LDM_PASSWORD = mythltsp
 
LDM_PASSWORD = mythltsp
 
</pre>}}
 
</pre>}}
  
==Boot the LTSP client==
+
== Reboot the LTSP client ==
  
This time, mythtv frontend should automatically login and connect to the backend.
+
This time, mythtv frontend should automatically login.
  
==Optional: Install NVIDIA drivers==
+
== Optional: Install NVIDIA drivers ==
  
 
Note: if your main LTSP server is 64 bit and your LTSP client is also 64 bit this step will work.  If your LTSP client is 32 bit you will need to work out how to install the 32 bit version of the nvidia driver.
 
Note: if your main LTSP server is 64 bit and your LTSP client is also 64 bit this step will work.  If your LTSP client is 32 bit you will need to work out how to install the 32 bit version of the nvidia driver.
Line 301: Line 380:
 
   root@ltsp-server-chroot:/# nvidia-xconfig
 
   root@ltsp-server-chroot:/# nvidia-xconfig
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
This time, the LTSP client should be using the NVIDIA drivers.  If you can't see the edges of your screen, you have a condition called "overscan".
 
This time, the LTSP client should be using the NVIDIA drivers.  If you can't see the edges of your screen, you have a condition called "overscan".
  
Edit /etc/X11/Sxorg.conf
+
Edit /etc/X11/xorg.conf
  
Add this to the bottom of the "Screen" section
+
Add this to the bottom of the "Screen" section. (The ViewPortOut section changes the resoluion sent to your screen.  You may need to adjust these numbers for your screen)
  
 
     Option        "metamodes" "DFP-0: nvidia-auto-select +0+0,DFP-1: 1920x1080 { ViewPortIn=1920x1080, ViewPortOut=1820x1020+45+30 }"
 
     Option        "metamodes" "DFP-0: nvidia-auto-select +0+0,DFP-1: 1920x1080 { ViewPortIn=1920x1080, ViewPortOut=1820x1020+45+30 }"
Line 313: Line 392:
 
   root@ltsp-server-chroot:/# exit
 
   root@ltsp-server-chroot:/# exit
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
You should now see the full menus on around the edges of your screen.
+
You should now see the full menus around the edges of your screen.
  
=End of 64 bit LTSP Client Instructions=
+
= End of 64 bit LTSP Client Instructions =
  
 +
= Make MythTV Frontend Automatically Start =
  
 +
  root@ltsp-server:~# su - mythltsp
 +
  $ cd .config
 +
  $ mkdir autostart
 +
  $ cd autostart
 +
  $ vi mythfrontend.desktop
  
 +
{{code_box|mythfrontend.desktop|<pre>
 +
[Desktop Entry]
 +
Type=Application
 +
Exec=/usr/bin/mythfrontend
 +
Hidden=false
 +
NoDisplay=false
 +
Name=mythTV frontend
 +
Comment=Record, playback and watch TV.
 +
</pre>}}
  
 
= Troubleshooting =
 
= Troubleshooting =
  
==Make MythTV use the full screen when it launches==
+
== Make MythTV use the full screen when it launches ==
  
 
There is a known issue with mythtv launching and not using the full screen.  A Compiz bug that was reported here:
 
There is a known issue with mythtv launching and not using the full screen.  A Compiz bug that was reported here:
Line 336: Line 430:
 
Run these commands to implement a fix
 
Run these commands to implement a fix
  
 +
  root@ltsp-server:~# ltsp-chroot
 
   root@ltsp-server-chroot:/# apt-get install compizconfig-settings-manager
 
   root@ltsp-server-chroot:/# apt-get install compizconfig-settings-manager
 
   root@ltsp-server-chroot:/# exit
 
   root@ltsp-server-chroot:/# exit
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image --arch=i386
 
   root@ltsp-server:~# ltsp-update-image --arch=i386
Line 345: Line 440:
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
 
   root@ltsp-server:~# ltsp-update-image --arch amd64
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
After the LTSP client has booted, login using the mythltsp user
 
After the LTSP client has booted, login using the mythltsp user
Line 355: Line 450:
 
#Check "Legacy Full Screen" support.
 
#Check "Legacy Full Screen" support.
  
==Create a new image==
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image
 
   root@ltsp-server:~# ltsp-update-image
  
==Boot the LTSP client==
+
=== Reboot the LTSP client ===
  
 
Mythtv frontend should now use the full screen.
 
Mythtv frontend should now use the full screen.
  
=Maintenance Updates=
+
= Maintenance Updates =
  
==Kernel Updates==
+
== Kernel Updates ==
  
 
If you apply a kernel update to your LTSP server you need to run this command to update your client
 
If you apply a kernel update to your LTSP server you need to run this command to update your client
Line 371: Line 466:
 
   root@ltsp-server:~# ltsp-update-kernels
 
   root@ltsp-server:~# ltsp-update-kernels
  
===Create a new image===
+
=== Create a new image ===
 +
 
 +
  root@ltsp-server:~# ltsp-update-image
 +
 
 +
== MythTV Minor Updates ==
 +
 
 +
e.g. This means upgrade from 0.25.1 to 0.25.2
 +
 
 +
  root@ltsp-server:~# ltsp-chroot
 +
  root@ltsp-server-chroot:/# apt-get update
 +
  root@ltsp-server-chroot:/# apt-get upgrade mythtv-frontend
 +
 
 +
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image
 
   root@ltsp-server:~# ltsp-update-image
  
==MythTV Updates==
+
== MythTV Major Updates ==
 +
 
 +
This means upgrading a full release.  ie, from 0.25 to 0.26
 +
 
 +
On your LTSP server upgrade mythtv as "normal".  For mythbuntu based systems use the Mythbuntu Control Center.
 +
 
 +
After you confirm your upgrade was successful update your client
 +
 
 +
=== Update repositories the client can use ===
  
 
   root@ltsp-server:~# ltsp-chroot
 
   root@ltsp-server:~# ltsp-chroot
 +
 +
==== For a 64 bit client ====
 +
 +
  root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/amd64/etc/apt/sources.list
 +
  root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/amd64/etc/apt/sources.list.d/
 +
 +
==== For a 32 bit client ====
 +
 +
  root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list
 +
  root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/i386/etc/apt/sources.list.d/
 +
 +
=== Upgrade the frontend ===
 +
 
   root@ltsp-server-chroot:/# apt-get update
 
   root@ltsp-server-chroot:/# apt-get update
 
   root@ltsp-server-chroot:/# apt-get upgrade mythtv-frontend
 
   root@ltsp-server-chroot:/# apt-get upgrade mythtv-frontend
  
===Create a new image===
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image
 
   root@ltsp-server:~# ltsp-update-image
  
==General OS Patch Updates==
+
== General OS Patch Updates ==
  
 
   root@ltsp-server:~# ltsp-chroot
 
   root@ltsp-server:~# ltsp-chroot
Line 391: Line 519:
 
   root@ltsp-server-chroot:/# apt-get upgrade
 
   root@ltsp-server-chroot:/# apt-get upgrade
  
===Create a new image===
+
=== Create a new image ===
  
 
   root@ltsp-server:~# ltsp-update-image
 
   root@ltsp-server:~# ltsp-update-image
 +
 +
[[Category:HOWTO]]

Latest revision as of 01:10, 11 May 2016

Contents

Introduction

This guide is based on Ubuntu 12.04 and LTSP 5.3.x. Please update it as needed with other Linux Distribution instructions.

Note: If you are using a newer version of Ubuntu and you get an error like this:

 overlayfs: missing `workdir`

On your client you need to install the "Greek Schools" PPA.

 root@ltsp-server:~# add-apt-repository --yes ppa:ts.sch.gr
 root@ltsp-server:~# apt-get update
 root@ltsp-server:~# apt-get dist-upgrade

...both in your server and your chroot.

 root@ltsp-server-chroot:~# add-apt-repository --yes ppa:ts.sch.gr
 root@ltsp-server-chroot:~# apt-get update
 root@ltsp-server-chroot:~# apt-get dist-upgrade

Why Diskless?

This setup allows you to run a client frontend without a hard disk in it.

  • Saves you money
  • Possibly keeps the client quieter
  • Less heat generated.
  • The client OS is "read only", you do not need to be concerned with system crashes.
  • Possibly less power used on the frontend. You may use more power on your LTSP server though.

MythTV Versions Supported

These instructions are valid for MythTV 0.25, 0.26 and 0.27. They should also be valid for future versions as long as LTSP 5.x is used. Refer to the section on upgrading MythTV.

Diskless Alternatives

This LTSP method gives you more flexibility and allows you to customize your frontend. You get to control when and what version of mythtv you upgrade to. You also get to use a "regular" linux desktop.

Conventions used with this guide

There are two main parts to this guide. One part has commands to install a 32-bit client, the other part has commands to install a 64-bit client. The final parts are for troubleshooting and maintenance updates.

There are many steps involved. This guide has been written this way so you can slowly work through the process of getting your client installed. Hopefully it will make it easier for you to customize your own LTSP client.

When you see this

 root@ltsp-server:~#

It means the commands should be executed on the LTSP server.

When you see this

 root@ltsp-server-chroot:/#

It means the commands should be executed on the LTSP server, but after you have run the chroot command ltsp-chroot. Chroot is type of isolated environment.

Assumptions

  1. Your mythtv server has an IP address of 192.168.1.100
  2. Your mythtv frontend is diskless, it will use a dhcp client address of 192.168.1.150
  3. You will create a new user called mythltsp
  4. Your mythtv server resolves DNS queries
  5. Your default router IP is 192.168.1.1
  6. Your mythtv server is not already serving DHCP
  7. You mythtv frontend has a mac address of 87:01:2a:ab:08:56

Install the LTSP Server Software

 root@ltsp-server:~# apt-get install ltsp-server-standalone

Configure DHCP

Dhcpd is used to provide the client frontend with an IP address.

DD-WRT

Note: You can also configure your main dhcp server to make your mythtv fontend boot. It is possible to do this with DD-WRT.

For DD-WRT you need something like this. Add this line to the Services -> Additional, dnsmasq options section on the router

 dhcp-boot=/ltsp/i386/pxelinux.0,,192.168.1.150

or this for a 64 bit client

 dhcp-boot=/ltsp/amd64/pxelinux.0,,192.168.1.150

LTSP Server

Installing the ltsp server software will create a dhcpd config file /etc/ltsp/dhcpd.conf

If you already have dhcpd running, this new file will override it.


Script.png /etc/ltsp/dhcpd.conf
authoritative;

# This will be the subnet your client will use.  Your server must have an interface serving this range.
subnet 192.168.1.0 netmask 255.255.255.0 {

    range 192.168.1.150 192.168.1.200;
    option domain-name "example.com";
    option domain-name-servers 192.168.1.100;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.1;
#    next-server 192.168.0.1;
#    get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
    option root-path "/opt/ltsp/i386";

    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386/pxelinux.0";
    } else {
        filename "/ltsp/i386/nbi.img";
    }

  host mythfront {

    # tftp client hardware address, mac address of your LTSP client
    hardware ethernet 87:01:2a:ab:08:56;

    # Dedicated IP address for your LTSP client
    fixed-address 192.168.1.150;

    # Uncomment the line below if your client is 32-bit
    # filename "/ltsp/i386/pxelinux.0";

    # Uncomment the line below if your client is 64-bit
    filename "/ltsp/amd64/pxelinux.0";

  }

}

Restart DHCP

 root@ltsp-server:~# service isc-dhcpd-server restart

Configure tftpd

Ensure it listens on the IPv4 address. You also need to create files.

Script.png /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--ipv4 --secure --create"


Build client settings

Script.png /etc/ltsp/ltsp-build-client.conf
# ubuntu-desktop and edubuntu-desktop are tested.
# Ubuntu 12.04 LTS working perfectly with Unity and Unity 2D.
FAT_CLIENT_DESKTOPS="ubuntu-desktop"

# This uses the server apt cache to speed up downloading.
# This locks the servers dpkg, so you can't use apt on
# the server while building the chroot.
MOUNT_PACKAGE_DIR="/var/cache/apt/archives/"


Script.png /etc/ltsp/ltsp-update-image.conf

#configuration file for ltsp-update-image
# Do not compress the client image. Comment out the line below to enable again.
NO_COMP="-noF -noD -noI -no-exports"


Set up Thin Client user

This account is created on your LTSP server. The LTSP client will use it to login.

 root@ltsp-server:~# useradd -m -G sudo,mythtv mythltsp
 root@ltsp-server:~# passwd mythltsp

Update default mythtv configuration settings for your new user

 root@ltsp-server:~# su - mythltsp
 $ mkdir .mythtv
 $ cd .mythtv
 $ ln -s /etc/mythtv/mysql.txt mysql.txt
 $ ln -s /etc/mythtv/config.xml config.xml
 $ exit

Start of 32 bit LTSP Client Instructions

Create the initial client image

 root@ltsp-server:~# ltsp-build-client --arch i386

Boot the LTSP client

Try to login, if you get an error that gnome failed to load

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# mount -t proc proc /proc
 root@ltsp-server-chroot:/# apt-get install gnome
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch=i386

Reboot the LTSP client

Client boots and can now login. MythTV is not installed

Update repositories the client can use

 root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list
 root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/i386/etc/apt/sources.list.d/

Install MythTV Frontend

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get update
 root@ltsp-server-chroot:/# apt-get install mythtv-frontend
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch=i386

Reboot the LTSP client

This time mythtv frontend will be available

Now configure the client

Update the settings for your backend, DBHostName and DBPassword will have to be changed.

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# vi /etc/mythtv/config.xml

This assumes you have a link from your local user home dir to the /etc/mythtv config dir

 root@ltsp-server-chroot:/# ln -s /etc/mythtv/config.xml /home/mythltsp/.mythtv/config.xml
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch=i386

Reboot the LTSP client

This time, mythtv frontend should connect to the backend.

Enable auto login

 root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/i386/lts.conf


Script.png /var/lib/tftpboot/ltsp/i386/lts.conf
[Default]
# Auto Login
LDM_AUTOLOGIN = True
LOCAL_APPS = True
LDM_SESSION = "lightdm-gtk-greeter"
#Disable screen going blank after a few mintutes
X_BLANKING=0

[192.168.1.150]
LDM_USERNAME = mythltsp
LDM_PASSWORD = mythltsp

Reboot the LTSP client

This time, mythtv frontend should automatically login.

End of 32 bit LTSP Client Intructions

Start of 64 bit LTSP Client Instructions

Create the initial client image

 root@ltsp-server:~# ltsp-build-client --arch amd64

Boot the LTSP client

Try to login, if you get an error that gnome failed to load

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# mount -t proc proc /proc
 root@ltsp-server-chroot:/# apt-get install gnome
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch amd64

Reboot the LTSP client

Client boots and can now login. MythTV is not installed

Update repositories the client can use

 root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/amd64/etc/apt/sources.list
 root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/amd64/etc/apt/sources.list.d/

Install MythTV Frontend

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get update
 root@ltsp-server-chroot:/# apt-get install mythtv-frontend
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch amd64

Reboot the LTSP client

This time mythtv frontend will be available

Now configure LTSP Client

Update the settings for your backend, DBHostName and DBPassword will have to be changed.

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# vi /etc/mythtv/config.xml

This assumes you have a link from your local user home dir to the /etc/mythtv config dir

 root@ltsp-server-chroot:/# ln -s /etc/mythtv/config.xml /home/mythltsp/.mythtv/config.xml
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch amd64

Reboot the LTSP client

This time, mythtv frontend should connect to the backend.

Enable auto login

 root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/amd64/lts.conf


Script.png /var/lib/tftpboot/ltsp/amd64/lts.conf
[Default]
# Auto Login
LDM_AUTOLOGIN = True
LOCAL_APPS = True
LDM_SESSION = "lightdm-gtk-greeter"
#Disable screen going blank after a few mintutes
X_BLANKING=0

[192.168.1.150]
LDM_USERNAME = mythltsp
LDM_PASSWORD = mythltsp

Reboot the LTSP client

This time, mythtv frontend should automatically login.

Optional: Install NVIDIA drivers

Note: if your main LTSP server is 64 bit and your LTSP client is also 64 bit this step will work. If your LTSP client is 32 bit you will need to work out how to install the 32 bit version of the nvidia driver.

 root@ltsp-server:~# ltsp-chroot

You must mount proc or you will get errors when you install the nvidia drivers

 root@ltsp-server-chroot:/# mount -t proc proc /proc
 root@ltsp-server-chroot:/# apt-get install linux-headers-`uname -r`
 root@ltsp-server-chroot:/# apt-get install nvidia-current nvidia-settings
 root@ltsp-server-chroot:/# nvidia-xconfig

Reboot the LTSP client

This time, the LTSP client should be using the NVIDIA drivers. If you can't see the edges of your screen, you have a condition called "overscan".

Edit /etc/X11/xorg.conf

Add this to the bottom of the "Screen" section. (The ViewPortOut section changes the resoluion sent to your screen. You may need to adjust these numbers for your screen)

   Option         "metamodes" "DFP-0: nvidia-auto-select +0+0,DFP-1: 1920x1080 { ViewPortIn=1920x1080, ViewPortOut=1820x1020+45+30 }"
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch amd64

Reboot the LTSP client

You should now see the full menus around the edges of your screen.

End of 64 bit LTSP Client Instructions

Make MythTV Frontend Automatically Start

 root@ltsp-server:~# su - mythltsp
 $ cd .config
 $ mkdir autostart
 $ cd autostart
 $ vi mythfrontend.desktop


Script.png mythfrontend.desktop
[Desktop Entry]
Type=Application
Exec=/usr/bin/mythfrontend
Hidden=false
NoDisplay=false
Name=mythTV frontend
Comment=Record, playback and watch TV.

Troubleshooting

Make MythTV use the full screen when it launches

There is a known issue with mythtv launching and not using the full screen. A Compiz bug that was reported here:

 http://code.mythtv.org/trac/ticket/9589

Run these commands to implement a fix

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get install compizconfig-settings-manager
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch=i386

or

 root@ltsp-server:~# ltsp-update-image --arch amd64

Reboot the LTSP client

After the LTSP client has booted, login using the mythltsp user

Run the ccsm tool.

  1. Under CompizConfig Settings Manager, go to "Utility"
  2. Go to "Work arounds"
  3. Check "Legacy Full Screen" support.

Create a new image

 root@ltsp-server:~# ltsp-update-image

Reboot the LTSP client

Mythtv frontend should now use the full screen.

Maintenance Updates

Kernel Updates

If you apply a kernel update to your LTSP server you need to run this command to update your client

 root@ltsp-server:~# ltsp-update-kernels

Create a new image

 root@ltsp-server:~# ltsp-update-image

MythTV Minor Updates

e.g. This means upgrade from 0.25.1 to 0.25.2

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get update
 root@ltsp-server-chroot:/# apt-get upgrade mythtv-frontend

Create a new image

 root@ltsp-server:~# ltsp-update-image

MythTV Major Updates

This means upgrading a full release. ie, from 0.25 to 0.26

On your LTSP server upgrade mythtv as "normal". For mythbuntu based systems use the Mythbuntu Control Center.

After you confirm your upgrade was successful update your client

Update repositories the client can use

 root@ltsp-server:~# ltsp-chroot

For a 64 bit client

 root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/amd64/etc/apt/sources.list
 root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/amd64/etc/apt/sources.list.d/

For a 32 bit client

 root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list
 root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/i386/etc/apt/sources.list.d/

Upgrade the frontend

 root@ltsp-server-chroot:/# apt-get update
 root@ltsp-server-chroot:/# apt-get upgrade mythtv-frontend

Create a new image

 root@ltsp-server:~# ltsp-update-image

General OS Patch Updates

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get update
 root@ltsp-server-chroot:/# apt-get upgrade

Create a new image

 root@ltsp-server:~# ltsp-update-image