View Full Version : Help hacking SAS2 240040
ReidWings
05-22-2005, 03:58 PM
Hi, I have been trying to hack my Tivo 240040 with OS 7.1b and have gotten a lot of helpful info so far on these boards and from some members, but still have a few questions if anyone would be willing to help out. I've search the forums but still am a bit confused on some simple issues. To complicate things, I'm using Mac OS X to hack, but most of these issues aren't mac related (I don't think).
My goal is to hack it so I can stream video over my network to my computer (via TyTools).
So here's my understanding of what I need to do to hack so far and my confusions, correct me if I am misinformed and please help me better understand what I'm doing.
-I need to run killhdinit to make it so I can install hacks without having them erased on boot. My confusion is if this is true all of the time? I am running 7.1b and don't believe killhdinit will work with this but hope I'm wrong. I've read mixed info on the boards.
-I have bootpage working to identify the appropriate root and kernel to hack, but when I tried to killhdinit, I got an error saying there was no exploit in this kernel to be found. It was suggested to me that I need a clean image and this should fix the problem.
-I am not exactly clear on what bootpage does when you use the "C" command to write the bootpage, but I did that on my drive as well. What is it writing? Is there a bootpage support thread? I searched but didn't find one, maybe I'm just blind.
-So if I need a new image, which version do I need? From what I understand, the 4.0 images seem to be standard, but then if you let that update to 7.1 will that wipe your hacks? Or is there a way to hack 7.1 directly with killinithd without having to reinstall a kernel? I'm assuming the error I got with killinithd is because of the OS version number, but I could be wrong.
I know people tend to not answer questions for newbs but I REALLY appreciate the help. I've spent quite a bit of time trying to figure out how to hack my tivo (I've upgraded the drive already) and need a bit more guided direction to be my way. Thanks in advance!
PlainBill
05-22-2005, 04:55 PM
Hi, I have been trying to hack my Tivo 240040 with OS 7.1b and have gotten a lot of helpful info so far on these boards and from some members, but still have a few questions if anyone would be willing to help out. I've search the forums but still am a bit confused on some simple issues. To complicate things, I'm using Mac OS X to hack, but most of these issues aren't mac related (I don't think).
My goal is to hack it so I can stream video over my network to my computer (via TyTools).
So here's my understanding of what I need to do to hack so far and my confusions, correct me if I am misinformed and please help me better understand what I'm doing.
-I need to run killhdinit to make it so I can install hacks without having them erased on boot. My confusion is if this is true all of the time? I am running 7.1b and don't believe killhdinit will work with this but hope I'm wrong. I've read mixed info on the boards.
Read the killhdinitrd (http://www.dealdatabase.com/forum/showthread.php?t=36693) and 7.1 (http://www.dealdatabase.com/forum/showthread.php?t=40715) support threads. 7.1x uses the 2.4.20 kernel, just like 3.1.5x. As a matter of fact, the process of modifying 7.1x to get it running with a 3.1.5 killhdinitrd kernel is documented in the second thread.
-I have bootpage working to identify the appropriate root and kernel to hack, but when I tried to killhdinit, I got an error saying there was no exploit in this kernel to be found. It was suggested to me that I need a clean image and this should fix the problem.
Someone is trying to blow smoke. Either they are confused, or they're playing 'shaft the newbie'.
-I am not exactly clear on what bootpage does when you use the "C" command to write the bootpage, but I did that on my drive as well. What is it writing? Is there a bootpage support thread? I searched but didn't find one, maybe I'm just blind.
-C instructs bootpage to update the partition table with the information you specified. It is required, but redundant. Examples:
'bootpage -p /dev/hdc' returns the boot parameters for the secondary master drive.
'bootpage -P "root=/dev/hda4" -C /dev/hdb' UPDATES the boot paramaters for the primary slave drive.
-So if I need a new image, which version do I need? From what I understand, the 4.0 images seem to be standard, but then if you let that update to 7.1 will that wipe your hacks? Or is there a way to hack 7.1 directly with killinithd without having to reinstall a kernel? I'm assuming the error I got with killinithd is because of the OS version number, but I could be wrong.
I know people tend to not answer questions for newbs but I REALLY appreciate the help. I've spent quite a bit of time trying to figure out how to hack my tivo (I've upgraded the drive already) and need a bit more guided direction to be my way. Thanks in advance!
You don't need a new image. 7.1x is fine. You MUST install a killhdintrd kernel.
PlainBill
ReidWings
05-22-2005, 09:29 PM
Bill, thank you so much for all your help! I'm really close to getting all this done. A few more questions for you (or anyone who wants to help).
How do I install the killhdinit'd kernel onto my drive? Is that what bootpage -C is for? or do you copy it into the kernel directory manually? I have seen the "dd' command numerous places but am having trouble figuring out what that is or where I would use it (in what program)--is that how you copy over the kernel?
---Edit: I found the following command in a thread, which mostly answers my own question:
4) transfer the killhdinitrd'd kernel to /var in your sleeper'd tivo and install it to hda3 & hda6 with "dd if=/var/vmlinux.px of=/dev/hda3" and "dd if=/var/vmlinux.px of=/dev/hda6"
So tell me if I'm right: dd just copies a file from one dir to another in unix?
-I also realized (Re: bootpage) that since I compiled bootpage it may include the file it needs to transfer to the HD. Or am I missing something?
Thanks again
Thinkdiff
05-22-2005, 10:40 PM
Lets say your tivo HD is disk2 and your root partition (what you set "root=/dev/hdaX" to is 4 (it might be 7).
If it's 4:
dd if=kernelfile of=/dev/disk2s3
if it's 7:
dd if=kernelfile of=/dev/disk2s6
PlainBill
05-22-2005, 11:22 PM
To answer your question, dd is a command used to do an exact copy of one file to another. (IIRC, dd is for drive duplicate). In Linux a file can be a file, a partition, an output device, the keyboard - anything.
'dd if=vmlinux.px of=/dev/hda3' will copy vmlinux.px to partition 3 of the primary master hard drive. 'dd if=/dev/hdb6 of=kernel.sav' will make a backup copy of partition 6 of the primary slave drive. Make certain you know EXACTLY what you are doing. 'dd if=vmlinux.px of=/dev/hda' will ruin your day.
PlainBill
ReidWings
05-23-2005, 05:29 PM
Ok so I'm really almost done now!
I've installed a killhdinit'd kernel with 7.1b and edited the IPTables as discussed in another thread and the tivo boots fine. That means it's hacked and ready to go right? Plus I have some issues I would love help with:
-So now I want to add some programs onto the tivo but am unsure of a few things. You mentioned adding them to the "tivotools" folder, but there is no such folder. Where did you create it? (or where is it if I'm missing it)
-I want to create a startup script to run my programs when I boot up the tivo so I don't have to manually start them (which I don't know how to do since I don't have a serial cable). I read that I should make a rc.sysinit.author file so I don't mess up the rc.sysinit file. Where should I put that? In the same directory as the rc.sysinit file? And then how do I make that run automatically? call it in rc.sysinit or will it run on its own?
-How do I get FTP or telnet access to my box so I don't have to open it up again? I read AlphaWolf's tools seem to be a good way to go, but those work for OS 4.1 and below I think, and I am running 7.1b. Will it work for this? Or should I use something like mfs_ftp?
Thanks!
cheer
05-23-2005, 06:25 PM
Ok so I'm really almost done now!
-How do I get FTP or telnet access to my box so I don't have to open it up again? I read AlphaWolf's tools seem to be a good way to go, but those work for OS 4.1 and below I think, and I am running 7.1b. Will it work for this? Or should I use something like mfs_ftp?
Thanks!
For telnet access, the stuff you need already exists on your Tivo. You'll need to pull the drive to do this, but once you're done you're set.
Hopefully you've created an rc.sysinit.author file to add hacks to. If not, create one in /etc/rc.d/. Put the following line: tnlited 23 /bin/bash -login & in your rc.sysinit.author. If you're just creating this file for the first time, you might have to add a line like this: [ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author to your rc.sysinit file. Make sure you chmod 755 your rc.sysinit.author file if you're creating it for the first time.
So that takes care of telnet. (I'm assuming you have a wired or wireless connection to the box and everything configured appropriately -- I have no idea how one does that on 7.1.)
For ftp, remember that "regular ftp" (i.e. tivoftpd) is a very different thing from mfs_ftp. tivoftpd gives you ftp access to the system portion of the box -- the rootfs and so on. mfs_ftp gives you access to the recorded videos on the mfs partition(s). tivoftpd is used for loading new hacks or whatever; mfs_ftp is for insertion and extraction of videos.
So far as I know, alphawolf's tools should work fine on 7.1, but I don't run 7.1 so I cannot swear to it.
Thinkdiff
05-23-2005, 07:27 PM
If you're just creating this file for the first time, you might have to add a line like this: [ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author to your rc.sysinit file.
Do NOT do this. the rc.sysinit already has a hook to rc.sysinit.author. running it twice would not be a good thing, especially for performance.
ReidWings
05-23-2005, 08:24 PM
Looking at my rc.sysinit file it does not seem to have a call for rc.sysinit.author. Should I add the line or is it there somewhere? The file name rc.sysinit.author does not appear (did a search).
Thinkdiff
05-23-2005, 08:33 PM
I am sorry, my information was incorrect. The hook is not in rc.sysinit exactly, but it is in one of the other files executed at startup. To verify, run this command:
cat -n /etc/rc.d/StageG_PostApplication/rc.Sequence_100.InvokeLateStressDiags.sh | grep -i "rc.sysinit.author"
(this is only for 6.x and up I think). It should be around line 58.
ReidWings
05-23-2005, 11:42 PM
Ok, so I've hacked the tivo, and I have a bash prompt via telnet. I added a var/hacks directory and added mfs_tools and tystreamer. However, when I login with the bash prompt, if I type "cd /var/hacks" it says there is no such directory. I can get to the /var directory, but is says there is no /hacks or /mfs_tools folder in there (which there are, I confirmed by repulling the drive). Am I doing something wrong? I want to be able to turn on files manually such as mfs_ftp but I'm stuck. Thanks for all the help everyone
edit: and if I try the "dir" command, it says it is not valid. Isn't that the linux/unix command to list the contents of the directory?
Thinkdiff
05-23-2005, 11:44 PM
are you making the folders on disk2s7/4 or disk2s9? you need to make anything you want on /var on disk2s9
(assuming your tivo HD is disk2)
Thinkdiff
05-23-2005, 11:45 PM
Ok, so I've hacked the tivo, and I have a bash prompt via telnet. I added a var/hacks directory and added mfs_tools and tystreamer. However, when I login with the bash prompt, if I type "cd /var/hacks" it says there is no such directory. I can get to the /var directory, but is says there is no /hacks or /mfs_tools folder in there (which there are, I confirmed by repulling the drive). Am I doing something wrong? I want to be able to turn on files manually such as mfs_ftp but I'm stuck. Thanks for all the help everyone
edit: and if I try the "dir" command, it says it is not valid. Isn't that the linux/unix command to list the contents of the directory?
That's DOS buddy... linux is "ls" for listing a directory. did you install the tivotools S2 binaries? That installs a lot of binaries you need to get aroudn the the tivo.
ReidWings
05-23-2005, 11:52 PM
Damn DOS...why do I know DOS commands, I've used macs all my life. :rolleyes:
Thanks for pointing on that it needs to be on s9, I had it on s7. I haven't installed TivoTools S2, but I will.
edit:
the "ls" command still doesn't seem to work either.
plus, I added the files to the s9 partition (there was no /var directory there so I created one) but still cannot find them through the bash/telnet.
2nd edit: for some reason, I can't telnet into the /var directory I created on s9, but I can put the hacks somewhere else. I figured out all the command stuff, I installed some packages to add the commands I needed. I've got FTP working now too :D
Thanks for all the help everyone.
cheer
05-24-2005, 06:38 PM
Do NOT do this. the rc.sysinit already has a hook to rc.sysinit.author. running it twice would not be a good thing, especially for performance.
Maybe yours does. My stock 3.1.1e DTivos had no such hook, which is why I added it.
Thinkdiff
05-24-2005, 07:26 PM
Maybe yours does. My stock 3.1.1e DTivos had no such hook, which is why I added it.
I'm sure it is somewhere. I've never worked on a tivo that did not automatically load rc.sysinit.author. Perhaps you can check some of the other files on the tivo and see if any of them have it.
cheer
05-24-2005, 11:52 PM
I'm sure it is somewhere. I've never worked on a tivo that did not automatically load rc.sysinit.author. Perhaps you can check some of the other files on the tivo and see if any of them have it.
Went through everything I could find.
In any case, despite having added the line to rc.sysinit, my hacks load only once. Perhaps it isn't until a later software version that it autoloads.
Jamie
05-25-2005, 12:14 AM
Went through everything I could find.I'm with Thinkdiff. This is from a stock rc.sysinit extracted directly from the 3.1.1e GZetc slice:% cat -n rc.sysinit | grep author
918 [ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author
cheer
05-25-2005, 11:27 AM
I'm with Thinkdiff. This is from a stock rc.sysinit extracted directly from the 3.1.1e GZetc slice:% cat -n rc.sysinit | grep author
918 [ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author
Weird. Sweartagod, it wasn't in any of mine!
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.