PDA

View Full Version : Got Bash on my DTivo S2 Need some help/suggestions...



FokenNewbee
10-19-2003, 06:40 PM
Here are the hacks I will be uploading to my Tivo.

fixsub31.tcl
nopvv.tcl
callfixsub.tcl

I'm kind confused on the callfixsub and fixsub31 file...they look to serve the same function.

First question, do I need both and what do they do?

Below is the hackinit file I will be using...I basically ripped it from a couple people and edited to what I think is how it should be for my preferrence.

#!/bin/bash
date>>/var/hack/hackinit.log
echo "Starting Hackinit... " > /dev/ttyS2
PATH=/var/hack/bin:/sbin:/bin:/tivobin:/tvbin:.

#Environmental Variables
TIVO_ROOT=
MFS_DEVICE=/dev/hda10
IGNOREEOF=1000
export PATH TIVO_ROOT MFS_DEVICE IGNOREEOF

echo "Starting Bash... " > /dev/ttyS2
/bin/bash</dev/ttyS2&>/dev/ttyS2&

#FixSub31
echo "Calling FixSub31... " > /dev/ttyS2
/var/hack/fixsub31.tcl

echo "Sleeping for 2 minutes to finish acquire sat.. " >/dev/ttyS2
sleep 120

#CallingNoPPV
echo "Calling Noppv... " > /dev/ttyS2
/var/hack/callnoppv.tcl &

echo "End of Hackinit... " > /dev/ttyS

Am I missing anything, any suggestions/improvments????


This is how I understand how to transfer the files I listed above to my Tivo using TeraTerm via serial port.

Once I establish Bash in TeraTerm...
Starting Bash…
Bash: no job control in this shell

The first thing I should do is to prevent updates to my DTivo. To do this I would type or copy and paste the following:

cp –p /tvlib/tcl/updateSoftware.tcl /var/hack/updateSoftware.tcl_backup
Hit ENTER
rm –rf /tvlib/tcl/updateSoftware.tcl
Hit ENTER

Then backup the dssapp and rc.sysinit files..to do this I would type or copy and paste the following:

cp –p /tvlib/dssapp /var/hack/dssapp_backup
Hit ENTER
cp –p /etc/rc.d/rc.sysinit /var/hack/rc.sysinit_backup
Hit ENTER


Once that's complete I will tranfer all the files I mentioned above..

In TeraTerm I would type in cd /var/hack
That should get me to the directory where I want to place my files. I then click on File > Transfer > ZModem > Send Then select one of the files. After the transfer I will ls to make sure the file is in the correct directory. If it's all good..I'll transfer all 3 .tcl files to /var/hack.

Once I have all four files transfered I will edit my hackinit file to reflect the hacks I just uploaded.

First I would start with:
cat >/mnt/tivo/hack/hackinit

Then hit ENTER after each line in my hackinit I post above. After I hit ENTER on the last line I hit CTRL-D.

Then I would type: chmod -R 777 /mnt/tivo/hack and hit ENTER.

And I think that's it...I'm not sure if I need to reboot my tivo or just go Standby...I read that rebooting will delete my dssapp so I don't think I want to do that.

And once I get this this working will all my hack I will do a backup of the drive just in case I need to restore it if something happens. And for that I would the use MFSTool2 with this command line :

mount /dev/hda1 /mnt/c
mfsbackup -f 4138 -6so /mnt/c/dt2_3.1.0.mfs /dev/hdc

I would really appreciate someone to advise me about the callfixsub and fixsub31, if they both are needed. Also, look over my hackinit and look over the method to tranfers files to the Dtivo through TeraTerm via serial cable.

Spydertech
10-19-2003, 09:15 PM
First thing's first.

The dssapp stuff - ignore it - that file is modified solely for the theft of service from DTV. besides - the method you are using won't help - the Tivo will just replace it with the original anyway.
Same with the rc.sysinit - and you would be removing it after it runs - so thats useless also.

As for the callXXXXX.tcl stuff - the hackinit looks fine - but you need those files (exactly as hackinit is calling them)
They are to create constantly running loops that call specific scripts after the loop delay.
Those being the files you really want to run at different intervals.

In essence - you have three .tcls you want to run. So you would need those three .tcl files in the /var/hack directory.
Then you need a callXXXX.tcl for each one in /var/hack (these are already named in the hackinit you have copied) And you need the hackinit to call those thre callXXXX.tcl files.

If you have bash - you can just write your new hackinit in a unix compatible editor - transfer it (and all the other .tcl files) to /var/hack then chmod -R 777 /var/hack and restart.

Also - your hackinit line for fixsub31 will work, but you need fixsub to run every now and then - your way it only runs on boot - so you will need to boot everytime the Tivo wants to call in.
create a callfixsub.tcl and change the hackinit line to

/var/hack/callfixsub.tcl &

Edited since I was a complete dummy........
The backup command will work, but I use this one
mfsbackup -f 9999 -6so /mnt/c/whatever.bak /dev/hdX
(X = the tivo drive locale)
for a single drive
mfsbackup -f 9999 -6so /mnt/c/whatever.bak /dev/hdX /dev/hdXX
(X=Tivo drive A XX=Tivo drive B)
for dual drive unit

Note - you will have the original dssapp and rc.sysinit - but, if you are a DTV subscriber - you have no reason to replace them.

FokenNewbee
10-19-2003, 11:57 PM
Thanks Spydertech for the suggtion..I already found a error in the Hackinit file and fixed it.

You stated to, ".....change the hackinit line to /var/hack/callfixsub.tcl &"

Do I want to replace a .tcl file with callfixsub or just add it to the hackinit file? If I need to add it to my hackinit file does it matter where it goes, can I place it under noppv.tcl line?

#!/bin/bash
date>>/var/hack/hackinit.log
echo "Starting Hackinit... " > /dev/ttyS2
PATH=/var/hack/bin:/sbin:/bin:/tivobin:/tvbin:.

#Environmental Variables
TIVO_ROOT=
MFS_DEVICE=/dev/hda10
IGNOREEOF=1000
export PATH TIVO_ROOT MFS_DEVICE IGNOREEOF

echo "Starting Bash... " > /dev/ttyS2
/bin/bash</dev/ttyS2&>/dev/ttyS2&

#FixSub31
echo "Calling FixSub31... " > /dev/ttyS2
/var/hack/fixsub31.tcl

echo "Sleeping for 2 minutes to finish acquire sat.. " >/dev/ttyS2
sleep 120

#CallingNoPPV
echo "Calling Noppv... " > /dev/ttyS2
/var/hack/noppv.tcl &

echo "End of Hackinit... " > /dev/ttyS



If you have bash - you can just write your new hackinit in a unix compatible editor - transfer it (and all the other .tcl files) to /var/hack then chmod -R 777 /var/hack and restart.


Just want to clarify your statement...I write my hackinit in a Unix compatible editor and transfer it to my DTivo along with my other .tcl files...do I need to delete the old hackinit file or can I just write over it? If I do need to delete it can you tell me the command line to do that? And last question in regards to chmod -R 777...I only have to run that once AFTER I tranfers all my .tlc and hackinit files.

Spydertech
10-20-2003, 11:27 AM
OK. first off you need a callfixsub.tcl file that will run the fixsub31.tcl with a loop of so many seconds.

Then edit the line


#FixSub31
echo "Calling FixSub31... " > /dev/ttyS2
/var/hack/fixsub31.tcl

To read
#FixSub31
echo "Calling FixSub31... " > /dev/ttyS2
/var/hack/callfixsub.tcl &

But you need to make sure all the programs are named appropriately.

Also - to remove the existing hackinit
rm /var/hack/hackinit

Then move everything over to /var/hack
then
chmod -R 777 /var/hack

Here is a call fixsub:

while true; do
{
date>>/var/hack/fixsub.log
echo "Running fixsub31... " > /dev/ttyS2
/var/hack/fixsub31.tcl
echo "fixsub will repeat in 23 hours... Goodnight " > /dev/ttyS2

sleep 82800
}

and yes - run the chmod -R 777 once after EVERYTHING is in place.

FokenNewbee
10-20-2003, 12:45 PM
Ok I see what your saying....thanks for your time Spydertech!!! :D :D

ruckus
10-22-2003, 11:36 AM
Originally posted by Spydertech
The backup command will work, but I use this one
mfsrestore -f 9999 -6so /mnt/c/whatever.bak /dev/hdX
(X = the tivo drive locale)
for a single drive
mfsrestore -f 9999 -6so /mnt/c/whatever.bak /dev/hdX /dev/hdXX
(X=Tivo drive A XX=Tivo drive B)
for dual drive unit

Note - you will have the original dssapp and rc.sysinit - but, if you are a DTV subscriber - you have no reason to replace them.

Should that be 'mfsbackup'?

Spydertech
10-22-2003, 01:17 PM
Yes it should.

Sorry about that - it has been edited.....