KuroBox HOWTO



This HOWTO describes how to get the KuroBox/HG to act as a boot server and nfs server for the Hauppauge MediaMVP version running mvpmc. Note that this procedure may "brick" your KuroBox and render it useless. Once completed, your Hauppauge MediaMVP should be able to play videos, audio files, and jpegs using the mvpmc File Browser menu. Special thanks to the authors of the hxhowto.

I use the Sylver Linux distribution on my KuroBox/HG with a Hauppauge MediaMVP H3 version 2.05 firmware and mvpmc 0.3.3. Your Mileage May Vary.



Installing the servers



DHCP Server

If you already have a DHCP server running on your network, this step may not be necessary. However, I prefer to run my DHCP server on my KuroBox/HG. I have had success compiling and installing, and running the ISC DHCP Server. You will the need to create an /etc/dhcpd.conf file that looks something like this:
# dhcpd.conf
#
# Configuration file for ISC dhcpd (see 'man dhcpd.conf')
#
# In this example, the kurobox has an IP address of 192.168.1.3
#
ddns-update-style none;
 
option routers 192.168.1.1;
option domain-name "home.net"; # optional
# replace with actual IP addresses of your Domain
# Name Servers (DNS). Notice that I am using my kurobox as
# a DNS as well
option domain-name-servers 192.168.1.3, 10.1.1.2;
 
# for non fixed address clients
subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.100 192.168.1.200;
}
 
# some desktop PC if you have one
host desktop {
  # the mac address belowe should be replaced with the
  # actual mac address of your desktop
  hardware ethernet 00:01:02:03:04:05;
  fixed-address 192.168.1.10;
}
 
 
group {
# IP address of your TFTP server which in our case
# will also be the kurobox. Note that this line
# may be optional with MediaMVP firmware 2.05
next-server 192.168.1.3;
 
host mediamvp {
  # replace with actual mac address on your MediaMVP
  # which is on the bottom of your device.
  hardware ethernet 00:09:08:07:06:07;
  fixed-address 192.168.1.15;
 
  filename "dongle.bin";
 
}
}
Note that for the above example, the Hauppauge MediaMVP will have an IP address of 192.168.1.15 and the IP address of the KuroBox/HG is 192.168.1.3. We will then need to create a startup script named dhcpd in the /etc/init.d directory. The dhcpd startup script should look something like this:
#!/bin/sh
 
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
# Avoid using root TMPDIR
unset TMPDIR
 
# Check that dhcpd.conf exists.
[ -f /etc/dhcpd.conf ] || exit 0
 
 
start() {
 
        if [ -f /usr/sbin/dhcpd ]; then
                echo "Starting the ISC DHCP server"
                /usr/sbin/dhcpd eth0
        fi
}
 
 
stop() {
 
        if [ -f /var/run/dhcpd.pid ]; then
                PID=`cat /var/run/dhcpd.pid`
                if [ -d /proc/$PID ]; then
                        echo "Stopping the ISC DHCP server"
                        kill $PID
                fi
        fi
 
}
 
case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                stop
                sleep 1
                start
                ;;
        *)
          echo "Usage: /etc/init.d/dhcpd {start|stop|restart}" >&2
          exit 1
          ;;
esac
Don't forget to do a chmod +x /etc/init.d/dhcpd command after creating the script. In order to to insure that the DHCP server starts at boot time, create the following soft links in the /etc/rc.d directory:
  • ln -s /etc/init.d/dhcpd rc0.d/K202dhcpd
  • ln -s /etc/init.d/dhcpd rc2.d/S202dhcpd
  • ln -s /etc/init.d/dhcpd rc6.d/K202dhcpd



TFTP server

I use the tftp server aftp and I grabbed the source from here. After compiling and installing the source, you need to make a /tftpboot directory and be sure that aftp can access it. For example:
  • mkdir /tftpboot
  • chmod 777 /tftpboot

The tftpd server can be started using the following commands:

  • /usr/local/sbin/atftpd --daemon --port 16869 --retry-timeout 120 \
    • --mcast-port 1758 --mcast-addr 192.168.1.0-255 --mcast-ttl 2 \
    • --maxthread 100 --verbose=7 /tftpboot

  • /usr/local/sbin/atftpd --daemon --port 69 /tftpboot

Note that for the above example, the IP address of the KuroBox/HG is 192.168.1.3.

NFS Server

By default, the Sylver distribution comes with and NFS version 2 user-space server. However, this limits us to files of less than 2GB. Since most movies are larger than 2GB, we need a version 3 NFS user-space server. I use unfs3. Download the unfs3 source, decompress it using the tar -xvzf command, build and install it. In order to start the server at boot time, we need to modify the /etc/init.d/nfs-user-server file:
  • copy /etc/init.d/nfs-user-server to /etc/init.d/nfs-user-server.dist using the cp command so that we have a backup in case any mistakes are made.
  • Remove all lines relating to rpc.mountd.
  • Replace all instances of /usr/sbin/rpc.nfsd with /usr/local/sbin/unfsd.
You will then need to export some directories. I export my SlimServer (I still use version 6.0.2), Gallery 1.5, and a directory containing my videos. Here is a sample /etc/exports file:
/mnt/share/video (ro,insecure,all_squash)
/mnt/share/slimserver (ro,insecure,all_squash)
/mnt/www/gallery1.5  (ro,insecure,all_squash)

You should then test your NFS startup files in /etc/init.d (nfs-common, nfs-user-server and portmap) by starting and stopping them manually and see if any errors occur. See here for more info. The rpcinfo -p command may also be useful. Once you are sure that everything is working correctly, you can re-boot your KuroBox/HG. Note that unfs3 does not support NFS version 2 protocol. If you have a client that needs NFS version 2, this solution is not for you.

Relay Service

Flash based MVPs will also require the installation of a relay service.

Summary

To summarize, besides a DHCP server, the following servers must be started with the following commands in order for your MVP to boot:
  • /usr/local/sbin/atftpd --daemon --port 16869 --retry-timeout 120 \
    • --mcast-port 1758 --mcast-addr 192.168.1.0-255 --mcast-ttl 2 \
    • --maxthread 100 --verbose=7 /tftpboot

  • /usr/local/sbin/atftpd --daemon --port 69 /tftpboot

  • /usr/local/sbin/mvprelay 16881 5906 6337 192.168.1.3 &

Note that for the above example, the IP address of the KuroBox/HG is 192.168.1.3.

Of course, it order for your MVP to boot, we will need to populate the KuroBox/HG /tftpboot directory as well.



Populating the /tftpboot directory

Download an mvpmc image by clicking here. I currently use .mvpmc 0.3.3. Rename dongle.bin.mvpmc-0.3.3 to dongle.bin and move it to the /tftpboot directory on the KuroBox/HG. Create a dongle.bin.ver file by going to the /tftpboot directory on the KuroBox/HG and issuing the following command:
  • dd if=/tftpboot/dongle.bin of=/tftpboot/dongle.bin.ver bs=1 count=40 skip=52
We next need to create a dongle.bin.config file in the /tftpboot directory in order to configure mvpmc and its environment. Here is an example:
# set the timezone. My timezone is US Pacific time.
export TZ=PST+8PDT,M3.2.0/2,M11.1.0/2
echo "TZ=PST+8PDT,M3.2.0/2,M11.1.0/2" > /etc/shell.config
#
# get the correct time
ntpclient -s -h pool.ntp.org
#
# create the directory structure that you will use for
# file browsing
mkdir /kurobox
mkdir /kurobox/video
mkdir /kurobox/audio
mkdir /kurobox/photos
#
# mount the directories previously exported via the kurobox
mount -t nfs -o nolock,tcp,rsize=4096,wsize=4096,vers=v3 \
    192.168.1.3:/mnt/share/video /kurobox/video
mount -t nfs -o nolock,tcp,rsize=4096,wsize=4096,vers=v3 \
    192.168.1.3:/mnt/share/slimserver /kurobox/audio
mount -t nfs -o nolock,tcp,rsize=4096,wsize=4096,vers=v3 \
    192.168.1.3:/mnt/www/gallery1.5 /kurobox/photos
#
# start up mvpc with a nice theme and no web interface
mvpmc -t /usr/share/mvpmc/replaytv.xml --web-port 0 \
    --startup filesystem:file=/kurobox &
Note that for the above example, the IP address of the KuroBox/HG is 192.168.1.3. You should now have a dongle.bin, dongle.bin.ver and a dongle.bin.config file in the KuroBox/HG /tftpboot directory. Make sure that the tftpserver can read the files by issuing the following command in the KuroBox/HG /tftpboot directory:
  • chmod 666 *
You should now be able to connect power to your Hauppauge MediaMVP and use it!

Adding Content

Please click here for help on adding content to your KuroBox/HG.