PDA

View Full Version : New Prom Mod



jmartz
01-12-2011, 11:05 AM
Hi everyone, I just sent my TiVo to have it modified and should be receiving it from UPS this afternoon. I was wondering if some people could assist me so that I do not make any mistakes. I am being overly cautious because similar to when I rooted my Android phone, a lot of posts that I am finding are pretty old and everyone seems to have a different method of getting stuff done. That being said, I followed instructions on rooting my Android that were outdated and caused me to almost brick the thing. I would like to get some clarification on the procedures for modifying my Tivo before I actually do anything to it.

The posts in the topic below are from 2003. Do these files still work for modifying the Kernel of TivoHD? Which one of the files do I need to use?

http://www.dealdatabase.com/forum/showthread.php?t=21976

Basically after I get this kernel modification done, I can do just about anything else to the drive? All I want to do is be able to transfer shows off the drive using FTP and I want to stop copy protection from being put onto new shows. I have seen people post about SuperPatch, but that only shows up under Series 2 support when I search for it, so I am weary that it might not work for the Series 3?

Any help would be greatly appreciated. I have the older, original Tivo hard drive so I guess I could always fall back to that, but I don't want to risk anything.

Thanks in advance,
Jeff

ScanMan
01-12-2011, 07:33 PM
Read through the Overview of Hacking an S3 (http://www.dealdatabase.com/forum/showthread.php?t=53492), it contains pretty much everything you need to know. Be sure to follow through on some of the links and read those too; superpatch has more or less been replaced by tvapppatch. Also pay attention to the subtle differences in hacking the original S3 versus the TivoHD (different custom kernels, HD uses the 64-bit mfs_utils, etc.) Good luck!

jmartz
01-12-2011, 09:59 PM
Alright, thanks. That's the kind of stuff I am talking about. There's tiny little differences that I guess could mess everything up.

Thanks,
Jeff

swinokur
01-12-2011, 10:25 PM
jmartz: One thing to do is take your original tivo drive, use WinMFS (or the linux version) and copy it over to a new (and bigger) drive. Do all the hacking on that new drive. Then if you *really* get in a corner, you can always go back to square one and re-copy that drive back to the new drive.

jmartz
01-12-2011, 10:55 PM
Alright, can I use two drives of equal size? I have a new 1TB drive sitting in a box, never opened. Can I copy the drive that I pulled out of the Tivo before sending it off to get prom modded to the new 1TB drive and use that as my fallback if I really screw things up? Hopefully it doesn't come to that, but to be honest, the instructions aren't really... clear. I'm still trying to figure out this Initrd thing. It doesn't help that I am not a Linux person. I found a topic last night that had pretty detailed instructions about what to type to mount the drive and stuff... I can't find it now!! I should have bookmarked it, I thought I did... but that post seems to have vanished.

swinokur
01-13-2011, 12:37 PM
Jmartz: Yep, you can use drives of equal size. grab a copy of WinMFS from http://mfslive.org if you're not comfortable with linux - it runs in Windows.

jmartz
01-13-2011, 02:12 PM
Ok, I started the backup before I left for work. It said it would take about 4 hours. When I get home tonight I should have two cloned drives. I am not comfortable in Linux and that's why I am weary about the Initrd procedure.

I need to learn the commands. I finally got back to the topic which had a lot of commands listed. All I want to do is stop the copy protection from being placed on recordings. FTP would be great too, but I am not looking for anything beyond that and there is a topic in this forum that has the instructions.

jmartz
01-14-2011, 12:09 AM
Do you think it would be possible to send me some Linux commands? I can't do anything right now because I can't get the USB thumb drive mounted so that I can copy the files to the backed up Tivo hard drive. I'm getting all kinds of error messages ranging from Permission Denied, to No Such Device, to Can Not Create Directory. I think I have gotten the Tivo drive mounted using "mount -t ext2 /dev/sda4 /tivo" and using the LS command shows me an initrd file or directory, or something. I'm guessing that's the file I need to replace? My kernel is on partition 6, at least that's what it tells me when I do the "bootpage -b /dev/sda" command.

I am thoroughly confused.


HEEEELLLLLLPPPPPP

jmartz
01-14-2011, 12:11 AM
What's more confusing is the command that actually worked, that I found in a CCI protection removal topic is showing SDA4?? ... ext2? I thought I need to be using partition 6? or does that not matter at this point?

Thinkdiff
01-14-2011, 12:48 AM
I'm not trying to knock you, but you should really spend some time reading and figuring out how the TiVo software/box works instead of blindly following lists of commands.

I'll try to get you started:

The TiVo HD is broken up into many partitions. For hacking, there's 5 that we care about. [I'll use hdaX to denote the partition as this is how TiVo's kernel shows them. On Linux, it'll probably be sdaX]:

hda3 - First Kernel Partition (no formatting)
hda4 - First OS Partition (ext2)
hda6 - Second Kernel Partition (no formatting)
hda7 - Second OS Partition (ext2)
hda9 - "/var" partition (ext2)

Partitions 3/4 and 6/7 work as pairs. If your TiVo currently boots off the 3/4 pair (using hda3 to read the kernel and hda4 to boot the OS) those are the partitions you should be modifying. When the TiVo does an in-place upgrade (say from 11.0d to 11.0j), it updates the inactive pair so it does not corrupt the currently running files (that way it can revert a failed update). So after the update, your active pair would be 6/7.

To find your active pair, you run this command while booted in Linux with the TiVo's HD connected:

bootpage -p /dev/XXX [where XXX is your TiVo HD - usually hda or sda]

You'll get an output like: root=/dev/hda4

That means your current pair is probably 3/4. To double check the kernel partition, you can use:

bootpage -b /dev/XXX

In the case above, this command should simply output: "3".

So now assuming your active pair is 3/4, you'd write your killinitrd'd kernel to partition 3. The kernel partition has no formatting or "files". It's a raw copy of the kernel file. To make things easier for now, I would recommend using one of Jamie's custom kernels. They already have initrd removed. The relevant kernels can be found here: http://www.dealdatabase.com/forum/showthread.php?p=299520#post299520 (pick the Gen06.tar.bz2 one for now).

To mount a USB drive on Linux, you'd have to find out what drive name it was given. If you're in command line mode (no GUI), when you plug the USB drive in some messages will come up on the screen. You'd have to find the message that says the kernel added the device as "hda", "hdb", "sdb", etc. Let's assume it was "hdb".

Now to mount it:

mount /dev/hdb /some/existing/directory

I believe the MFS Live CD has a /dos directory, so you could use that. Most of the time, the mount command will figure out what kind of partition is on the disk and you don't need to manually specify the format type. If it doesn't, you may have to try a few variations:

mount -t vfat /dev/hdb /dos
mount -t vfat /dev/hdb1 /dos

Once you have it mounted and have access to your files, you can put Jamie's custom kernel on the TiVo drive (assume sda, and 3/4 pair):

dd if=/dev/sda3 of=/dos/original_TiVo_kernel.px [backup the original kernel]
dd if=/dos/name_of_custom_kernel.px of=/dev/sda3

Now you can modify the TiVo's OS partition. Mount it:

mount /dev/sda4 /tivo

- plenty of directions on how to do this part elsewhere.. basically create your own /etc/rc.d/rc.sysinit.author file that starts telnet and any other hacks you want, and add the tivotools software package to add command line functionality -

The /var partition is used to store extra files not required for the TiVo to be fully functional, such as TiVoWebPlus or other assorted hacks.

Hopefully this is enough to get you started and to encourage you to read up on what's really going on. Once you have telnet access to your TiVo, patching tivoapp to disable CCI is fairly simple.

jmartz
01-14-2011, 02:22 PM
No knock taken. I've been trying to figure this out for the last couple of days. But your instructions are very helpful. My active partitions are 6 and 7, I was able to mount the USB drive and copy the kernel you suggested to partition 6 and I made a backup of the original kernel to the USB drive.

The next step I will do tonight when I get home is create the rc.sysinit file and copy the FTP program onto the drive. I am working with the copied drive. I will toss that into the unit tonight and see what happens. If it doesn't boot up I will make a new copy of my old drive and try it again until I get it right.

Thanks,
Jeff

jmartz
01-15-2011, 01:36 AM
Well, attempt one resulted in corrupted partition tables. :-( Time to image my disk and try again.

jmartz
01-15-2011, 12:32 PM
So the tivo is booted using the custom kernel, but here is what I am wondering...

the kernel is supposed to be on SDA6 and the bootup is SDA7... I replaced the kernel, and unpacked the tivotools archive per the instructions I found... now, I am looking to create the startup file, but none of the directories are in SDA7... when I look in the other, supposedly inactive partition (4) I can find the /sda4/etc/rc.d/ directory... do I have to create that directory in partition 7, and then create the startup file for the tivotools? or do I edit that file in partition 4?

I plugged the tivo in to make sure the new drive booted properly with the new kernel and no other hacks applied. It does boot, so now I am trying to go the next step, but I was expecting to be working only in the active partition... but the inactive one seems to be where everything is... or maybe they changed it when I plugged it in for 10 minutes??

Any ideas?

Thanks,
Jeff

ScanMan
01-15-2011, 12:43 PM
So the tivo is booted using the custom kernel, but here is what I am wondering...

the kernel is supposed to be on SDA6 and the bootup is SDA7... I replaced the kernel, and unpacked the tivotools archive per the instructions I found... now, I am looking to create the startup file, but none of the directories are in SDA7... when I look in the other, supposedly inactive partition (4) I can find the /sda4/etc/rc.d/ directory... do I have to create that directory in partition 7, and then create the startup file for the tivotools? or do I edit that file in partition 4?

I plugged the tivo in to make sure the new drive booted properly with the new kernel and no other hacks applied. It does boot, so now I am trying to go the next step, but I was expecting to be working only in the active partition... but the inactive one seems to be where everything is... or maybe they changed it when I plugged it in for 10 minutes??

Any ideas?

Thanks,
Jeff
Post the output of the following commands:

bootpage -b /dev/sda
bootpage -a /dev/sda
bootpage -p /dev/sdaThis should confirm the active and alternate bootpage settings as well as the root parameter.

For reference here (http://www.gratisoft.us/tivo/bootpage.html) is the bootpage manpage.

jmartz
01-15-2011, 09:24 PM
Alright, so I am not sure what was going on but I must have been looking in the wrong place? The files were there when I got home. I'm just confused... so I created a file named rc.sysinit.author and I placed it into the rc.d directory. I chmod 755 the file. Do I need to tell the Tivo to look for that file? Or does it just know to look for it? I ask because I am unable to get FTP or Telnet to work.

Contents of the file:

# Add /tivo-bin to path
export PATH=$PATH:/tivo-bin

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

# Disable firewall
iptables -F

#start FTP
/tivo-bin/tivoftpd

ScanMan
01-15-2011, 09:44 PM
Tivo will boot the rc.sysinit.author file as part of the startup process by itself. Assuming you are using a stock kernel with null initrd, the 'iptables -F' should work but try placing it earlier in the file right after the export line. Also make sure your text editor can save unix style files (not notepad) so it doesn't insert DOS line endings. Serial console output makes things a lot easier but admittedly it is a pain to build/buy the proper TTL -> Serial cable on the S3 gens. You could also use a custom kernel (http://dealdatabase.com/forum/showthread.php?t=54047) and the 'exit 0' but that's a horse of a slightly different color. You're close though...

jmartz
01-15-2011, 10:09 PM
Post the output of the following commands:

bootpage -b /dev/sda
bootpage -a /dev/sda
bootpage -p /dev/sdaThis should confirm the active and alternate bootpage settings as well as the root parameter.

For reference here (http://www.gratisoft.us/tivo/bootpage.html) is the bootpage manpage.

Thanks Scanman, to answer your questions, the output of each is as follows:

bootpage -b /dev/sda
6

bootpage -a /dev/sda
3

bootpage -p /dev/sda
root=/dev/hda7

This seems to confirm that I am working on the right partition. The file I was looking for is there now, I added the new one, but nothing booted. So either the CHMOD did not take (it didn't give me any status when I typed the command) or I need to do something else to make the tivo look for the new .author file.


Thanks,
Jeff

jmartz
01-15-2011, 11:08 PM
Thanks,

I did use a custom kernel.

jmartz
01-16-2011, 12:00 AM
Success! Kind of...

I did see a post about a weird CP header or something that is left when you use Windows text editors. Your post reminded me of that, and I downloaded "Edit Pad Lite" and resaved the file as Unix friendly. I also put all the files back into the VAR directory.

The Tivo boots up just fine, and when I go into FileZilla, it seems to be making a connection:

Status: Connecting to 192.168.1.2:3105...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Error: Could not connect to server

So it seems to be talking to the Tivo now, which is was not doing before. I also have the TivoTools on there and I have a startup in the .author file pointed to start that FTP server on port 21. When I try to connect to the server on port 21, I get the same error message as above.

Making progress!

Also, Putty seems to be working too, when I connect to my tivo at 192.168.1.2 port 23, it shows me "bash-2.02#"

So that seems to be working, I have no idea how to use the BASH prompt yet, but I will work on that tomorrow.

THANKS!!!!!!
JEFF

jmartz
01-16-2011, 01:26 AM
I couldn't wait, so I decided to look around and the BASH seems to just give me access to the file system, which is great.

I put the tvapppatch.tcl file on the drive and booted it in the tivo, when I try to execute the patch of the tivoapp, it does not work:

bash: ./tvapppatch.tcl: No such file or directory

I have tvapppatch.tcl in the /var directory and I have the 11.0j patch file named tvapppatches.tcl (in the same directory). I can't get this thing to execute.

I spoke to a friend who is more proficient in the Unix/Linux operating system, he suggested I try to CHMOD 755 the file. I did that, but it's still not executing.

Any ideas?

This topic http://dealdatabase.com/forum/showthread.php?t=61165&highlight=apply+patch+tivoapp has what I think is the same command, and he did not have any issues.. I know he was using a different tivo, however. I have the TivoHD.

And of course when I try to execute the patches with the command lines found here > http://www.dealdatabase.com/forum/showpost.php?p=308772&postcount=12,

I get "dd:tivoapp: Read-only file system"

I must be doing a lot wrong.

Thinkdiff
01-16-2011, 04:39 AM
Did you change to the /var directory before trying ./tvapppatch.tcl?

To find the current directory, use "pwd". To change to a different directory, use "cd /var".

if you run "chmod 755 tvapppatch.tcl" and then "./tvapppatch.tcl" in the /var folder and it still doesn't work, your Windows box might've messed up the file. Try running "dos2unix tvapppatch.tcl", chmod it again, and then run it.

To use the patch commands directly, you have to remount the TiVo's OS filesystem as read/write (it's default read-only):

mount -o remount,rw /

run the dd commands

mount -o remount,ro /

This is all pretty basic stuff that has been discussed here over and over. At the risk of being rude, I'll reiterate my earlier post - search and read!

jmartz
01-17-2011, 12:43 AM
Alright, thanks for your help, I will not bug you guys with anymore questions.

I got FTP (21) working and telnet. At this point, I have given up on getting MFS_FTP working. I've got the modified patch file, when I execute the first first patch, it just gives me 16 hunk failed messages. I found someone else with the same problem in the support thread, but the answer isn't clear.

Not to mention, when I put all the files in the var/tivo-bin directory and try to execute the mfs_ftp.tcl file, it just tells me that the file doesn't exist, even though when I LS in the directory, I can see it in both the telnet and FTP. I just can't get it to start. I have gotten the copy protection flag to go away and I stopped automatic updates. So hopefully this will last for a while. I will just use Tivo Desktop to transfer. It's slow, but at least I can get the files off the drive now.

I am going to go through my now playing list and just set myself up to re-record all of the copy protected movies. Once they re-record, I'll delete the ones with the CCI flag set. Easy as pie.

Thanks for all your help.

altomesi
01-19-2011, 08:28 PM
jmartz,

Exactly how did you disable the auto updates? I've socketed my TivoHD and have started the long journey to getting the CCI flag disabled. Removing the CCI flag is really all I wanted...

Thinkdiff
01-19-2011, 11:19 PM
jmartz,

Exactly how did you disable the auto updates? I've socketed my TivoHD and have started the long journey to getting the CCI flag disabled. Removing the CCI flag is really all I wanted...

TiVo updates are disabled using the boot parameters. If you already have access to your TiVo over telnet, run these commands:

bootpage -p

You'll get something beginning with root=/dev/hdaX. Copy this string, then run:

bootpage -P "[insert copied string] upgradesoftware=false"

For example,

bootpage -P "root=/dev/hda4 upgradesoftware=false"

The important part here is keeping the hdaX number the same and adding the upgradesoftware=false option. The TiVo software checks that parameter and won't install new updates if it's set.

lrhorer
01-30-2011, 03:56 AM
There is something you guys may be missing, here. Disabling the automatic upgrade in bootpage will prevent the TiVo from upgrading and overwriting your hacks*, but aside from missing potentially important upgrades, with the old software on your TiVo, eventually it will stop getting guide data updates, as well. I'm not exactly sure when - it may be as soon as the TiVo downloads the upgrade. The bottom line is you will need to select a strategy that will allow you to keep your TiVos upgraded and implement that strategy every time a software release happens. There are a small number of different strategies, from simply completely re-hacking the TiVo everytime software is released to more complex slice management schemes and semi-automatic upgrade implementations.

* - Or at least it will at this time. TiVo could rather easily push out an upgrade that ignores the bootpage setting, but to date they have never done so.

lrhorer
01-30-2011, 04:20 AM
So that seems to be working, I have no idea how to use the BASH prompt yet, but I will work on that tomorrow.


I couldn't wait, so I decided to look around and the BASH seems to just give me access to the file system, which is great.
Ahem. BASH is an acronym for Bourne Again SHell. It is based upon the Bourne Shell, one of several command line interfaces originally developed for UNIX and ported over to Linux. It is an extremely complex and highly developed user interface with extensive features designed with both human interface and scripting usage in mind. On any fully developed Linux distribution (not an embedded application like the TiVo), simply type "man bash" to bring up the man page for bash. The bash man pages are also available on the web. Don't expect to become proficient with bash in a matter of days, or even months, although the basic operation of bash is fairly straightforward. Note also that, unlike cmd.exe, most of the commands used in Linux are not internal to bash. Most commands are external applications, even very basic commands such as rm (delete), mkdir (make directory), and ls (list files). This design allows the basic commands to be uniform and applicable across all shell implementations under UNIX. Bash retained this philosophy when it was ported over to Linux.