Sunday, March 3, 2013

Installing the latest manual version of TVMOBiLi on Western Digital Mybook Live

If you tried to follow the instructions in my last entry about installing TVMOBiLi on your MyBookLive NAS you may have encountered a small problem. The latest .deb package is not an universal package anymore and doesn't include support for PowerPC, which is needed for the MyBookLive.

However it's very easy to install the manual package, which does have the PowerPC binaries included. To do this, download the file that says LINUX MANUAL INSTALL from the Devices section on the TVMOBiLi download page. Save it to the Public folder and then replace Step 7 from my previous post with the following commands:

Change to the Public folder and look for the downloaded file:

MyBookLive:~# cd /shares/Public/

Look for the downloaded file:

MyBookLive:/shares/Public# ls -l

You should see the .tar.gz file:

-rw-rw-r--  1 nobody              share 11278704 Mar  3 12:33 tvmobili-all-universal.tar.gz

You can install the package anywhere in the system, but I suggest putting in /shares/. This way, it's not touched by firmware updates, but it's still out of the Public folder so it doesn't show up when you're browsing the drive and delete it or modify it by mistake.

To do so, change back to the /shares/ folder:

MyBookLive:~# cd /shares/

and extract the archive:

MyBookLive:/shares# tar xzvf /shares/Public/tvmobili-all-universal.tar.gz

You will see a bunch of files that are extracted into a folder called tvmobili:


tvmobili/
tvmobili/usr/
tvmobili/usr/local/
tvmobili/usr/local/bin/
tvmobili/usr/local/bin/tvmobilisvcd_arm_g234
tvmobili/usr/local/bin/tvmobilisvcd_arm_g250

Once finished, change to the tvmobili folder:

MyBookLive:/shares# cd tvmobili

First, create the log folder:

MyBookLive:/shares/tvmobili# mkdir -p var/log/tvmobili

Next, create a symlink to the powerpc binary:

MyBookLive:/shares/tvmobili# cd usr/local/bin/
MyBookLive:/shares/tvmobili/usr/local/bin# ln -s tvmobilisvcd_ppc_g250 tvmobilisvcd

Make sure the symlink was created right:

MyBookLive:/shares/tvmobili/usr/local/bin# ls -l 
total 32768
lrwxrwxrwx 1 root root      21 Feb 24 19:47 tvmobilisvcd -> tvmobilisvcd_ppc_g250
-rwxr-xr-x 1 root root 5519557 Jan 30 18:38 tvmobilisvcd_arm_g234
-rwxr-xr-x 1 root root 4215885 Jan 30 18:38 tvmobilisvcd_arm_g250
-rwxr-xr-x 1 root root 8788267 Jan 30 18:38 tvmobilisvcd_arm_u000
-rwxr-xr-x 1 root root 5330673 Jan 30 18:38 tvmobilisvcd_i386_g2110
-rwxr-xr-x 1 root root 5327519 Jan 30 18:38 tvmobilisvcd_i386_g236
-rwxr-xr-x 1 root root 4095789 Jan 30 18:38 tvmobilisvcd_ppc_g250

Go to the config directory:

MyBookLive:/shares/tvmobili/usr/local/bin# cd /shares/tvmobili/etc/tvmobili/conf/

Copy the default config file:

MyBookLive:/shares/tvmobili/etc/tvmobili/conf# cp tvMobiliService.conf.notlimited tvMobiliService.conf

Edit the file using vi or pico if you're not familiar with vi:

MyBookLive:/shares/tvmobili/etc/tvmobili/conf# vi tvMobiliService.conf
or 
MyBookLive:/shares/tvmobili/etc/tvmobili/conf# pico tvMobiliService.conf

and change the line that says:

WebServerRoot=/etc/tvmobili/www
to
WebServerRoot=/shares/tvmobili/etc/tvmobili/www

Change to the init directory:

MyBookLive:/shares/tvmobili/etc/tvmobili/conf# cd /shares/tvmobili/etc/init.d/

Edit the init file with vi or pico:

MyBookLive:/shares/tvmobili/etc/init.d# vi tvmobilisvcd.init
or
MyBookLive:/shares/tvmobili/etc/init.d# pico tvmobilisvcd.init

Change the line that says:

INSTALLROOT=
to
INSTALLROOT=/shares/tvmobili

Change to the system init directory:

MyBookLive:/shares/tvmobili/etc/init.d# cd /etc/init.d/

Create a symlink to the tvmobili.init file:

MyBookLive:/etc/init.d# ln -s /shares/tvmobili/etc/init.d/tvmobilisvcd.init .

Make sure it was created right:

MyBookLive:/etc/init.d# ls -l tvmobilisvcd.init 
lrwxrwxrwx 1 root root 45 Mar  3 13:21 tvmobilisvcd.init -> /shares/tvmobili/etc/init.d/tvmobilisvcd.init

And finally create the stop/start links (never mind the warning):

MyBookLive:/etc/init.d# update-rc.d tvmobilisvcd.init defaults
update-rc.d: warning: /etc/init.d/tvmobilisvcd.init missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 Adding system startup for /etc/init.d/tvmobilisvcd.init ...
   /etc/rc0.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc1.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc6.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc2.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc3.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc4.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc5.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init

To start TVMOBiLi either reboot the drive or run:

MyBookLive:/etc/init.d# /etc/init.d/tvmobilisvcd.init start
Starting TVMOBiLi server

That's it. Continue with Step 8 to configure TVMOBiLi and enjoy.

After a firmware update, all you have to do is recreate the symlink in the /etc/init.d directory and run update-rc.d again to enable TVMOBiLi again:


MyBookLive:~# cd /etc/init.d/
MyBookLive:/etc/init.d# ln -s /shares/tvmobili/etc/init.d/tvmobilisvcd.init .
MyBookLive:/etc/init.d# update-rc.d tvmobilisvcd.init defaults
update-rc.d: warning: /etc/init.d/tvmobilisvcd.init missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 Adding system startup for /etc/init.d/tvmobilisvcd.init ...
   /etc/rc0.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc1.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc6.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc2.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc3.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc4.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc5.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
MyBookLive:/etc/init.d# /etc/init.d/tvmobilisvcd.init start
Starting TVMOBiLi server