Page 7 of 24 FirstFirst ... 5678917 ... LastLast
Results 91 to 105 of 352

Thread: Overview of Hacking an S3

  1. #91
    Join Date
    Dec 2004
    Posts
    831
    Quote Originally Posted by chumley View Post
    A huge thank you to lrhorer and others who have contributed to this board and thread!!
    You're welcome.


    Quote Originally Posted by chumley View Post
    - I used the scripts in post 39 as is, with one caveat:

    Before performing the hack, you need to manually create /hack/saved_Apps, or else add this line to the hack_tivoapp script:
    test -d /hack/Saved_Apps/ || mkdir /hack/Saved_Apps/

    Note to lrhorer: I suggest adding this to your hack_tivoapp script in post 39.
    Sure, why not?

    Quote Originally Posted by chumley View Post
    After the Tivo was hacked, it also took me a bit to figure out how to configure upgradesoftware=false to disable automatic software updates. Here's the basic procedure.

    1) Figure out which drive your Tivo drive is (/dev/sda, /dev/sdb, ...)

    2) Check current bootpage params. For example, if your drive is /dev/sdb:
    ./bootpage -p /dev/sdb
    It can also be added as an environment variable to rc.sysinit.
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  2. #92
    Join Date
    May 2007
    Posts
    449
    I'm not trying to sound appreciative because I am more appreciative than you know. However, you pros could help us newbies if you would just finish your sentences.

    It so happens I am using an external USB enclosure. Thanks to Jamie's detailed instructions to Svenn I actually used Tivopart and have Linux recognizing my drive as sdb. Man was I proud of that and thought I was in the home stretch until I got to this part of the instructions. Now I know to you pros this is an obvious statement but to a newbie like me you might as well have written the instructions in Russian because I preceded to spend 3 hours googling in an attempt to unravel this brain teaser of a mystery.

    One user employed a USB - SATA adapter that caused Linux to think it was a floppy, causing the script to fail. Modifying the check in line 9 at the top of the script fixed the issue for him.
    My best guess is this was the line he changed "for dspec in /dev/sd?;"

    Now for the big question, what did he change the line to?

    I can mount the different partitions and do just about anything else but I can't figure out how to modify the script to make it run with my external USB drive. I even replaced all the $dspec with /dev/sdb and still can't get it to run.

    Short story... I do customer service and when placing a certain order in one of our systems you hit F4 to advance to the next screen. At the second to the last screen you have to hit F9 or you'll be in a continual loop. I asked the instructor why F9 isn't in the instructions and he responded, "because everyone knows you hit F9 at that screen". So I said "except anyone who needs to read the instructions". He said, "right, that's how you learn" and walked away.

    There is no F9 in the instructions to this day...

  3. #93
    Join Date
    Dec 2004
    Posts
    831
    Quote Originally Posted by Soapm View Post
    My best guess is this was the line he changed "for dspec in /dev/sd?;"
    Um, no, not in his case. It might be in yours, although from your comments above it appears not. See below. Oh, and that's not line 9, BTW.

    Quote Originally Posted by Soapm View Post
    Now for the big question, what did he change the line to?
    Actually, I did it for him, but the short answer is, "To what Linux was expecting."

    The long answer is this:
    Udev creates the device file targets based upon what it believes the device in question to be. In his case, and possibly in yours, the closest thing to a removable USB hard drive is a floppy, so instead of something like

    Code:
    RAID-Server:/dev# ll sd*
    brw-rw---- 1 root disk 8,   0 Jun  5 01:15 sda
    brw-rw---- 1 root disk 8,   1 Jun  5 01:15 sda1
    brw-rw---- 1 root disk 8,   2 Jun  5 01:15 sda2
    brw-rw---- 1 root disk 8,   2 Jun  5 01:15 sda3
    brw-rw---- 1 root disk 8,  16 Jun  5 01:15 sdb
    brw-rw---- 1 root disk 8,  32 Jun  5 01:15 sdc
    brw-rw---- 1 root disk 8,  48 Jun  5 01:15 sdd
    the long listing of his system looked something like

    Code:
    RAID-Server:/dev# ll sd*
    brw-rw---- 1 root disk    8,   0 Jun  5 01:15 sda
    brw-rw---- 1 root disk    8,   1 Jun  5 01:15 sda1
    brw-rw---- 1 root disk    8,   2 Jun  5 01:15 sda2
    brw-rw---- 1 root disk    8,   3 Jun  5 01:15 sda3
    brw-rw---- 1 root disk    8,  16 Jun  5 01:15 sdb
    brw-rw---- 1 root disk    8,  32 Jun  5 01:15 sdc
    brw-rw---- 1 root floppy  8,   0 Jun  5 01:15 sdd
    where /dev/sdd was his TiVo drive sitting on a USB adapter. Depending on the version of Linux you are using, it could be a number of different things. You will need to look and see. Look at the pertinent lines in the script:

    Code:
    for dspec in /dev/sd?;
    do
            # Check the target is a hard drive then Attempt to load the drive partitions
            # Change the "disk" string if Linux thinks the drive is not a hard drive
            ls -l $dspec | grep -q disk
    The "for dspec in /dev/sd?;" line sets the value of $dspec successively to every target in the /dev directory starting with the characters "sd". If your kernel is a recent one (2.6.26 or later), then this is probably what the prefix of the TiVo drive target will be. Depending on the device driver, however, it could wind up being /dev/hdx, or some such. Try the following: From the command prompt, type the command `ls -l /dev/sd*`. Do you see the TiVo drive there? At this point, it won't have any identifiable partitions (unless you have already run tivopart on it), so there will be only one identifier for it. Other drives will likely have partitions showing up as /dev/sdX1, /dev/sdX2, etc. If not, try `ls -l /dev/hd*`. If you still have problems figuring out which drive is the TiVo drive, let us know. If your TiVo drive is /dev/sdX, then this portion of the script is OK. If it is /dev/hdX or some such, then the line needs to be changed. You mentioned, however, that you had gotten tivopart to run and that your drive is /dev/sdb. If running `tivopart r /dev/sdb` results in 11+ partitions showing up under /dev/sdb, then indeed your TiVo drive is /dev/sdb.

    Now look at the first comment (line 7): "Check the target is a hard drive..." How does the script do this? In line 9 it takes the variable $dspec, and does a long listing for that string, which should output one or more lines from the /dev directory. It then pipes that output to the grep command which searches for a sub-string within the input (formerly output) string. If grep finds the string "disk" within the source string, then it returns a value of 0. The next line, "if [ $? -eq 0 ];" checks for this, and if it is true, then the script presumes it is a disk and tries to see if the drive is a Tivo drive. If your drives appears as type "floppy" or any type other than "disk", then the script will ignore it, and ultimately, not finding any potential targets, it will quit with an error. In such a case, you should change the line

    Code:
    ls -l $dspec | grep -q disk
    to

    Code:
    ls -l $dspec | grep -q xxxxx
    where xxxxx is whatever string Linux is reporting as the drive type for your TiVo. Take a look at the second comment (line 8). I mention this change there.

    Alternately, you could simply run `tivopart r /dev/xxxxxx` on the drive you know is the TiVo externally to the script, explicitly set dspec to /dev/xxxxx in the script, and eliminate the drive checking portion at the top of the script.

    And I did finish my sentence.
    Last edited by lrhorer; 11-13-2011 at 01:19 PM.
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  4. #94
    Join Date
    May 2007
    Posts
    449
    This command doesn't work on my system so I can see the results

    Code:
    RAID-Server:/dev# ll sd*
    /dev# = no such file or directory

    ll = command not found

    I can do a df command that gives me this;

    Code:
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/sda1             74928288   3836904  67285228   6% /
    tmpfs                   511972         0    511972   0% /lib/init/rw
    udev                    507552       316    507236   1% /dev
    tmpfs                   511972         0    511972   0% /dev/shm
    /dev/sdb9               253823      9801    230915   5% /media/4d57299c-1e9b-11b2-8649-620b738d62fb
    /dev/sdb7               253823     93783    146933  39% /media/30ebf05e-0c2d-11e1-8124-183fd52b1b2c
    /dev/sdb4               253823    154926     85790  65% /media/0f23ba78-f6c6-11e0-99c0-c4a8a9eb555a
    the sdb9, sdb7 & sdb4 are partitions on my Tivo drive...

    I think I got you now...

    Code:
    root@Lennie:/# ls -l /dev/sd*
    brw-rw---- 1 root disk   8,  0 Nov 13 09:34 /dev/sda
    brw-rw---- 1 root disk   8,  1 Nov 13 09:34 /dev/sda1
    brw-rw---- 1 root disk   8,  2 Nov 13 09:34 /dev/sda2
    brw-rw---- 1 root disk   8,  5 Nov 13 09:34 /dev/sda5
    brw-rw---- 1 root floppy 8, 16 Nov 13 09:58 /dev/sdb
    brw-rw---- 1 root floppy 8, 17 Nov 13 09:58 /dev/sdb1
    brw-rw---- 1 root floppy 8, 26 Nov 13 09:58 /dev/sdb10
    brw-rw---- 1 root floppy 8, 27 Nov 13 09:58 /dev/sdb11
    brw-rw---- 1 root floppy 8, 28 Nov 13 09:58 /dev/sdb12
    brw-rw---- 1 root floppy 8, 29 Nov 13 09:58 /dev/sdb13
    brw-rw---- 1 root floppy 8, 30 Nov 13 09:58 /dev/sdb14
    brw-rw---- 1 root floppy 8, 31 Nov 13 09:58 /dev/sdb15
    brw-rw---- 1 root floppy 8, 18 Nov 13 09:58 /dev/sdb2
    brw-rw---- 1 root floppy 8, 19 Nov 13 09:58 /dev/sdb3
    brw-rw---- 1 root floppy 8, 20 Nov 13 10:31 /dev/sdb4
    brw-rw---- 1 root floppy 8, 21 Nov 13 09:58 /dev/sdb5
    brw-rw---- 1 root floppy 8, 22 Nov 13 09:58 /dev/sdb6
    brw-rw---- 1 root floppy 8, 23 Nov 13 10:31 /dev/sdb7
    brw-rw---- 1 root floppy 8, 24 Nov 13 09:58 /dev/sdb8
    brw-rw---- 1 root floppy 8, 25 Nov 13 10:30 /dev/sdb9
    so yes it is there as sdb but it looks like it is a floppy...

    Ok, so I am getting past that point but now the script is stopping here...

    Code:
    Copying Files...
    Copying tivohacks64...
    tar: /hack/tivohacks64.tar: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    
    Writing new tivoapp
    /hack/hack.sh: line 116: /hack/hack_tivoapp: No such file or directory
    /hack/hack.sh: line 117: syntax error near unexpected token `then'
    /hack/hack.sh: line 117: `then'
    I did modify your tivohack64 file with alpha wolfs all in one and a couple of other hacks I wanted. Looks like I need a different command to extract my compressed file. I should be able to figure this out... Thanks.
    Last edited by Soapm; 11-13-2011 at 01:11 PM.

  5. #95
    Join Date
    Dec 2004
    Posts
    831
    Quote Originally Posted by Soapm View Post
    This command doesn't work on my system so I can see the results

    Code:
    RAID-Server:/dev# ll sd*
    /dev# = no such file or directory

    ll = command not found
    That's because on my system I have an alias set that tells the system ll = ls -la. That alias is not on your system. That's why my instructions to you used the long form: `ls -l /dev/sd*`.

    Quote Originally Posted by Soapm View Post
    I can do a df command that gives me this;

    Code:
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/sda1             74928288   3836904  67285228   6% /
    tmpfs                   511972         0    511972   0% /lib/init/rw
    udev                    507552       316    507236   1% /dev
    tmpfs                   511972         0    511972   0% /dev/shm
    /dev/sdb9               253823      9801    230915   5% /media/4d57299c-1e9b-11b2-8649-620b738d62fb
    /dev/sdb7               253823     93783    146933  39% /media/30ebf05e-0c2d-11e1-8124-183fd52b1b2c
    /dev/sdb4               253823    154926     85790  65% /media/0f23ba78-f6c6-11e0-99c0-c4a8a9eb555a
    the sdb9, sdb7 & sdb4 are partitions on my Tivo drive...
    OK, that means /dev/sdb is indeed your TiVo drive. The script doesn't expect to find them mounted in /media, but that shouldn't matter.

    Quote Originally Posted by Soapm View Post
    so yes it is there as sdb but it looks like it is a floppy...
    Evidently many USB drives show up as floppy drives. Changing the string "disk" to "floppy" in line 9 should fix that issue.

    Code:
    Copying Files...
    Copying tivohacks64...
    tar: /hack/tivohacks64.tar: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    
    Writing new tivoapp
    /hack/hack.sh: line 116: /hack/hack_tivoapp: No such file or directory
    /hack/hack.sh: line 117: syntax error near unexpected token `then'
    /hack/hack.sh: line 117: `then'
    Do you have a directory named /hack, and does it contain all the files you will be using to hack the TiVo? Per this message, it's not finding either tivohacks64.tar or hack_tivoapp.

    Quote Originally Posted by Soapm View Post
    I did modify your tivohack64 file with alpha wolfs all in one and a couple of other hacks I wanted. Looks like I need a different command to extract my compressed file. I should be able to figure this out... Thanks.
    It should not be compressed. A tar file is not compressed. The file on my website is compressed, as I recall, so you will need to gunzip it before use, or else modify the line in the script to add the "z" switch to the tar command. Any file you wish to include on the TiVo can be put into the tar file wherever you want it to wind up on the TiVo. You could also just copy them over by hand. I liike keeping a single tar file with all of the hack files in one lump. Here is a partial listing of the files in the example tivohacks.tar file I supplied:

    Code:
    drwxr-xr-x root/root         0 2008-07-20 18:04 etc/
    -rwx--x--x root/root       259 2008-07-20 18:04 etc/profile
    drwx--x--x root/root         0 2010-10-23 20:50 etc/rc.d/
    -r-xr-xr-x root/root       224 2010-10-23 20:50 etc/rc.d/rc.sysinit.author
    -rwx--x--x root/root        26 2008-07-20 10:57 etc/bash_logout
    drwxr-xr-x root/root         0 2008-07-20 17:51 sbin/
    -rwxr-xr-x root/root        19 2008-02-02 02:31 sbin/iptables
    drwxr-xr-x root/root         0 2008-07-20 17:51 utils/
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/bunzip2 -> busybox
    -rwxr-xr-x root/root        40 2008-02-02 23:41 utils/read-only
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/strings -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/hostname -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/fuser -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/pipe_progress -> busybox
    -rwxr-xr-x root/root     34276 2007-02-11 13:13 utils/hexdump
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/date -> busybox
    -rwxr-xr-x root/root     71816 2008-07-20 17:28 utils/mfs_import
    -rwxr-xr-x root/root    131776 2007-02-11 13:13 utils/diff
    -rwxr-xr-x root/root     67640 2008-07-20 17:28 utils/mfs_ls
    -rwxr-xr-x root/root      1036 2007-02-11 13:13 utils/dbload
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/ls -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/crond -> busybox
    -rwxr-xr-x root/root     32360 2007-02-11 13:13 utils/cmp
    -rw-r-xr-x root/root       993 2008-07-20 17:28 utils/mfs_tmfstream
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/top -> busybox
    -rwxr-xr-x root/root   1848592 2007-02-11 13:13 utils/busybox
    -rwxr-xr-x root/root     63496 2008-07-20 17:28 utils/mfs_poke
    -rwxr-xr-x root/root      6415 2007-02-11 13:13 utils/Superpatch67Standby.tcl
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/test -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/more -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/vi -> busybox
    -rwxr-xr-x root/root    379259 2007-02-11 13:13 utils/wget
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/ipcalc -> busybox
    -rwxr-xr-x root/root        40 2008-02-02 23:39 utils/read-write
    -rwxr-xr-x root/root    168248 2008-07-20 17:28 utils/mfs_burstcmds
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/tty -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/chroot -> busybox
    -rw-r-xr-x root/root       600 2008-07-20 17:28 utils/mfs_stream
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/ftpget -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/md5sum -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/seq -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/uptime -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/mkswap -> busybox
    -rwxr-xr-x root/root     37056 2007-02-11 13:13 utils/xargs
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/traceroute -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/sed -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/touch -> busybox
    -rwxr-xr-x root/root    157940 2007-02-11 13:13 utils/unzip
    -rwxr-xr-x root/root    178808 2008-07-20 17:28 utils/tserver
    -rwxr-xr-x root/root     71848 2008-07-20 17:28 utils/vserver
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/ifconfig -> busybox
    -rwxr-xr-x root/root    157816 2008-07-20 17:28 utils/mfs_getslice
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/gzip -> busybox
    -rwxr-xr-x root/root     57932 2007-02-11 13:13 utils/tivoftpd
    -rwxr-xr-x root/root     67608 2008-07-20 17:28 utils/vplay
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/telnet -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/unix2dos -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/[[ -> busybox
    -rwxr-xr-x root/root    363628 2007-02-11 13:13 utils/tar
    -rwxr-xr-x root/root      3765 2008-02-02 09:31 utils/drmcheck.tcl
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/msh -> busybox
    -rwxr-xr-x root/root    123008 2007-02-11 13:13 utils/patch
    -rwxr-xr-x root/root     67656 2008-07-20 17:28 utils/mfs_findzero
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/kill -> busybox
    -rwxr-xr-x root/root    159000 2007-02-11 13:13 utils/locate
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/cat -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/reset -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/false -> busybox
    -rwxr-xr-x root/root    153400 2008-07-20 17:28 utils/NowShowing
    -rwxr-xr-x root/root    145080 2008-07-20 17:28 utils/ciphercheck
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/which -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/e2fsck -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/yes -> busybox
    -rwxr-xr-x root/root     67784 2008-07-20 17:28 utils/mfs_tzoffset
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/lsmod -> busybox
    -rwxr-xr-x root/root     72056 2008-07-20 17:28 utils/mfs_info
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/bzcat -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/ash -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/nohup -> busybox
    -rwxr-xr-x root/root    241868 2007-02-11 13:13 utils/find
    -rwxr-xr-x root/root    172552 2008-07-20 17:28 utils/mfs_uberexport
    -rw-r-xr-x root/root       802 2008-07-20 17:28 utils/mfs_export
    -rwxr-xr-x root/root     63448 2008-07-20 17:28 utils/mfs_purge
    -rwxr-xr-x root/root     32672 2007-02-11 13:13 utils/sdiff
    -rwxr-xr-x root/root     67624 2008-07-20 17:28 utils/mfs_bitmap
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/cut -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/tail -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/watch -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/free -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/ping -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/env -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/awk -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/zcat -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/head -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/[ -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/echo -> busybox
    -rwxr-xr-x root/root     87356 2008-07-20 17:28 utils/mfs_dumpschema
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/netstat -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/ftpput -> busybox
    -rwxr-xr-x root/root    145048 2008-07-20 17:28 utils/mfs_streams
    -rwxr-xr-x root/root    166952 2007-02-11 13:13 utils/ps
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/pidof -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/clear -> busybox
    -rwxr-xr-x root/root    145196 2008-07-20 17:28 utils/mfs_dumpobj
    -rwxr-xr-x root/root     12941 2007-02-11 13:13 utils/TuikHelper.tcl
    -rwxr-xr-x root/root     63496 2008-07-20 17:28 utils/mfs_dump
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/hush -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/getopt -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/setsid -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/gunzip -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/dos2unix -> busybox
    -rw-r-xr-x root/root      1279 2008-07-20 17:28 utils/mfs_tarstream
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/true -> busybox
    lrwxrwxrwx root/root         0 2011-10-03 17:53 utils/expr -> busybox
    -rwxr-xr-x root/root     63448 2008-07-20 17:28 utils/mfs_fsidtype
    drwxr-xr-x root/root         0 2009-04-18 03:10 var/
    drwxr-xr-x root/root         0 2011-10-03 17:58 var/hack/
    drwxr-xr-x root/root         0 2008-04-13 14:21 var/hack/etc/
    -rw-r--r-- root/root        20 2008-04-13 14:23 var/hack/etc/npf.txt
    -rw-r--r-- root/root         0 2008-04-13 14:23 var/hack/etc/npfauto.txt
    drwxr-xr-x root/root         0 2011-10-03 17:54 var/hack/TivoWebPlus/
    drwxr-xr-x root/root         0 2011-10-03 17:55 var/hack/TivoWebPlus/config/
    -rw-r--r-- root/root      1431 2011-10-03 17:55 var/hack/TivoWebPlus/config/tivoweb.cfg
    -rw-r--r-- root/root      1827 2011-10-03 17:55 var/hack/TivoWebPlus/config/dyncfg.cfg
    -rw-r--r-- root/root      8621 2011-10-03 17:55 var/hack/TivoWebPlus/config/module.cache
    drwxr-xr-x root/root         0 2009-04-18 03:20 var/hack/TivoWebPlus/libs/
    -rw-r--r-- root/root      5331 2009-02-23 14:26 var/hack/TivoWebPlus/libs/util.itcl
    drwxr-xr-x root/root         0 2009-04-04 18:05 var/hack/TivoWebPlus/libs/CVS/
    -rw-r--r-- root/root       555 2009-04-04 18:05 var/hack/TivoWebPlus/libs/CVS/Entries
    Last edited by lrhorer; 11-13-2011 at 01:43 PM.
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  6. #96
    Join Date
    Dec 2004
    Posts
    831
    Code:
    Writing new tivoapp
    /hack/hack.sh: line 116: /hack/hack_tivoapp: No such file or directory
    /hack/hack.sh: line 117: syntax error near unexpected token `then'
    /hack/hack.sh: line 117: `then'
    I don't see how that error could be coming from my script. There is no "then" statement after the /hack/hack_tivoapp line. That's the last line of the script.
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  7. #97
    Join Date
    May 2007
    Posts
    449
    I agree, I don't see a then in the script but that is what I get when I run the script. I must be running the script wrong or something.

    Also, somehow it seems like my Tivo drive is unwritable and always busy. I can't add, remove or modify anything on the drive not even after rebooting. All the fines in SBIN have locks on them which is what I think is causing the problem with the iptables. I just can't figure out what that means or what to do about it.

  8. #98
    Join Date
    Dec 2004
    Posts
    831
    Quote Originally Posted by Soapm View Post
    I agree, I don't see a then in the script but that is what I get when I run the script. I must be running the script wrong or something.
    PM me with a copy of the script exactly as you are using it.

    Quote Originally Posted by Soapm View Post
    Also, somehow it seems like my Tivo drive is unwritable and always busy. I can't add, remove or modify anything on the drive not even after rebooting. All the fines in SBIN have locks on them which is what I think is causing the problem with the iptables. I just can't figure out what that means or what to do about it.
    From your PC, or within the running TiVo? On the running TiVo, the mount is read-only. It needs to be changed to read-write.

    `mount -o remount,rw /`

    If you are having trouble from the Linux machine, what is the output of the `mount` command with no options?
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  9. #99
    Join Date
    Dec 2004
    Posts
    831
    I made another little change to the main script. Now it can user either the compressed (tivohacksxx.tar.gz) or uncompressed (tivohacksxx.tar) version of the hack tarball.
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  10. #100
    Join Date
    Oct 2011
    Posts
    49

    Stupid problems

    I have been at this literally for 8 hours. I am not so good at linux but stupid things are tripping me up.

    I tried to use the script essentially as is on a booted ubuntu 11 machine. my tivo drive is sdb
    it doesn't show any partitions as other have and it errors out right away a couple of different ways.
    Code:
    jon@server:~/hack$ ls -l /dev/sdb
    brw-rw---- 1 root disk 8, 16 2011-11-15 19:50 /dev/sdb

    I put all the files in hack directory but had a million problems with it not letting me run all the files because of errors and such and needing to modify the files for access for everyone. Being only so so at linux, I tried to change permissions but it seems almost impossible to change them on the root (/hack) folder so that I can actually run the files.

    I never got it right in /hack so I moved it to /home/jon/hack and tried to adjust the script to get it to run then. Still no joy. errors below.

    Code:
    jon@server:~/hack$ sudo bash hack_tivo  (is this the right command?)
    hack_tivo: line 2: $'\r': command not found
    hack_tivo: line 3: $'\r': command not found
    hack_tivo: line 4: $'echo\r': command not found
    hack_tivo: line 6: home/jon/hack/bootpage: No such file or directory
    hack_tivo: line 18: syntax error near unexpected token `$'in\r''
    'ack_tivo: line 18: `case $tivo_type in
    trying to run the original script in the hack directory I get

    Code:
    jon@server:~/hack$ sudo bash hack_tivo
    hack_tivo: line 2: $'\r': command not found
    hack_tivo: line 3: $'\r': command not found
    hack_tivo: line 4: $'echo\r': command not found
    hack_tivo: line 6: home/jon/hack/bootpage: No such file or directory
    hack_tivo: line 18: syntax error near unexpected token `$'in\r''
    'ack_tivo: line 18: `case $tivo_type in
    I then changed the part to the actual drive I know is the tivo sdb in the statement

    Code:
    #!/bin/bash
    
    tvalid=1
    # Scan for TiVo partitions
    for dspec in /dev/sdb;
    do
            # Check the target is a hard drive then Attempt to load the drive partitions
            # Change the "disk" string if Linux thinks the drive is not a hard drive
            ls -l $dspec | grep -q disk
            if [ $? -eq 0 ];
    but that still errors. So next I tried forgetting all that and stripping the script minus the first part and starting with....

    Code:
    echo
    # Get the active root partition using bootpage (assumes root=/dev/hdaX is the first parameter).
    root=$( /hack/bootpage -p $dspec | cut -d" " -f1 )
    echo $root | grep -q "root=/dev/hd"
    if [ $? -ne 0 ];
    But that errors out too. I am sure I am just doing something stupid but don't know what.

    I am trying to put my tivo back together to record some shows. I am going to do this on a live tivo, that also has an external drive connected to it with shows.

    I did the prom mod fine, no problems but I am stuck with something I am missing here. No doubt it is like a 5 second fix so any help greatly appreciated.

    Also for anyone wondering my hack directory looks like this:
    Code:
    jon@server:/hack$ ls
    bootpage    bootpage.tar  hack_tivoapprunning  null-linuxrc.img.gz
    bootpage2   hack.fil      hack_tivo.sh         replace_initrd.x86.tar.gz
    bootpage.c  hack_tivo~    hack_tivo.sh~        tivohacks64.tar
    bootpage.h  hack_tivoapp  Makefile             tivopart
    with several of the items in red, that I don't know how to fix. It seems ubuntu recognizes me as jon, but then it won't let me change permissions in those folders or something. Which is why I tried the /home/jon/hack route and still had errors. In that directory everything is green but still gets errors mentioned above.

    BTW this is for a Tivo HD that has had nothing done to it but the prom hack. Thanks in advance for your help and sorry for my stupidity. I have read this thread and others many times leading up to this and tried about a hundred things today still to no joy yet. Also ubuntu is fresh install on quad core xp computer.
    Last edited by sanjonny; 12-03-2011 at 12:53 AM.

  11. #101
    Join Date
    May 2007
    Posts
    449
    I'm the last guy that should be offering advice since I will confess me and Linux don't get a long at all but if you read lrhorer responses to me you will figure out some of your questions.

    Now look at the first comment (line 7): "Check the target is a hard drive..." How does the script do this? In line 9 it takes the variable $dspec, and does a long listing for that string, which should output one or more lines from the /dev directory. It then pipes that output to the grep command which searches for a sub-string within the input (formerly output) string. If grep finds the string "disk" within the source string, then it returns a value of 0. The next line, "if [ $? -eq 0 ];" checks for this, and if it is true, then the script presumes it is a disk and tries to see if the drive is a Tivo drive. If your drives appears as type "floppy" or any type other than "disk", then the script will ignore it, and ultimately, not finding any potential targets, it will quit with an error. In such a case, you should change the line<snip>

    Other drives will likely have partitions showing up as /dev/sdX1, /dev/sdX2, etc. If not, try `ls -l /dev/hd*`
    I think this is what helped me "If not, try `ls -l /dev/hd*`" and what I discovered is Linux say my Tivo drive as a floppy. So in line 9 I had to change the word "disk" to "floppy".

    Also, in your terminal if you're not doing so type "su". It will then ask for the root password. This will give you the access you need to run the script.

    I also had trouble running the script with ubantu and ended up switching to Desbian and had a lot better luck.

    Unfortunately for us lrhorer will be otherwise occupied the next few days but hopefully one of the other forum pro's will fill in for him...

  12. #102
    Join Date
    Oct 2011
    Posts
    49
    Thanks, I used sudo which I thought / think is similar and su sometimes. What makes no sense is the errors. Line two in the script has nothing on it? Assuming that it is dos style line in which every line is numbered including comments and the errors make no sense to me either. The errors with $/r are not even in the script so it is all screwy. I only used ubuntu because someone else had success as it tends tone not so helpful to me. I also think the privileges thing is a big part of the problem, because I kept getting errors. Like in the console I am logged in as Jon but in terminal as root and I couldn't change the privileges on the hack directory to make it so everyone can execute.

    Sadly, I can do dos well and used to be able to do unix but linux is different than unix in how it assigns lots of things and commands that make no sense to me because in one distribution you do it one way and another it is different which is why I have pulled my hair out in the past.

    I even tried skipping the whole check section and starting lower but still got the errors, which again must be something silly that I just don't get. I am guessing it's a permission problem at it's base but the GUI permission changer won't let me modify the root hack folder and the chmod thinks I don't own the directory when sudo chmod .... So I can't change it there either. I am sure some linux expert is rolling over laughing by now at the stupid error I am making, but I don't know what it is so hopefully after they finish laughing they can direct me to the fix. I thought the chip mod was going to be the hard part since I haven't soldered boards in 15 years, and normally, at least in my replays, I can do the Linux stuff straight from a boot disk and easily modify the drives or whatever, so this shouldne be so hard for me, but alas, it has been to this point. Additionally I am leaving for a two week biz trip tomorrow so I was hoping I could get the mod done so I can at least delete my shows remotely once I transfer them via kmttg (somEthing I think the hd should have had years ago anyway) as my TiVo always fills up when gone that long.
    Last edited by sanjonny; 11-16-2011 at 02:11 PM.

  13. #103
    Join Date
    May 2007
    Posts
    449
    I'm at work but finally had a chance to read your post more thoroughly. Here are a couple of thoughts. I hope they help.

    I tried to use the script essentially as is on a booted ubuntu 11 machine. my tivo drive is sdb it doesn't show any partitions as other have and it errors out right away a couple of different ways.

    jon@server:~/hack$ ls -l /dev/sdb
    brw-rw---- 1 root disk 8, 16 2011-11-15 19:50 /dev/sdb
    Read this post http://www.dealdatabase.com/forum/sh...012#post313012

    I put all the files in hack directory but had a million problems with it not letting me run all the files because of errors and such and needing to modify the files for access for everyone. Being only so so at linux, I tried to change permissions but it seems almost impossible to change them on the root (/hack) folder so that I can actually run the files.
    You might try running chmod 755 “file” on each of the files. This makes them executable.

    jon@server:~/hack$ sudo bash hack_tivo (is this the right command?)
    hack_tivo: line 2: $'\r': command not found
    hack_tivo: line 3: $'\r': command not found
    hack_tivo: line 4: $'echo\r': command not found
    hack_tivo: line 6: home/jon/hack/bootpage: No such file or directory
    hack_tivo: line 18: syntax error near unexpected token `$'in\r''
    'ack_tivo: line 18: `case $tivo_type in
    Running tivopart the way Jamie says in the link I posted may help this.


    Also for anyone wondering my hack directory looks like this: jon@server:/hack$ lsbootpage bootpage.tar hack_tivoapprunning null-linuxrc.img.gz
    bootpage2 hack.fil hack_tivo.sh replace_initrd.x86.tar.gz
    bootpage.c hack_tivo~ hack_tivo.sh~ tivohacks64.tar
    bootpage.h hack_tivoapp Makefile tivopart
    with several of the items in red, that I don't know how to fix. It seems ubuntu recognizes me as jon, but then it won't let me change permissions in those folders or something. Which is why I tried the /home/jon/hack route and still had errors. In that directory everything is green but still gets errors mentioned above.
    Bootpage should not be a tar file. You need to unzip it because that is how the script determines your root partition. Looks like you also have some uncompiled files in your directory. Not that they hurt but they’re not needed.


    Thanks, I used sudo which I thought / think is similar and su sometimes. What makes no sense is the errors. Line two in the script has nothing on it? Assuming that it is dos style line in which every line is numbered including comments and the errors make no sense to me either.
    You may need to run dos2unix on the script. You may have invalid character endings.
    Last edited by Soapm; 11-16-2011 at 04:56 PM.

  14. #104
    Join Date
    Oct 2011
    Posts
    49
    Thanks soap, unfortunately I don't think I will be able to get back to it for about 15 days now unless I somehow get it started in the morning. Of course your help generated more questions. For anyone reading this, I have hacked my replaytvs, all my android phones, my iPad, my kindle and other stuff Linux but this is so confusing as someone coming in with not a ton of TiVo hacking knowledge that it literally hurts.

    This will be short and ugly since I am using an iPad and typing sucks on them.

    In the part of this thread where the script starts, I read and re-read the instructions, but most of the people here have been hacking tivos for years so you know what all the tools are. I can tell you, even after reading hundreds of threads, a TiVo newbie doesn't and it isn't spelled out anywhere, lots of things like hey, here is the new init.imagers.linuxsomething that will be so much better than boot2x4fred. That is how the threads read to a new person, so the you search on that and you find one person who says, hey, I hate init.imagers.linuxsomething because villa.loves.me is so much better and blackhat.tools is deprecated.

    Hours later you still might not know what the current best version is because the threads go round and round, and in some people ask similar questions that I have and others say nasty stuff to them about their Linux knowledge or not understand and if you don't understand, don't hack your TiVo or whatever.

    So all that was venting, but hopefully you will see the frustration that is created trying to start from zero.

    Back to the script, which I have read every line at least a hundred times but again, if new you don't know all the commands or what does what. One the post 39 page he says to take all the tools and put them in the hack root directory which I did(kinda) the reason there are extra is because I don't know what boot page ine the zip is the executable portion hence what do I need to include and what not, which is why I kinda copied it all into hack and tried from there, which of course didn't work. More specific questions in the next post.

    I like the script, and hopedit would work for me
    Last edited by sanjonny; 11-17-2011 at 03:28 AM.

  15. #105
    Join Date
    Oct 2011
    Posts
    49
    Soap again thanks for your help and anyone reading this, iPad autocorrection sucks so bear with me.

    Anyway, I feel the guys frustration in the other post which i read all of. He wants to do the same thing I do which is just pull off the damn cable card blocked files.

    I seem to remember somewhere earlier in the This thread that he said you could use (he being lrhorer) the tar form so I unzipped some files that far, but I guess I needed to go even further, I must have misunderstood what could be in tar and what couldn't.


    Why the dos2unix? Is it because it was edited in dos or something? I edited it in gedit also, but originally cut and pasted the script in notepad. Essentially I downloaded all the files, extracted them and cut and pasted the script in windows, put them on a thumb drive and hooked that into my ubuntu boot. Had no problems copying the file using nautilus, but after that the he'll began.

    One other question about line numbers. What is up with line two error which is blank in my version of the script, or is it different in Linux?

    Obviously I know a little Linux but almost no TiVo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •