Hack the TiVo kernel

From DVRpedia

Jump to: navigation, search

Install killhdinitrd onto the Tivo’s kernel IMPORTANT: Even if you think you already know it, you need to verify your current TiVo software version. Navigate to "TiVo Central", select "Messages & Setup" and then "System Information". Write-down the complete the "Software Version" for future reference

This procedure details how to install a TiVo baseline 3.1.5 linux kernel with the killhdinitrd software onto an Tivo that has ANY revision of the TiVo software. The result is an HD Tivo that passes boot prom post checks and allows execution of user supplied applications.

For folks who have the baseline software version or who have used InstantCake, the version of bootpage that comes with the PTV ISO is not reliable enough to use. Instead, you will need an you trust faith that your root directory is on the specified partitions, or simply install the modified kernel onto both the main and the alternate root partition.

A) Create a bootable Linux CD if you have not done so already Download the latest Enhanced LBA48 boot CD ISO from PTVUpgrade; it will cost $5. This CD will be the linux boot CD you use throughout the HowTo document. It also contains the proper kernel image needed for enabling hacking on the HD Tivo. Browse to:

http://www.ptvupgrade.com/support/bigdisk/

and select the latest release version of the "PTVupgrade LBA48 CD with Enhancements". Read the terms and conditions and download the ISO file if you agree.

1) Burn the ISO to a CD-R disc using your PC. Label the disc "PTVUpgrade LBA48 Linux Boot CD with Enhancements for HD Tivo" and reinsert it in your CD-ROM drive (we will boot from this CD shortly). 2) Shutdown your PC, remove the drive from the HD Tivo, modify the jumper setting to be 'slave' (first make a note of its original setting) and connect it as the secondary slave in your PC. 3) Boot your PC using the "PTVUpgrade LBA48 Linux Boot CD for HD Tivo" disc you created earlier. If you have a Windows hard drive that is partitioned using FAT16 or FAT32, then connect it as the primary master (i.e., /dev/hda)

B) Determine where the root and kernel partitions are on the HD Tivo drive. Enter the following command at the prompt:

bootpage -p /dev/hdd

The result will be in the form "root=/dev/hda[x]" where [x] is the number of the root partition. Don't be confused when the notation "hda" is used because that is the way the disk appears in the TiVo since it is the first and only disk in the machine. Recall the drive assignment discussion above. Your Tivo drive is actually "hdc" when it is in your PC if you use the convention described earlier. The bootpage command always shows "hda". For example, if you see "root=/dev/hda7" then your root partition is actually "/dev/hdd7". Likewise, if you see "root=/dev/hda4", then your root partition is "/dev/hdd4".

The kernel partition will be one less than the root partition. For example, kernel=/dev/hdd6 if root=/dev/hdd7. Likewise, kernel=/dev/hdd3 if root=/dev/hdd4. Throughout this document you will need to know your HD Tivo's active root, kernel, and var partitions. Write them down and refer back to this info as reference.

Mount your PC's internal hard drive For simplicity, this document will only use the mount point "/mnt/c" and assume you are using your PC's C: drive exclusively for this procedure. However, you may choose to mount your D: drive instead of, or in addition to the C: drive.

mount /dev/hda1 /mnt/dos

If you do not have a PC with a FAT32 partition, then you will generally need a second CD-ROM drive to complete the modifications.

Contents

Make a backup of the HD Tivo's kernel partition

If the new kernel being installing from the boot CD does not boot your HD Tivo correctly for any reason, then we can restore the previous kernel without restoring the entire drive image. Enter the following command at the prompt:

mkdir /mnt/dos/tivo_kernel_images

If your kernel partition is /dev/hdd6, then enter the following command at the prompt:

 dd if=/dev/hdd6 of=/mnt/c/tivo_kernel_images/orig_vmlinux.img

If your kernel partition is /dev/hdd3, then enter the following command at the prompt:

dd if=/dev/hdd3 of=/mnt/c/tivo_kernel_images/orig_vmlinux.img

The output for either option should look like:

4+0 records in
4+0 records out

Install the modified kernel image

This installs the modified kernel image to the kernel partition on your Tivo's drive. The modified kernel already includes killhdinitrd, which tricks the HD Tivo's power-on checks into booting without checking for and removing unknown software from the drive. This is what permits you to run software of your choosing (such as telnet, FTP, TivoWebPlus, etc.)

Enter the following commands at the prompt to install the modified kernel:

mkdir /tmp

Note: This directory may already exist.

cd /tmp
cp /CD-ROM/s2_kernels/3.1.5/vmlinux.px.gz /tmp
gunzip vmlinux.px.gz     (or gzip -d vmlinux.px.gz)

If your kernel partition is /dev/hdd6, now enter this command at the prompt:

dd if=vmlinux.px of=/dev/hdd6

If your kernel partition is /dev/hdd3:

dd if=vmlinux.px of=/dev/hdd3

Note: it is OK to install the modified kernel on both kernel partitions. If you're not sure which is your kernel partition, run both of the commands above.

The output for either option should look like:

1+1 records in
1+1 records out


Start by unmounting the drives. Enter the following commands at the prompt:

cd /
umount -f -a -r

Now hit CTRL+ALT+DEL to shutdown your PC, remove the Tivo drive, reset the jumper to the correct positions, and reinstall the drive back into the Tivo. Connect all cables and boot the Tivo.

Test the new kernel to be sure it properly boots when the drive is installed back in the Tivo. If the Tivo boots normally, you're installed to kernel properly.

It it hangs on the “Welcome... Powering Up" screen for more than a few minutes, then you have a problem. Go to the following troubleshooting section.

Troubleshooting Incorrect Kernel Installs

  • First double check that the IDE ribbon cable and power cable are inserted properly and securely into the hard drive in the Tivo.
  • Double check that the jumper setting has been restored to the correct setting ("Master no slave" if you have only one drive, or "Master with slave present" if you have added a second drive). “Cable Select” will generally also work if the cable has not been damaged.
  • If everything looks correct, repeat steps the kernel installation steps above being careful not to overlook any details. If there are any steps you don't completely understand, do a few online searches in a TiVo forum and post questions if necessary.

Restoring the original kernel image

If the Tivo still fails to boot, you can restore the original kernel image as follows:

  • Reconnect the Tivo drive back to the PC, reboot using the Linux boot CD and restore the mount points for your “C” and “D” drives as appropriate.
  • Restore the original kernel image from your PC's drive with the following commands.
mount /dev/hda1 /mnt/dos
cd /mnt/dos/tivo_kernel_images

If your kernel partition is /dev/hdd6, enter the following command at the prompt:

dd if=orig_vmlinux.img of=/dev/hdd6

If your kernel partition is /dev/hdd3, enter the following command at the prompt:

dd if=orig_vmlinux.img of=/dev/hdd3

Note: it is OK to install the original kernel on both kernel partitions. If you're not sure which is your kernel partition, run both of the commands above.

The output for either option should look like:

4+0 records in
4+0 records out   

Repeat step F and then abort this How-To procedure. You may try downloading and burning a new copy of the boot CD ISO from PTVUpgrade (perhaps the image was corrupt) or obtaining a different copy of the 3.1.5 baseline linux kernel and start over.

Final Steps

You have successfully modified the kernel. However, this is of no benefit unless you modify the startup scripts and install some mandatory software. To make use of your newly modified TiVo kernel, it is required that you follow the steps on the insert page name here page.

Automation Utilities for Guided Modification

There are a few different options for automated TiVo modification. The advantages of these over manual hacking are that it is quicker to complete and you don't have to figure out the details of what modifications are being done. The disadvantages are that you don't know exactly what is being done and, if there is a problem, it makes it more difficult to troubleshoot. Below are some of the options for automated modification scripts:

The Zipper

The Zipper is a tool free tool that modifies the software on a Series 2 DirecTivo. It enables your TiVo's USB ports, allowing you to transfer shows between multiple Tivos, and stream music and photos from your PC to your TiVo. It also installs Tivowebplus, channel logos, new splash screen, CallerID, and more. With a little extra work, you can also move shows between your TiVo and your PC.

The SApper

The SApper is a companion tool to The Zipper. It is for Series 2 and 2.5 Stand Alone TiVos. Just like The Zipper, it installs Tivowebplus, channel logos, new splash screen, CallerID, and more.

PTVnet

PTVnet is commercial software from DVRupgrade.com; there is a specific version of PTVnet depending on the version of TiVo hardware/software you have. The cost is about $20 for each version. According to DVRupgrade.com:

"The PTVnetHD software CD is designed as a DIY utility for people with moderate PC technical ability, and who want to quickly and easily build or configure a drive (or two) for their Series2 DirecTV DVR with USB networking access. The CD is designed to be used in combination with a user-supplied drive that has already been upgraded and expanded using MFStools, or can be used on new drives, in combination with an MFStools created backup image. PTVnetHD is NOT a mechanism for installing alternative TiVo software versions onto a device for which it is not intended. PTVnet is designed to augment your existing upgrade drive with the additional features described below."

Other Guides

Personal tools