Tivo Hacks. 100 Industrial-strength Tips Tools 2003
Hack 56 Using the Same Filesystem
Rather than all this passing about of files back and forth between TiVo and your PC, mount an NFS share on your TiVo and access that networked partition as if it were local to your TiVo .
Rather than uploading MP3s [Hack #46] to your TiVo to play, or FTPing in to grab the latest version of that Now Playing List for incorporation into your web site [Hack #90], NFS-mount your PC's drive on your TiVo, and read and write files as if the drive were local to TiVo.
Just as we inserted a kernel module to give TiVo access to Closed Captioning [Hack #42], we can do the same to get network filesystem (NFS) support loaded into TiVo's OS. Download a copy of the kernel module (http://themurrays.homeip.net/downloads/tivo/for_tivo/nfs-kernelmod_tivo25-1.zip) and unzip it on your local PC. Upload the nfs-tivo25.o file contained therein to your TiVo and drop it into /var/hack/modules .
|
To activate the kernel extension, type the following at TiVo's Bash prompt:
bash-2.02# /sbin/insmod -f /var/hack/modules/nfs-25.o
You now have the ability to mount and talk to NFS servers on your network from your TiVo. Now, let's move on to the PC side of things.
Serving NFS from Windows
There are a plethora of NFS servers out there for Windows, but one of the more popular ones is the XLink NFS Server (http://www.xlink.com/eval.htm). It's a breeze to setup and get working with your TiVo.
Bring up the XLink NFS Server (see Figure 4-14), and click the New button to create a new mount point. The NFS Server Export tool shown in Figure 4-15 lets you configure and set up the directory for remote mounting.
Figure 4-14. The XLink NFS Server interface
Figure 4-15. The XLink NFS Server Export tool
Setting up security on an NFS mount can be a really tricky thing. But since you are supposed to be working behind your home network's firewall, we can just ignore all that. Give all clients read/write access to the directory. This will let the TiVo mount the directory, get files, and put files over the network.
Click OK. The new mount should show up in the main XLink NFS Server window (see Figure 4-16).
Figure 4-16. The XLink server exporting the "C:\Documents and Settings\r\Desktop\tv" directory
Serving NFS from Linux
There is no graphical tool to set up NFS mounts on Linux. On a Red Hat box, make sure that you have the nfs- utils RPM installed on your system; then edit your /etc/exports file, adding the directory that you wish to allow your TiVo to mount. Such a configuration directive should look something like this:
/tivodir tivo.homenetwork.net(rw,no_root_squash)
This command will export /tivodir over NFS, restricting access to only tivo.homenetwork.net . But when the TiVo does connect, it has full read/write access to that directory.
Restart nfs to export the NFS share, ready for remote mounting:
[root@localhost r]# /etc/rc.d/init.d/nfs restart Shutting down NFS mountd: [ OK ] Shutting down NFS daemon: [ OK ] Shutting down NFS quotas: [ OK ] Shutting down NFS services: [ OK ] Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS daemon: [ OK ] Starting NFS mountd: [ OK ]
Mounting an NFS Share on Your TiVo
Let's assume you have an NFS server running on a PC named nfs.homenetwork.net , which shares a /for_tivo directory to be mounted by your TiVo. Create a /var/mnt directory under which to keep NFS-mounted directories. Create a subdirectory named appropriately for the machine and directory you are going to mount:
bash-2.02# mkdir /var/mnt bash-2.02# mkdir /var/mnt/ homenetwork bash-2.02# mount nfs.homenetwork.net : /for_tivo /var/mnt/ homenetwork
That's all there is to it. Now, whatever files you place into the /var/mnt/homenetwork directory on your TiVo or the for_tivo directory on your PC will be accessible to the other.
|
Top |