--- Upgrading your TiVo software via Telnet ---
Assuming you have 'upgradesoftware=false' in your bootpage parameters, your tivo won't get new software automatically. Your first clue is the call status will change to "pending restart" and you'll have to manually install the new software. Wily veterans already documented this process so for some history see here.
The basic upgrade boils down to a few things:
1. Modifying the installSw.itcl script to prevent automatic reboot.
2. Run installSw.itcl to install your new software.
3. Putting your hacked kernel into the correct partition to continue defeating the chain of trust.
4. Making sure you have fixed your iptables in the correct manner.
5. Copying your rc.sysinit.author file & other hacks/utilities over to the new partition.
6. Making sure you account for any network drivers needed depending on your Series and kernel used.
So let's get started:
1. Check the location of your current root
So we know the 3/4 partitions are the active kernel/root filesystem and 6/7 are the alternate partitions; if yours reports /dev/hda7 you will need to reverse my partition references below since this is based on my root=/dev/hda4.**
root=/dev/hda4 dsscon=true console=2,115200 upgradesoftware=false
2. Find out what software Tivo has ready for me
You will see Tivo has downloaded new software.
echo mls /SwSystem | tivosh
Directory of /SwSystem starting at ''
Name Type FsId Date Time Size
---- ---- ---- ---- ---- ----
11.0g-01-2-648 tyDb 28274 04/09/10 16:09 884
9.4c-01-2-648 tyDb 5761 04/22/09 19:23 900
ACTIVE tyDb 5761 04/22/09 19:23 900
3. Edit /tvbin/installSw.itcl script:
Remount root filesystem as read-write:
Look for this section in installSw.itcl
mount -o remount,rw /
You want to replace the 'reboot' command with 'exit 0' (that's a zero) - so it should read:
# Say goodbye
putlog "Attempting reboot..."
Save your changes; and remount root as read-only again as it's not a good idea to leave root mounted read-write.
# Say goodbye
putlog "Attempting reboot..."
Now, Tivo won't automatically reboot once it completes the software upgrade, giving you time to re-install your hacks.
mount -o remount,ro /
4. Install the upgrade, providing the release-name you want to install.
This will place the new kernel and root filesystem in the alternate partitions (6/7)
It will also flip your bootpage but should leave your other parameters unchanged.
Check it again:
This is the NEW root filesystem; your old one is still at /dev/hda4
root=/dev/hda7 dsscon=true console=2,115200 upgradesoftware=false
Tivo also put a new kernel in /dev/hda6; you don't want this, you want to put in your hacked kernel there.
5. dd in the hacked kernel into the NEW kernel partition (/dev/hda6)** overwriting the current Tivo-installed kernel. Of course, you will need to ftp the vmlinux.px file over beforehand or take it from your old partition.
Example using custom kernel on an original Series 3:
Or from the old partition:
dd if=./vmlinux-Gen05-netopt-ext3.px of=/dev/hda6
Alternatively, using replace_initrd.mips to neuter a stock tivo kernel with a null linux.rc
dd if=/dev/hda3 of=/dev/hda6
Note on custom kernels & iptables
./replace_initrd.mips /dev/hda6 null-linuxrc.img.gz kernel.bak
If you are using a custom (i.e. jamie) kernel or stock kernel with null initrd, you need an /sbin/iptables file that is executable (chmod 755) and looks like this:
6. Tivo should still have root mounted at /dev/hda4; mount the NEW root filesystem
Copy over your rc.sysinit.author, your "fixed" iptables and any other hacks from the old root filesystem to the new. In the example below, I am copying my rc.sysinit.author, my "exit 0" iptables and a recursive copy of my /hacks directory which has all my tivotools, scripts, utilities etc.
mount /dev/hda7 /mnt
On all filesystem changes, make sure you are making these changes to the NEW filesystem relative to the mount point of the NEW partition - i.e., /mnt
cp /etc/rc.d/rc.sysinit.author /mnt/etc/rc.d
cp /sbin/iptables /mnt/sbin
cp -dr /hacks /mnt
Note on custom kernels and ethernet port drivers for Series 3
If you are using a custom (jamie) kernel, you need to replace the stock driver file with the one supplied with the kernel. Look in /platform/lib/modules
Note on upgrading 8.x+ software (generally Series 2)
mv /mnt/platform/lib/modules/bcmenet.o /mnt/platform/lib/modules/bcmenet.bak
cp ./bcmenet.o /mnt/platform/lib/modules
chmod 644 /mnt/platform/lib/modules/bcmenet.o
There are issues with 8.x+ USB network drivers and and the killhdinitrd kernels. It could be solved by using the backport drivers or the previous 7.3.1 drivers. See the "8.1 and my NIC" thread for more details. If you are using a Series 2 Dual-Tuner (649) or Series 3 with a USB network adapter, your best bet is to monte into a stock kernel. I'm not going into that here, you'll have to search more, sorry.
7. Doublecheck your work - you don't want to screw this up and have to pull your drive. You should have your hacked kernel in /dev/hda6 (or /dev/hda3 - see ** below), your rc.sysinit.author which starts your telnet, etc., and your "fixed" iptables and any other hacks copied over to the NEW root filesystem (/dev/hda7). Make sure all your copied files have the proper permissions.
8. Reboot, it will display the "processing upgrade, this may take up to an hour..." message; after that you should be good to go, I was...
**Primer on Boots, Roots and Partitions**
Tivo uses two pairs of partitions in booting your system and mounting the root filesystem: 3/4 and 6/7, one is active while the other is alternate.
For example, when root=/dev/hda4, the 3rd partition is the kernel that boots and the 4th partition is the root filesystem. Similarly, with the 6/7 pair when root=/dev/hda7 (6 is kernel, 7 is root).
Depending on where your current active boot/root is will determine where to make changes. Thus, if the result of bootpage -p in step 1 was /dev/hda7, tivo will install the "new" software in the 3/4 pair. Accordingly, after you run the installSw.itcl script, you should dd your hacked kernel into /dev/hda3 and make changes to the root filesystem at /dev/hda4 as outlined above.
EDIT - Automated this process with a "ManualUpgrade.tcl" script in post #48!