The Ultimate MythTV Setup Guide - Part 2, Operating System Configuration


Installation

Now that we've got our hardware set up correctly, it's time to install our operating system. There are many, many Linux distributions out there, but the one I've picked for my backend is openSUSE 12.2, which you can download here. You'll see that there are several versions and download methods available. I'd suggest using the 4.7GB 32-bit DVD ISO file, as I've had issues in the past with 64-bit graphics drivers, which we'll be relying on to provide the necessary video playback acceleration. Fortunately, unlike most versions of Windows, SUSE Linux provides support in the default kernel for Physical Address Extensions, allowing your 32-bit operating system to utilise more than 4GB of RAM. This means that running your backend with 8 or even 16GB of RAM won't be a problem even with the 32-bit version of SUSE.

Once you've downloaded the ISO and burnt it to disc, you can go ahead and boot from it. You'll see an option on the boot screen labelled "Installation". Selecting it will start the install procedure.

Just a side note on languages: if you're in Australia like me, you should select English (UK) as the installation language, but you'll need to change your keyboard layout back to English (US) because if you don't, pressing the hash sign on your keyboard (shift-3) will produce a pound symbol (£).

After selecting your language, the system will attempt to detect your existing hard disk configuration. If your disks previously had a file system on them and haven't been blanked (or "zeroed"), it's possible that the system might lock up at the partition detection phase. So if you haven't wiped your disks prior to starting the install, you should probably do that first, providing you've saved any important data that was on them previously.

After the detection has finished, you'll be able to set the installation mode. In this case, you'll need to select "New installation", but be sure to untick "Use Automatic Configuration". You'll then be able to choose your timezone and set up an NTP server by clicking "Change..." next to the current time. Make sure "Synchronise with NTP Server" is selected, at which point you can enter the address of the NTP server with which your system will communicate. Several preset options are provided, but being in Australia, I chose "0.au.pool.ntp.org", as provided by the NTP Pool Project.If you are not in Australia, you can find a complete list of regional servers on their site as well. Once you have entered the address of the NTP server you want to use, click "Accept". Then, after setting your time zone, you should choose the "KDE Desktop" as your preferred desktop environment.

That's all pretty easy so far, but now comes the important part - partitioning. The installer will suggest what it thinks is an appropriate partition scheme for you. Since we've got 3 hard disks in the system, and the installer doesn't know that we want to use a RAID, it's suggestion won't be particularly helpful. Instead, we'll discard it and create a partitioning scheme from scratch. Click on the "Create Partition Setup..." button, and then select "Custom Partitioning (for experts)". The YaST Expert Partitioner will load and allow you to configure your drives. Fortunately, openSUSE provides good documentation on using their partitioning tool, so instead of describing how to set up your drives in detail, I'll simply supply an overview. You can read the appropriate section of the documentation here.

On your first (presumably smaller) drive, you should create two primary partitions - a 4GB partition to be used as a swap partition, and a second partition which takes up the rest of the drive, to be formatted as ext4, and mounted as the root partition ( / ). Do not create a separate home partition for SUSE, as it has a tendency to fill up /tmp and thereby force systems with small root partitions to cease operating normally. You should also create a single primary partition on each of your two "storage" drives, taking up the entire capacity of each drive, but do not format them. Instead, set their type to "Linux RAID" and then create a mirrored array (RAID 1) formatted as ext4, and mount that at /storage. In the past I would have recommended using JFS as the filesystem for your storage array due to ext3's long delete times for large files, but ext4 seems to have mostly rectified that problem. Note: do not try to use /media as the mount point for your storage location as this is reserved for removable devices such as USB thumb drives and optical discs.

Next up you'll be prompted to create your first user account. You could use any username you want, but I'd suggest the following: User's Full Name - "MythTV", Username - "mythtv", Password - something strong, but memorable (make sure you write it down just in case though). I'd also de-select "Use this password for system administrator" as, unlike Ubuntu, SUSE sets the root account to active by default. Also, make sure that "Automatic login" is left enabled. After clicking "Next", you'll be prompted to create a password for the root user. Once again, you should choose a strong password, but don't forget to write it down. Note that the installer may warn you if it doesn't consider the password you chose to be strong enough.

Finally, you'll be shown the "Installation Settings" screen - a summary of actions to be taken as part of the installation process. There are a few changes you'll need to make prior to confirming the installation however. First, you should enable boot from MBR (Master Boot Record), and also disable boot from root ( / ) partition. There are clickable check boxes to perform these actions under the "Booting" sub-heading. Secondly, you'll need to click on the "Software" link, and then the "Details..." button in order to customise the software that will be included as part of your installation. I'd suggest you de-select all the various "Games" packages, as they won't be much use as part of a MythTV install, and then use the "Search" tab to select the following packages if they aren't already ticked:

  • gcc
  • gcc-c++
  • kernel-docs
  • kernel-firmware
  • kernel-syms
  • dvb
  • lirc
  • lirc-remotes
  • mysql-community-server

Also note that some of the packages in the preceeding list may be automatically selected depending on the order in which you enable them. Once you have made the relevant changes, you can click "Accept" and then "Continue", and if you are sure everything is set correctly, you can click "Install" to proceed.

The first phase of the installation should complete without incident, and the system will then reboot and start the second phase. If at this point you see "funny lines" or video corruption, do not worry as this is a known issue with some video cards. Simply hit the reset button on your machine and the system will start the second installation phase normally. You will be asked to choose a host name for the backend, which will be useful if you are running some kind of internal DNS on your network. Regardless, enter some kind of sensible host name and domain name - in my case, I chose "mythbox" for the host name and "nanoscale.site" for the domain. Just be sure not to use ".local" as your domain extension, as this is reserved for use by Microsoft's mDNS system. I'd also recommend de-selecting "Change Hostname via DHCP" and selecting "Assign Hostname to Loopback IP"

The next screen allows you to modify your network configuration. At the very least, you should probably disable IPv6. You should also find that your system's network adapter is shown as "Configured with DHCP" if you've had it plugged in, but if it is not, you can click on "Network Interfaces" to configure a static IP address. Keep in mind that your system will need a static IP later, but an address assigned by DHCP will suffice for the time being.

If you have previously plugged in your network adapter, you'll be asked to test your connection to the Internet. You should skip this step, and also skip updating your system if prompted to do so. Lastly, you'll see the latest release notes, and a hardware configuration screen. You'll need to disable PulseAudio here, as the current release of MythTV still does not work reliably with it. You can do this by editing your sound configuration, clicking on the "Other" button in the bottom right corner and selecting "PulseAudio Configuration". Untick the box labelled "Enable PulseAudio Support". Click "OK" to save the configuration change and then click "Next" and "Finish". Once this is complete, your system will boot into KDE for the first time.


Configuration

After KDE has loaded, the first thing you'll likely want to do is modify the default desktop settings to your tastes. For example, I usually increase the size of the taskbar to 48 pixels in height, change the desktop layout to "Folder View", set the desktop icons to "Align to Grid" and enable double-click with the mouse, but really you can set the desktop to whatever you feel most comfortable with. Having said that, I'd still at least increase the size of the taskbar just in case you have a TV that overscans (more on that later, but it basically means that it cuts off the edges of the picture).

After you've finished fiddling with KDE's appearance, there are also a few other changes you'll need to make to ensure the smooth operation of your system as a dedicated media box. To do this, click on the KMenu button (SUSE's "Start Menu" if you aren't sure what KMenu is) in the bottom left corner of your screen. Then click on the icon labelled "System Settings". Firstly, you should change KDE's session management settings to always start with an empty session instead of resuming a previous one. You can do this by clicking on the icon labelled "Startup and Shutdown" on the bottom row. You should probably also change the default leave option to either turn off or restart the computer instead of just logging you out. Secondly, you must de-select "Enable desktop effects at startup", as i have seen this setting severely impact the performance of high-motion video. You can find it by clicking on the icon labelled "Desktop Effects". Thirdly, you should de-activate KDE's screen saver from within the "Display and Monitor" sub-section, and also de-select "Dim Display" and "Screen Energy Saving" in the "Power Management" section of the system settings tool. If you don't, your TV show or movie may be interrupted due to a lack of user input while watching. You'll also need to check that audio playback is properly configured for your system. If you've disabled PulseAudio as suggested earlier, you can click on the volume icon in your system tray and then click on "Mixer". If shown, ensure that the "PCM" slider is all the way to the top, and that, if you have more than one audio card, you choose the correct one as your preferred playback device through the "Audio Setup" menu under "Settings".

With that out of the way, you'll now need to load YaST - SUSE's system administration tool. You can find it in KMenu under "Applications", "System" and then "Control Centre". Note that you'll be asked to supply the root password when starting the application for the first time in a given session. You should then click on "Software Repositories". This part of YaST allows you to set up the sources you'll be downloading software from. Just a warning that you may see a notification at this point that indicates "KPackageKit" is still running, with an option to ask it to quit. This is displayed whenever the desktop environment's native package management tool, Apper, is updating its database of available software in the background. If you see this message, it is probably best to simply abort the software repository configuration and try again 30 or so minutes later when KPackageKit has finished its refresh. Once that notification is no longer displayed (or you never saw it in the first place), you can then make the following changes to the listed repositories:

  • Disable the cd repository (it's the one with cd:/// in the URL).
  • Click on "Add" and then "Community Repositories" (this option will only appear if your network connection is active).
  • Select the Packman, libdvdcss and nVidia graphics drivers repositories (assuming you're using nVidia hardware as outlined in part 1). Then click "OK".
  • Choose to trust any new certificates when you are prompted to do so, and press "OK" once the repositories have been added.

With your repositories set up, the repository configuration window will close and take you back to the main YaST menu. You'll then need to click on the icon labelled "Online Update". This will initiate a repository refresh and show the list of available updates. You can simply click "Accept" and follow the prompts to update your system - you do not need to click on the de-selected updates as they will be automatically enabled for download after the software management packages themselves are updated. You will need to reboot your system at the end of this process, as a new kernel will have been supplied in addition to the other updates.

Once your system has rebooted, you'll finally be able to install the additional packages needed to get MythTV up and running. Start YaST once again, and this time click on the icon labelled "Software Management". You should then use the search function to install the following list of software, but keep in mind that you may be warned about package conflicts at several points. If this happens, always select the "replacement" option.

  • libdvdcss2
  • libdvdnav4
  • libdvdplay0
  • mjpegtools (be sure to click on the versions tab below the package list and select the one provided by the Packman repository)
  • libxine2-codecs
  • libxine2 (click on the versions tab like before and select the one provided by the Packman repository)
  • w32codec-all
  • x11-video-nvidiaG02 (used for cards newer than the Geforce 6000 series. You will only need to select this if it isn't automatically selected)
  • vdpau-video
  • mysql-community-server-tools
  • mythtv-0_26-backend
  • mythtv-0_26-docs
  • mythtv-0_26-frontend
  • mythtv-0_26-setup
  • mytharchive-0_26
  • mythbrowser-0_26
  • mythgallery-0_26
  • mythmusic-0_26
  • mythnews-0_26
  • mythweather-0_26
  • perl-MythTV-0_26
  • python-MythTV-0_26

Click "Accept" and then "Continue" to start the download and install process for the selected software. After this is complete, you should once again reboot the machine in order to start using the newly installed proprietary graphics drivers.

Now that you've installed the necessary software, there a a few more simple steps you should take to finish setting up SUSE as a suitable MythTV backend. The first of these is to enable the MySQL service to run at startup. To do this, you should start YaST and then click on the icon labelled "System Services (Runlevel)". Find the entry titled "mysql". After highlighting it, click "Enable". Once the process of enabling the service is complete, you should receive a message stating that the initialisation command "returned 0 (success)". You can then click "OK" and then "OK" in the bottom right corner, at which point you will be prompted to save your changes. Click "Yes" and this step will be complete.

Secondly, you'll need to set a static IP address for your MythTV backend (assuming you didn't set one earlier). Although you can continue to rely on DHCP to automatically assign an IP address for your machine at startup, MythTV will behave much more reliably if you set a fixed IP and host name. You can do this by clicking on the "Network Settings" icon in YaST. You should then select your network adapter and click "Edit", at which point you will be able to change the adapter's behaviour to use a "Statically assigned IP address", and enter an IP address and subnet mask. The "Hostname" field should be automatically filled in using the value you set during system install. You will also need to click on the "Hostname/DNS" tab and enter your preferred DNS server addresses, as well as select "Assign Hostname to Loopback IP". Additionally, you should click on the "Routing" tab and assign your preferred gateway address, and choose the adapter that will use it (presumably eth0 if you're using a wired network). After modifying the IP address, you'll need to reboot the system, as the adapter may not come back up properly after the change.



This concludes part 2 of the Ultimate MythTV Setup Guide. When you're ready, and your system is behaving as expected, you should continue on to part 3 - Pre-launch Preparation. If you have any questions about part 2, please use the Contact page to let us know.

Alternatively, if you're not sure that your hardware is installed correctly, you can return to part 1.