Skip navigation.

Create a diskless ubuntu (dapper) with a mythtv client on AMD 64bit

I have an AMD64 AM2 sockel Asus Pundit that I want to use as a diskless client with mythtv frontend. I'm quite curiouse about the performans gain with 64 bit platform, I don't think mythtv has any 64 bit optimisations yet but other programs might have. I will first install the system on a small spare disk (20G) and when I'm satisfied with the configuration I will move it to the server and setup a PXE boot.

  • Install ubuntu dapper
  • Prepare mythtv build environment
  • Build mythtv, plugins and themes
  • Install other programs
  • Configure mythtv

1 - Install ubuntu Dapper

Check the ubuntu download page (http://www.ubuntu.com/download) and download version you want (I downloaded ubuntu-6.06.1-desktop-amd64.iso. I created an CD rom with this version and installed the version on my ASUS Pundit. I did the following selections.

Click on the install icon
I select
* My language
* My Timezone
* My keyboard layout
* Name: mythtv
user: mythtv
password: ******
computername: pandora
* I configure to use the whole disk

Reboot and login as mythtv user.
Start a terminal windows.

Prepare mythtv build environment as described in this guide

Build mythtv as described in this guide

Configure platform for mythtv

Make sure that you have the right graphical device driver.
I have a nvidia card.

sudo apt-get install nvidia-glx
sudo nvidia-glx-config enable
sudo nvidia-glx-config enable

Configure X, select nvidia

sudo dpkg-reconfigure -phigh xserver-xorg

Restart X (ctrl+alt+backspace)
To get mp3 install gstreamer "ugly" plugins

sudo apt-get install gstreamer0.10-plugins-ugly

Install xine, vlc or mplayer

sudo apt-get install xine-ui
sudo apt-get install vlc
sudo apt-get install mplayer

Install support for WMA, AVI and DivX, only on i386 plattform, you have to search for it.

cd /opt/src
wget newaddress/w32codecs_20050412-0unofficialubuntu2_i386.deb
dpkg -i w32codecs_20050412-0unofficialubuntu2_i386.deb

Configure mythtv

Update your $HOME/.mythtv/mysql.txt (database settings) or /etc/mysql.txt (global database settings)

Move installation to server for nfs boot

When you is satisfied with the client setup it's time to move the system to a server.
Before we can copy the system to the server we need to prepare a small directory structure, all the files provided by TFTP usually reside in a directoru /tftpboot, we first create one in /tmp.

mkdir -p /tmp/tftpboot/pxelinux.cfg
mkdir /tmp/tftpboot/ubuntu-dapper

To copy the PXE boot image we first need to install the syslinux package.

sudo apt-get install syslinux
sudo cp /usr/lib/syslinux/pxelinux.0 /tmp/tftpboot

Let's find which Linux kernel version we have and copy it to /tmp/tftpboot/ubuntu-dapper directory. Type the kernel or use uname -r.

ls -ltr /boot/vmlinuz-*
uname -r
cp /boot/vmlinuz-`uname -r` /tmp/tftpboot/ubuntu-dapper

The Linux kernel no longer provides support for a root filing system, it has to be implemented in user space. This is a relatively standard procedure and uses an "initial root disk" or initrd image. We have to create a new image that supports network booting. First we duplicate the initramfs configuration.

sudo cp -Rp /etc/mkinitramfs /etc/mkinitramfs-pxe

Modify /etc/mkinitramfs-pxe/initramfs.conf to change BOOT=local to BOOT=nfs

#
# BOOT: [ local | nfs ]
#
# local - Boot off of local media (harddrive, USB stick).
#
# nfs - Boot using an NFS drive as the root of the drive.
#

BOOT=nfs

Create a new initramfs image, replace the version numbers as appropriate.
Type the version or use uname -r.

sudo mkinitramfs -d /etc/mkinitramfs-pxe -o /tmp/tftpboot/ubuntu-dapper/initrd.img-`uname -r` `uname -r`

Finally create a PXE configuration file, (Ctrl+D) escapes cat. For my system:

cat > /tmp/tftpboot/pxelinux.cfg/default
LABEL ubuntu
kernel ubuntu-dapper/vmlinuz-2.6.15-26-amd64-generic
append root=/dev/nfs nfsroot=10.0.0.6:/nfsroot/pandora ip=dhcp
initrd=ubuntu-dapper/initrd.img-2.6.15-26-amd64 rw --
PROMPT 1
TIMEOUT 0