Results 1 to 9 of 9

Thread: Enhancement script questions - fakecall, TWP mounts rootfs rw, crond & ro filesys

  1. #1
    Join Date
    Jan 2006
    Posts
    9

    Enhancement script questions - fakecall, TWP mounts rootfs rw, crond & ro filesys

    I used the Tivo zipper disk to hack a RCA DVR-80 DirectTivo running 6.2. I pretty much added everything but joe. This unit had a failing drive which I replaced with a 300Gb Seagate. I was able to copy everything from the old disk to the new before it went belly up. After playing with it I have a few questions / problems:

    1: root filesystem mounted readwrite after TWPrun.sh runs.
    2: fakecall runs successfully but next call gets scheduled 1-3 hours later then makes connection.
    3: cron setup writes logs to readonly filesystem?


    #1 (root filesystem readwrite):
    I 1st noticed that my system was complaining about a unclean shutdown and that e2fsck should be run on the root filesystem "/".

    Code:
    kernel: EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
    As I looked further I noticed it ("/") was mounted readwrite. More troubleshooting revealed that the root filesystem is changed to readwrite after the "/enhancements/TWPrun.sh" script is called within the /etc/rc.d/rc.sysinit.author script. Anyone else seen this? I am familiar in bash scripting but not tcl scripts, may have to learn. I don't see anything in the bash scripts, I'm thinking it happens in the hackman module ("/var/hack/tivowebplus/modules/hackman.itcl") called from "/var/hack/tivowebplus/httpd-tt.tcl". Currently I just remount readonly after TWPrun.sh runs but I would like to figure out why it's happening and fix it right. Surely I can't be the only one with this issue. That would mean I screwed up.

    Anyone have any ideas on this one? This is a big script to go through and I get lost right now as I try to get familiar with this code and tcl for that matter.

    Code:
    RCA1-TiVo# cat /enhancements/TWPrun.sh
    #!/bin/sh
    /var/hack/tivowebplus/tivoweb
    RCA1-TiVo# cat /var/hack/tivowebplus/tivoweb
    #!/bin/sh
    export TIVOSH_POOLSIZE=3244032
    shopt -s extglob
    dir=${0%%+([^/])}
    bin=${dir}httpd-tt.tcl
    
    if \[ -f $bin ] ; then
      if [ ${1:-null} == "console" ] ; then
        tivosh $bin &
      else
        if [ -f /var/log/tivoweb.log ] ; then
          mv -f /var/log/tivoweb.log /var/log/Otivoweb.log
        fi
        tivosh $bin >/var/log/tivoweb.log 2>&1 &
      fi
    else
       echo "Error: could not locate httpd-tt.tcl in dir '${dir}'"
    fi
    RCA1-TiVo# grep mount /var/hack/tivowebplus/httpd-tt.tcl
    RCA1-TiVo#

    Code:
    RCA1-TiVo# cat /var/log/tivoweb.log
    TivoWebPlus Project - v1.2.1
    The program comes with ABSOLUTELY NO WARRANTY.
    This program is licensed under the GPL.
    See the 'copyright' and 'README' files for copyright and credit information.
    Config option not recognized: '#Theme ='
    Loading modules...
    backup
    channelprefs
    favicon
    hackman
    --hackman Version 4.0.2--
    -Root directory mounted read-write
    -Tuesday, February 07, 2006, 01:18 AM, local time
    index
    -initializing logo index
    -initializing channel table
    --caching 613 channels for source of type=6 (DirecTV)
    -initializing genre table
    -initializing now showing cache
    -initializing season pass cache
    info
    lj_utils
    logos
    logs
    mail
    manrec
    merge
    mfsbrowser
    mrv
    netconfig
    phone
    resources
    Loaded 0 resource definitions
    sched
    screen
    search
    theme
    ui
    webremote
    whatson
    wishlists
    xplusz
    Accepting Connections
    RCA1-TiVo#


    #2 (fakecall runs successfully but next call gets scheduled 1-3 hours later then makes connection.):

    Could it be because this box is not currently activated or connected to a dish? Also, I did run phonereset.tcl on this box.

    Code:
    Connect via:	Phone
    Last Status:	Failed
    			failed. No dial tone.
    Last Success:	Mon, Feb 6 9:58 am
    Last Attempt:	Mon, Feb 6 10:23 am
    Next Attempt:	Mon, Feb 6 1:22 am
    
    
    
    RCA1-TiVo# fakecall.tcl
    Running fakecall version 6
    Fakecall ran successfully!
    RCA1-TiVo# safereboot.tcl
    rebooting
    
    
    
    Connect via:	Phone
    Last Status:	Failed
    			failed. No dial tone.
    Last Success:	Mon, Feb 6 1:21 pm
    Last Attempt:	Mon, Feb 6 1:51 pm
    Next Attempt:	Mon, Feb 6 2:54 pm

    Code:
    RCA1-TiVo# tivosh
    % mfs_ls /State
    dir: fsid=3548 count=23
          fsid   type     name
          -----------------------------------
          7685   tyDb     Apg
          3603   tyDb     ArmConfig
          3592   tyDb     AvConfig
          3580   tyDb     Avalanche
        510818   tyDb     ClosedCaptioning
          3547   tyDb     Database
          3585   tyDb     GeneralConfig
        510787   tyDir    Keyring
        510807   tyDb     LiveCacheConfig
          3581   tyDb     LocationConfig
        510778   tyDb     LocksLimits
          3586   tyDb     Media
         12862   tyDb     Modem
          3582   tyDb     MyWorld
        699063   tyDir    Network
          3588   tyDir    NvRam
          3579   tyDb     PhoneConfig
        510788   tyDir    ProviderConfig
        699202   tyDir    Registry
          3583   tyDb     SatConfig
          3578   tyDb     ServiceConfig
        510809   tyDb     StaticConfig
        510808   tyDb     UserInfo
    % dumpobj 3579
    PhoneConfig 3579/10 {
      AuthTollFree   = 0
      CallInProgress = 1
      CallStatusInfo = 1
      CallWaitingPrefix = *#
      DialInAreaCode = 703
      DialInNum      = 9950509
      DialInPrefix   = {}
      DialPrefix     = *#
      IndexPath      = /State/PhoneConfig
      LastCallAttemptDay = 13187
      LastCallAttemptSecInDay = 28284
      LastCallStatus = Succeeded
      LastDialInUpdateDate = 13187
      LastSuccessCallDay = 13187
      LastSuccessCallSecInDay = 28284
      LastSuccessPgdCallDay = 13187
      LastSuccessPgdCallSecInDay = 28284
      LocalAreaCode  = 703
      NextCallAttemptDays = 7
      NextCallAttemptSecInDay = 50
      Version        = 2945
    }
    %

    #3 (cron setup writes logs to readonly filesystem):

    This post indicates this is intentional:
    http://www.tivocommunity.com/tivo-vb...&&#post3670030

    Any reason I shouldn't write the logs to /var/log instead?

    Currently, I changes to this:
    */5 * * * * date >> /var/log/zcron.test.out
    Instead of:
    */5 * * * * date >> /var/spool/cron/cronlogs/cron.test.out


    Do I have something setup wrong?

    Cronjob defs in "/var/spool/cron/crontabs/root" write logs to "/var/spool/cron/cronlogs/CRONLOG-MAIN".

    Code:
    >> /var/spool/cron/cronlogs/CRONLOG-MAIN
    which is on a readonly filesystem:

    Code:
    RCA1-TiVo# ls -l /var/spool/
    lrwxrwxrwx    1 root     root           33 Jan 12 04:36 cron -> /enhancements/varhacks/spool/cron
    RCA1-TiVo#
    Code:
    Feb  6 14:58:05 (none) kernel: starting telnet and ftp
    Feb  6 14:58:05 (none) kernel: starting serial bash
    Feb  6 14:58:05 (none) kernel: running fakecall
    Feb  6 14:58:07 (none) kernel: Running fakecall version 6
    Feb  6 14:58:07 (none) kernel: Fakecall ran successfully!
    Feb  6 14:58:07 (none) kernel: couldn't open "/var/spool/cron/cronlogs/CRONLOG-MAIN": read-only file system
    Feb  6 14:58:07 (none) kernel:     while executing
    Feb  6 14:58:07 (none) kernel: "open /var/spool/cron/cronlogs/CRONLOG-MAIN a"
    Feb  6 14:58:07 (none) kernel:     (file "/busybox/fakecall.tcl" line 87)
    Feb  6 14:58:08 (none) kernel: Starting netserver at port 12865

    BTW: I tried to post at the other forum but could not give any info in the post because of this issue:
    [/QUOTE]
    The following errors occurred when this message was submitted:

    1. Your Post contains one or more URLs or image calls, please remove them before submitting your message again. To prevent the abuse of spam, we have set this restriction in place until after you make 5 posts.
    [/QUOTE]

  2. #2
    Join Date
    Nov 2004
    Location
    Gurnee, IL
    Posts
    2,384
    You'll need to talk to the authors of the script -- we don't support it here.

    Having said that, I can tell you that (A) we generally don't recommend mounting root as rw, as the Tivo never runs e2fsck on root (since Tivo assumes it's ro) and since a Tivo shutdown is never clean. (B) fakecall doesn't stop the call from happening; it just eliminates the nags if a call isn't made.

    --chris
    --
    Christopher D. Heer
    Quote Originally Posted by Oscar Wilde
    Perhaps, after all, America never has been discovered. I myself would say that it had merely been detected.

  3. #3
    Join Date
    Dec 2005
    Posts
    296
    Did you read the instructions????

    you are NOT supposed to post support questions here...

  4. #4
    Join Date
    Jan 2006
    Posts
    9
    Thanks Cheer for the quick reply, I'm not sure it's related to the install script but I understand why you can't support everything.

    I agree to keep the root fs readonly and I have a work-around in place. This is obviously a bug most likely unique to my system cause I can't fined anyone else complaining.

    As for e2fsck, that is not possible on the tivo cause you can't unmount the root fs while the OS is up. I had to move the disk to my PC boot Linux and run it there. Actually I was scared to run e2fsck from my Linux distro in case there was some issue with a newer version of e2fsck on the tivo's ext2 partitions. I know the partition tables are different and fdisk -l always tells me its corrupt. I assumed this is cause tivo changed something, perhaps simply added some new partition type defs.

    I thought that when fakecall ran, it should set these values to 3-4 days in the future and that does not happen. They change but only by minutes or hours.:
    Code:
      NextCallAttemptDays = 13188
      NextCallAttemptSecInDay = 26492
    Code:
    RCA1-TiVo# tivosh
    % mfs_ls /State
    dir: fsid=3548 count=23
          fsid   type     name
          -----------------------------------
          7685   tyDb     Apg
          3603   tyDb     ArmConfig
          3592   tyDb     AvConfig
          3580   tyDb     Avalanche
        510818   tyDb     ClosedCaptioning
          3547   tyDb     Database
          3585   tyDb     GeneralConfig
        510787   tyDir    Keyring
        510807   tyDb     LiveCacheConfig
          3581   tyDb     LocationConfig
        510778   tyDb     LocksLimits
          3586   tyDb     Media
         12862   tyDb     Modem
          3582   tyDb     MyWorld
        699063   tyDir    Network
          3588   tyDir    NvRam
          3579   tyDb     PhoneConfig
        510788   tyDir    ProviderConfig
        699202   tyDir    Registry
          3583   tyDb     SatConfig
          3578   tyDb     ServiceConfig
        510809   tyDb     StaticConfig
        510808   tyDb     UserInfo
    % dumpobj 3579
    PhoneConfig 3579/10 {
      AuthTollFree   = 0
      CallInProgress = 1
      CallStatusInfo = 24
      CallWaitingPrefix = *#
      DialInAreaCode = 703
      DialInNum      = 9950509
      DialInPrefix   = {}
      DialPrefix     = *#
      IndexPath      = /State/PhoneConfig
      LastCallAttemptDay = 13187
      LastCallAttemptSecInDay = 62271
      LastCallStatus = Failed
      LastDialInUpdateDate = 13187
      LastSuccessCallDay = 13187
      LastSuccessCallSecInDay = 31052
      LastSuccessPgdCallDay = 13187
      LastSuccessPgdCallSecInDay = 31052
      LocalAreaCode  = 703
      NextCallAttemptDays = 13188
      NextCallAttemptSecInDay = 26492
      Version        = 2973
    }
    % RCA1-TiVo#


    And yes Drez I did read, have a look at my post. I tried desperately to post to the support thread but the dang forum blocked me at every turn. I even tried to add posts to the test and forum feedback forums to get my post count past 5. I did not want to create a bunch of meaningless posts on active forums. I got disgusted and .... Hopefully a forum admin over there will respond to my posts and set me staright.

    Again these may not all be related to install script. They did not write the Fakecall script to my knowledge. So I did not think this would be a big problem posting here. Not the 1st time I was wrong. I only referenced the script in effort to give complete history.

    BTW: I tried to post at the other forum but could not give any info in the post because of this issue:

    The following errors occurred when this message was submitted:

    1. Your Post contains one or more URLs or image calls, please remove them before submitting your message again. To prevent the abuse of spam, we have set this restriction in place until after you make 5 posts.
    And I don't have a single image or url, perhaps my file paths make it mad.

  5. #5
    Join Date
    Jan 2005
    Location
    Narnia
    Posts
    1,263
    #1 root set to R/W instead of readonly. Yes, the Hackman module for TivoWebPlus has a tendency to set root as R/W, otherwise many of its other "features" don't work.

    For what its worth, in the past I've been able to run e2fsck "hot" from the root parition and get away with it -- usually aftera reboot from patching tivoapp.


    #2 AFAIK fakecall only sets the date on the last call attempt, to avoid bothersome nag screens. It doesn't do anything else, so your unsubb'ed tivo is probably setting the next call in the very near future itself.

    #3 Not sure about the cron logs being redirected back to your root partition, but rbautch says that's intended. I have no idea why. You could always delete the symlink if it bothers you.

    And, oh yeah.. [on DDB] the first rule about Zipper Club is... YOU DON'T TALK ABOUT ZIPPER CLUB!

  6. #6
    Join Date
    Jan 2006
    Posts
    9
    Quote Originally Posted by Narf54321
    #1 root set to R/W instead of readonly. Yes, the Hackman module for TivoWebPlus has a tendency to set root as R/W, otherwise many of its other "features" don't work.
    So I'm not going crazy.....

    Quote Originally Posted by Narf54321
    For what its worth, in the past I've been able to run e2fsck "hot" from the root parition and get away with it -- usually aftera reboot from patching tivoapp.
    Thanks, good to know.

    Quote Originally Posted by Narf54321
    #2 AFAIK fakecall only sets the date on the last call attempt, to avoid bothersome nag screens. It doesn't do anything else, so your unsubb'ed tivo is probably setting the next call in the very near future itself.
    Cool, perhaps when I reconnect to satellite and put it back on the plan it will work ok. either way I ran phonereset.tcl which added this prefix which should keep it from getting out.
    Code:
    DialPrefix     = *#
    Quote Originally Posted by Narf54321
    #3 Not sure about the cron logs being redirected back to your root partition, but rbautch says that's intended. I have no idea why. You could always delete the symlink if it bothers you.
    I just left crontab in same location and pointed logs to /var/log

    Quote Originally Posted by Narf54321
    And, oh yeah.. [on DDB] the first rule about Zipper Club is... YOU DON'T TALK ABOUT ZIPPER CLUB!
    Yea sorry bout that. Forget I mentioned it. I remember reading that before but it must have purged over the last week of scouring the boards for help on these issues.

    Been lurking quietly then the 1st time I open my mouth.....

  7. #7
    Join Date
    Oct 2005
    Location
    Rochester, MN 10mi N of the Big Corn
    Posts
    236
    Before running e2fsck on root do a mount -o remount,ro / to make sure root is mounted read only to the OS. I have seen complete root partitions smoked by running e2fsck on them.
    From the man page for e2fsck:
    Note that in general it is not safe to run e2fsck on mounted filesystems. The only exception is if the -n option is specified, and -c, -l, or -L options are not specified. However, even if it is safe to do so, the results printed by e2fsck are not valid if the filesystem is mounted. If e2fsck asks whether or not you should check a filesystem which is mounted, the only correct answer is "no''. Only experts who really know what they are doing should consider answering this question in any other way.
    You may be able add a set of remount commands in the scripts that are executed by cron so that root is mounted rw before the task runs that needs rw access then remount back to ro at the end so the file system is running mostly ro in case of a crash.
    I have seen (df -h) lots of my disk space taken up by orphaned inodes.
    I have looked at zipper and it is a very nice piece of work, however, I have refrained from talking about it here out of respect for both the authors wishes and the wishes of the forum sysops here. It is a great tool for hacking a tivo if everything goes well. It does not however provide you with the depth of knowledge and understanding needed to fix something that you might break. I believe all the answers to the problems you are having are covered in other post through out DDB. Just use the magic search button.
    The more you search, the more you find. The more you read, the more you may learn.
    It is just as important to know the things that DON'T work.

    Attention Newbies -> Start with the document found HERE, I did.
    The opinions expressed in this post are based on my life experiences and may or may not reflect YOUR reality. Use the information provided at your own risk

    6 - S2 - DTivos with a total of 1.1TB storage - Hacked, networked, etc

  8. #8
    Join Date
    Feb 2002
    Posts
    6,413
    Posting support questions for the Zipper script here pretty much paints a bulls-eye on you to get flamed. The authors of the script (Gunnyman and rbautch) have expressly requested that no support questions be posted at dealdatabase in any way, shape, or form or you may have to suffer the consequences. This is clearly posted in the Zipper support thread at the Tivo Community Forum and at the Zipper website. Do not further this discussion here but rather take it to the proper location over at the TCF where it belongs.

    Here's the quote from the Zipper installation instructions:
    Note 2: If you have problems during the installation, post your questions on the TCF support thread here.
    DO NOT mention, link to, or discuss The Zipper at dealdatabase.com. They will NOT help you, and will likely
    vilify you for using an installation script like this.
    Last edited by captain_video; 02-09-2006 at 10:04 AM.
    Please don't PM me or any other members looking for personal assistance. You'll do better by posting (after you've exhausted the search feature, of course) and taking advantage of the collective expertise of the membership instead of a single individual that may or may not be able to help you. Thank you and enjoy your stay at DDB!

  9. #9
    Join Date
    Nov 2003
    Posts
    30

    Hey Cap'n

    Good to see you, remember you from the Dsshelper forums! You got me through alot of Tivo problems back then!

Posting Permissions

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