#!/bin/bash-my-head-against-the-wall
Luckily, the first thing I did was make a backup of the original drive on D's computer, since she runs Win98SE, and I have XP Pro, which will corrupt a Linux drive because of the NTFS file system. Said backup has seen a good deal of use so far.
After many grueling hours spent reading the dealdatabase.com forums, installing and uninstalling Tivo hard drives in Denise's computer, fighting with cantankerous Linux boot CDs, etc, I finally got the Linux kernel replaced and hacked on the original drive, installed a few basic utilities, and successfully rebooted Rex with telnet and FTP access. Go me. Here's the steps I followed for any who care.
Technobabble. Sense. Tingling!
Note: there are a hojillion different kinds of Tivos. Mine is a standalone Series 2, model TCD240040. Your mileage with these steps may vary wildly. At first, I was really annoyed while reading the forums, because it seemed impossible to find a straight answer to anything. The experts seem very guarded against laying out a step-by-step process, and I finally came to terms with the fact that it's because no simple guide will cover it all. I really recommend you do enough research to know why something isn't working when it doesn't. This isn't meant to tell you how to do this to your own Tivo, although I'll (probably) happily answer any questions...this is just a loose guide to what worked for me. Googling any unfamiliar terms along with "tivo" will probably answer basic questions like "what the hell is killhdinitrd?"So, steps:
There are a lot of Linux ISOs out there for people who don't normally run a Linux box and want to befuddle their Tivo, including at least one (Sleeper) which purports to do most of the work for you. I opted to do it the hard way, after reading that Sleeper is outdated and unreliable...the three I ended up checking out were PTV Upgrade 3.0, Knoppix Lite 3.03, and MFS Tools 2.0.
I started out using the plain MFS Tools bootable ISO, and while it worked well for making the initial backup and adding the second drive, it's too limited for anything beyond that. If expanding your recording time is all you're interested in doing, Hinsdale's guide and MFS Tools 2.0 are probably all you need. Knoppix refused to boot so much as a single time on D's computer, so I can't really say much about that one...besides that it may not boot. PTV seemed to have everything I need (it includes MFS Tools 2.0 for making/restoring backups), although it was really touchy about booting up as well, only getting me to the linux prompt every third or fourth reboot.
First, make a backup of your original Tivo disk using mfsbackup! If you manage to screw it up somehow and don't have a backup, good luck. You're on your own. This takes anywhere from 100MB to 1+ gigs, apparently. It took me about 830MB, but we had quite a lot on there.
Test that backup! I was lucky enough to be installing a second drive at the same time I was hacking the Tivo, so I could simply write the backed-up image to the new drive, slap it in the Tivo, and see if it booted up. Worked fine.
Copied version 4.0.1a of the Tivo software to original drive:
go to directory with proper vmlinux.px kernel image
dd if=vmlinux.px of=/dev/hdc3
dd if=vmlinux.px of=/dev/hdc6
Removed the anti-hacking protection in the kernel:
killhdinitrd /dev/hdc3
killhdinitrd /dev/hdc6
Altered boot parameters to not attempt to update the software:
bootpage -P "root=/dev/hda7 upgradesoftware=false dsscon=true console=2,115200" -C /dev/hdc
Created a place for the stuff I'd be adding:
mkdir /mnt/tivovar
mount /dev/hdc9 /mnt/tivovar
cd /mnt/tivovar
mkdir aaron
cd aaron
mkdir lib
mkdir bin
mkdir log
mkdir downloads
mkdir tivotools
Note: a lot of guides suggest putting this stuff in /var/hack, but a lot of others say that's a bad idea because the kernel will wipe /var if it thinks it's getting full.
Note: One of the biggest problems I had was simply getting stuff onto my Tivo's drive. It's a catch-22...if I had telnet and FTP, I could do it easily, but if I was already at that stage, I wouldn't have been struggling with this. Partially this was laziness on my part. I could access D's Win98SE C:\ drive while booted into Linux, but I didn't want to keep swapping OS's just for that, even after I realized it (which took way too long). I finally managed to configure network support in Linux, which I was pretty proud of, and then uploaded stuff here to liquidfish.net and used wget to download it there. If you need a similar solution, here's how I went about doing that:
Manually enable network support:
ifconfig eth0 192.168.0.102 netmask 255.255.255.0
route add default gw 192.168.0.1 netmask 0.0.0.0 metric 1
In the example above, D's computer was now using IP 192.168.0.102, while 192.168.0.1 is my router's internal IP. Note that, at least in my case, this doesn't give you DNS lookup, but I was able to use nslookup in a DOS prompt in Windows to get liquidfish.net's IP address and access it that way. Moving right along...
Added a first set of utilities, mostly Linux commands which aren't installed in the Tivo's kernel:
Google, find, and download "tivotools.rar"
cd /mnt/tivovar/aaron/tivotools
get tivotools in here however you like...I used wget, as noted above
tar -x --file=tivotools.tar
rm tivotools.tar
If you're actually reading this sentence, you have a godlike attention span.
Create your rc.sysinit.author file
You can think of this as an autoexec.bat file for Tivo. There is already an rc.sysinit file on your Tivo, and it will automatically call the .author file if it exists. Most people recommend using the .author for starting utility processes, telnet, etc, as opposed to the regular rc.sysinit file. These can get more cluttered as you add utilities, but mine is very simple for now. Apparently, TiVo has pico installed natively.
pico rc.sysinit.author#!/bin/bash
# date>>/var/hack/log/hackinit.log
#Environment Variables
export PATH=$PATH:/var/aaron:/var/aaron/tivotools:
export TIVO_ROOT=
export MFS_DEVICE=/dev/hda10
export IGNOREEOF=1000
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib/modul
export TERM=xterm
export PS1='\h:\w$ '
#Start BASH
/bin/bash</dev/ttyS2&>/dev/ttyS2&
#Setup HOSTNAME
/bin/hostname tivo
#Load telnet daemon and ftp dameon
tnlited 23 /bin/bash -login &
tivoftpd.mips
If you're running version 4 or higher of the TiVo software, you will need to also go into rc.sysinit and cruise down to line 566 or so. You'll see a line which mentions netfilter-enable twice on the same line. Change both references on that line to read netfilter-disable instead.
At this point, I reinstalled the original drive in the Tivo, but not the new one, and was able to boot up the TiVo with telnet and FTP access.
With my fearsome new powers of telnet/ftp, I installed the tytool server on Rex, and am currently copying a video of a certain executive transvestite over to my hard drive for further testing and experimentation.
Note that this whole process left the programs I had previously recorded on the Tivo unwatchable. I think this is because the Tivo no longer scrambles recordings, and thus no longer attempts to unscramble them when playing them; a patch to unscramble these previous recordings will be necessary.
I'll be putting the second hard drive in sometime this weekend...hopefully that'll go well. Further bulletins as events warrant.
Currently listening to: "Can't Seem To Make You Mine", Murder City Devils


