Install Mandatory network software: Telnet, FTP

From DVRpedia

Jump to: navigation, search

Contents

Overview

There are two essential program required before you can connect to your TiVo over the network and install and run new software: FTP and Telnet. FTP is used to transfer programs to your TiVo and Telnet is used to run them. You must first have hacked your TiVo kernel (a.k.a have killhdinitrd run on the kernel image) to allow third-party software to run before enabling these programs.

Getting necessary files

Before you proceed. go to http://tivoutils.sourceforge.net/ and download all of the files for your Tivo

  • TiVo Series 2 (mips processor version), e.g., devbin, netbin, and ps
  • TiVo Series 1 (PPC processor version)

Extract the files and burn them to a spare CD-R. The Tivo is missing a bunch of needed Linux commands, which are necessary for modifying the Tivo. Also at this site is a version of the vi (vim61-s2.tgz) and joe text editors. Note: no need to download the compiler / cross-compiler.

For the files netbin & devbin, these are actually directories of Linux gzipped files. Get a good gz unzip (such as [http://www.y-zip.org 7-Zip) to create a subdirectory of tivotools or gz unzip (not the same as unzip) or unzip on the pc side. These files will need to be chmod’ed and can be put in the /bin directory or another directory in the path. Note these executables will NOT run from the PC boot CD (which supports BusyBox and a variety of aliased utilities).

Files you will definitely need:

File Description

  • devbin-s2.tgz
  • Precompiled S2 binaries of: chgrp, chown, chroot, cksum, comm, csplit, cut, dir, dircolors, expand, false, fmt, fold, groups, head, hexdump, hostname, id, install, join, logname, ls, md5sum, mkfifo, mknod, more, nl, nohup, od, paste, pathchk, pr, rmdir, split, su, sum, tac, tail, tar, tee, touch, tr, true, tty, unexpand, uniq, uptime, vdir, wc.

netbin-s2.tgz

  • Precompiled S2 binaries of: arp, netstat, ping, rarp
  • tivoftpd.mips.gz
  • sorphin's tivoftpd v0.2 for Series 2/MIPS. Binary only.
  • ps-s2.gz -- ps precompiled for S2.
  • s2-2.4.18-modules.tgz

Package contains the following modules for Linux kernel 2.4.18 (i.e. TiVo v4.0): acm.o af_packet.o cdrom.o dc2xx.o hid.o input.o isofs.o kaweth.o keybdev.o keyspan_pda.o lockd.o loop.o mousedev.o nfs.o pcnet32.o pegasus.o rio500.o rtl8150.o scsi_mod.o sd_mod.o sr_mod.o sunrpc.o usb-ohci.o usb-storage.o usbcore.o usbserial.o

Optional files you may want:

  • vim61-s2.tgz
  • vim v6.1 precompiled for S2. Add export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/hack/lib to your profile
  • busybox-0.60.5-s2.tgz
  • Precompiled busybox v0.60.5. Busybox is perhaps the most convenient way of getting basic linux commands on to the Tivo. However, be aware that the implementations of particular commands are not necessarily as robust as the real ones.

Many of the zip archives will seem to lack extensions if you unzip them in Windows. Both devbin and netbin should be tape archive files (i.e., *.tar suffix). Also note that the *.tgz file suffix is a Windows-friendly concatenation of .tar.gz. If you unzip a *.tgz file in windows, be sure to manually the *.tar suffix to the compressed file. To enable the commands, you must copy them into your hacks directory and extract the archives (this will be covered later in this document):

cp devbin-s2.tar /mnt/tivo/var/hack
cp netbin-s2.tar /mnt/tivo/var/hack
cp ps-s2 /mnt/tivo/var/hack
cd /mnt/tivo/var/hack
tar -xvf devbin-s2.tar
tar -xvf netbin-s2.tar
mv ps-s2 ps
chmod 775 *

If you forget to add these commands while you have the drive outside of the Tivo, then you can enable them from a telnet session, but with a slight twist. The first step, of course, is putting the files, especially devbin-s2.tar, onto the Tivo in the /var/hack directory. From there:

cd /var/hack
cpio -idu -H tar < devbin-s2.tar
chmod 775 *
tar -xvf netbin-s2.tar
mv ps-s2 ps
chmod 775 *

Alternatively, you can download AlphaWolfs S2 All-in-One utility from http://www.dealdatabase.com/forum/showthread.php?t=37602. Install directions are there.

Getting the network up; telnet, ftp, and mfs_ftp working and installing needed binaries

  1. Boot the PC into Windows
  1. Get tivoftpd if you have not already.

The standard tivoftpd that comes with the MFSTools CD is not for a mips processor. Therefore, get tivoftpd from here: http://tivoutils.sourceforge.net/ and put on your DOS hard drive in c:\tivotools (you may also have already gotten it from SourceForge during Step 2). At this point you may want to read below and download any of the required or recommended files which you have not already gotten. This will save a few reboots going back and forth between bootable Linux, reinstalling the drive, and Windows on the PC..

  1. Unzip all the files that you got from SourceForge eg. devbin,netbin,ps

Make sure you at least have the ls command as you will need it to look at your TIVO disk. Unzip the vim61-s2.tgz file to vim61-s2.tar. Remember that many files will not be unzipped with any extensions, and you will want to be sure to include a *.tar extension on any *.tgz files.

  1. Save the enclosed rc.sysinit.author file in c:\tivotools

I know this file works because it is the one from my HD TIVO and I just now ftp'd it from my TIVO to my PC. You should edit it to make sure that the Ethernet address is the one you want. Do a "save as" if you are using Textpad on the PC to make SURE that it is in UNIX format. This is a REALLY important file as it is run at boot time by the tivo.

It installs the drivers for the Linksys USB adapter so I hope you bought the USB200M, starts the telnet daemon,ftp daemon and configures your IP address. IN addition to network support on the Linksys, it enables external USB devices like Disk Drives/Compact Flash cards/Pen drives to be mounted. It also starts any TPM’s that you may have installed

Here are the contents of this MOST important file. If you need to create this file, do not use windows NotePad! It will not save the file as a Unix-format text file. Download the TextPad editor from TextPad.com and create the file below, saving it as a text file in the UNIX format.

rc.sysinit.author including external USB device support

#! /bin/bash
#install usb and ethernet drivers
insmod /lib/modules/usbcore.o
#insmod /lib/modules/hcd.o
insmod /lib/modules/ehci-hcd.o
insmod /lib/modules/ax8817x.o

#install drivers for usb external devices like disk drives
insmod /lib/modules/scsi_mod.o
insmod /lib/modules/usb-storage.o
insmod /lib/modules/sd_mod.o
insmod /lib/modules/fat.o
insmod /lib/modules/vfat.o
sleep 10

#configure Ethernet for static IP address
ifconfig eth0 192.168.1.40 broadcast 192.168.1.255 netmask 255.255.255.0
sleep 100 

#enable telnet
tnlited 23 /bin/bash -login &

#enable ftp
/var/hack/tivoftpd.mips

# start network  ping script  to keep it alive
/bin/net_alive &

  1. Shutdown PC and reconnect the TIVO drive and reboot from the CD
  1. Determine where the root and kernel partitions are on the HD Tivo drive.

See Step 2A.B (above, page 7), if you have not already determined where your Tivo’s kernel, root and var partitions are located.

  1. Mount the Tivo partitions.

Assuming you have your Tivo disk connected as secondary slave (hdd) and that your root partition is partition 7, enter the following commands at the prompt to mount the Tivo partitions:

mkdir –p /mnt/tivo
mount -t ext2 /dev/hdd7 /mnt/tivo
mount -t ext2 /dev/hdd9 /mnt/tivo/var

Mount the FAT / FAT32 hard drive attached to IDE1 Master:

mount /dev/hda1 /mnt/dos

Note that you must mount partition 7 before mounting partition 9. Also note that you will have to change “hdd” to “hda”, “hdb”, or “hdc” if you have it connected to one of the other IDE channels. Many of the tools will go into /mnt/tivo/var and some will go into /mnt/tivo, so enter the following commands at the prompt.

mkdir /mnt/tivo/var/hack 
mkdir /mnt/tivo/var/mfs_ftp 


  1. Copy the sysinit.author file to /mnt/tivo/etc/rc.d

You should have previously saved the rc.sysinit.author file on the FAT / FAT32 disk's tivotools directory. You now need to copy it to /mnt/tivo/etc/rc.d and make it executable. To do this, enter the following commands at the prompt:

cp /mnt/dos/tivotools/rc.sysinit.author /mnt/tivo/etc/rc.d
chmod 775 /mnt/tivo/etc/rc.d/*
  1. copy tivoftpd.mips to /mnt/tivo/var/hack and make it executable via chmod 775 <filename>

This is for ftp access to your Tivo

  1. Copy the ls, ps and other LINUX commands from tivotools on the XP disk into /mnt/tivo/bin on the TIVO disk

See Step 2A.G for a list of files and commands needed to load the files onto your Tivo. Alternatively, copy all of the commands to the /mnt/tivo/var/hack/bin directory and add the following line to the rc.sysinit.author file anywhere BEFORE you start bash or tnlited. You can also just add it anywhere in your /.profile if you are using bash --login.

export PATH=$PATH:/var/hack/bin
Personal tools