DVArchive Installation

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
Kurobox on a ReplayTV


The purpose of this project is to have a place to archive TV shows recorded via ReplayTV and still be able to access them by browsing to the Kurobox from any ReplayTV on your LAN. I personally have this running on my LAN and it works flawlessly! Keep in mind, you will need at least an HG model for this to work reliably. A standard Kurobox will work with very mixed results.

The following set of instructions is assuming you will be starting from scratch on a Kurobox…let’s get started!

Install Debian

  • Follow steps spelled out here
  • Use the latest Kurobox Debian image from here (Be sure to select the correct download for your Kurobox [HG vs non-HG])

Install FTP

After Debian is installed it’s a good idea to install an ftp server. The Kurobox must have internet access at this time in order to install.

  • Switch to root
# su root
  • Install proftpd
# apt-get install proftpd
  • When asked if this should be in inetd mode or standalone mode, select inetd mode if there isn’t going to be a lot of ftp traffic.
  • Verify you can log into the Kurobox via FTP.

Install Key Packages

This will install some of the basic things to assist in making life a little easier when dealing with Debian.

  • Install Key Packages which can be found here

Install Java (1.4.2 or 1.5)

Java is needed in order for DVArchive to run. DVArchive 3.2 now supports Java 1.5. For those that are wondering if there are any benefits of 1.5 over 1.4.2 Java for DVArchive, this is what I was told.

"I don't think there is any specific Java 1.5 stuff coded in by gerry.

However you should benefit from the newer release of java through it's newer VM code. I've noticed my linux based servers respond faster through my replaytv menus since changing to java 1.5"

Install VNC

Installing this piece will give DVArchive a virtual frame buffer or “fake” screen which makes it think it’s running on a normal screen without actual video hardware.

The instructions talks about using ssh. I personally didn’t do step 8. Just wanted to get it running first and then if I need to can do that step later.

  • VNC viewer, I use TightVNC which seems to work well. To run the viewer (if using OS X), go to the shell prompt and type “java VncViewer HOST <ip address of the Kurobox> PORT 5901”. (Launch this from where VNCViewer.jar is located)

Install DVArchive

  • Copy the zip file to a folder called “dvarchive” in /home/ (or where ever you wish) and then unzip.

Script Files Needed

  • Create a text file called “startVNC-DVA” in whichever directory you wish. (I use the / directory).
# vi startVNC-DVA
  • startVNC-DVA should look like this:
. /etc/profile >/dev/null 2>&1 
cd /root 

# Clean up crashed VNC 
rm -f /tmp/.X11-unix/X* /tmp/.X1-lock 

export VNCDISPLAY=":1" 

echo "********* Start DVArchive/VNC @ `date` **********" >/tmp/vnc_dva.log 
nohup vncserver ${VNCDISPLAY} </dev/null >>/tmp/vnc_dva.log 2>&1 &
  • Save it and make this file executable.
# chmod +x startVNC-DVA
  • Now open $HOME/.vnc/xstartup in vi and adjust it so it look like this:
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
(cd /home/dvarchive ; ./startDVA ) &
x-window-manager &
  • Create “startDVA” in /home/dvarchive/ (cd /home/dvarchive then vi startDVA)
# cd /home/dvarchive
# vi startDVA
  • It should look like this:

/usr/bin/java –Xmx64m ./DVArchive.jar --store /home/dvarchive/DVArchive.xml $* >/tmp/dva_server.log 2>&1

The flag –Xmx64m tells it Java the maximum memory heap size to be used for DVArchive. The default is 31mb and is bit low. 64mb seems to work without DVArchive complaining about low memory.

Like the first startVNC-DVA file, make this executable as well

# chmod +x startDVA
  • Now we need to create a startup file (or rc.local) equivalent. Create a file called “local” in the /etc/init.d directory.
# cd /etc/init.d
#vi local
  • It should look like this:

/sbin/ifconfig eth0:1 
/sbin/route add host dev eth0:1

This is creating another network interface on eth0. Why? Well, DVArchive needs to use port 80 and port 80 is being used on the Kurobox. So we assign another IP to eth0 ( or any other open IP) and will assign DVArchive to use it since port 80 will be open for this new IP. In essence, the Kurobox will have 2 IP’s being used. Eth0 for all things Kuro and eth0:1 will be used specially for DVArchive purposes.

  • After saving the file "local" make it executable
# chmod +x local
  • Now we need to link up the newly created local file
# update-rc.d local defaults 80
  • Reboot the Kurobox for the new interface (eth0:1) to take effect.
  • Log back into the Kurobox and do a “ifconfig” to make sure you see the newly created eth0:1 listed with the correct IP that was designated.

Running DVArchive (the moment of truth)

  • Go to the directory where you created “startVNC-DVA” and launch it
# ./startVNC-DVA
  • Use the “top” command from the prompt. You should see a string of java processes running (you may need to stretch your telnet screen to see more processes). If not, something didn’t start correctly. Go into /tmp and check the log files to see what happened.
  • Go into your VNC client and connect up to the Kurobox. You should see DVArchive running and you will probably get some sort of license agreement screen. DVArchive will then ask where you wish to keep the video files. /mnt should be hda3 (the largest partition) so point it to /mnt. (I also created a “DVA” folder within /mnt so that DVArchive would save it’s files in /mnt/DVA)
  • Once DVArchive is up, you may notice that the “Server” indicator on the buttom right is red. If that’s the case, you need to manually tell DVArchive to use that second IP (eth0:1). Go into 'DVArchive Properties' under the 'File' menu. Go into the "Server" tab and click “Override IP Address”. Then make sure you select the secondary IP you configured. (in my case it’s
  • Click OK and you will need to restart DVArchive.
  • Close DVArchive from your VNC session
  • Disconnect your VNC client
  • From the telnet session, kill the vncserver session
# vncserver –kill :1
  • Relaunch startVNC-DVA
# ./startVNC-DVA
  • From DVArchive via VNC viewer, start copying video files to your DVA folder from your ReplayTV’s or other DVArchive sources.
  • Serve up shows to your ReplayTV’s and enjoy!


One could probably plug in an external USB drive into the Kurobox to expand the Replay library capacity even more. More details on how to prepare Debian for USB drives can be found here.