# Whoops!



## Davyburns (Jan 7, 2004)

Hi
I just started this Tivo malarky this week, and have limited IT expierience.
I installed tivoweb, and it worked, I then installed endpad, sortnc, and startuped 0.2. The first two worked, but I couldnt access the editor, so I followed the instructions to the letter, and rebooted. Now I cant access tivoweb. I can still use telnet, and the nic_config_tivo tells me that the mac address isp and network address havn't changed.

what have I ballsed up this time?

Thanks
Davy


----------



## Raisltin Majere (Mar 13, 2004)

Have a look in rc.sysinit.author and see if tivoweb is referenced in there

if not, this will be why you can't access it.

To check it's working you can telnet to tivo and cd /var/hack/tivoweb-tcl (or whatever the directory is) and type ./tivoweb console

If you don;t get an error try and connect via your browser.


----------



## Davyburns (Jan 7, 2004)

Hi, and thanks
That got me to "accepting connections", and i tried 192.168.1.200 and it worked! but there is no sign of the editor. At least I have tivoweb again!! is it likely that I will have to follow this procedure every time? or might in be easier to re-install tivoweb again.
Thanks again
Davy


----------



## verses (Nov 6, 2002)

Davyburns said:


> is it likely that I will have to follow this procedure every time?


If tivoweb isn't mentioned in your /etc/rc.d/rc.sysinit.author file then you either need to add it to that file OR you will need to manually start it via telnet after each reboot.

Assuming you installed tivoweb to the standard installation path, the line you should have in the /etc/rc.d/rc.sysinit.author file (it doesn't get put there automatically by the installation, you need to manually add it) should look something like this (although it may vary slightly);


```
/var/hack/tivoweb-tcl/tivoweb >>/dev/null 2>&1 &
```
Hope that helps,

Ian


----------



## Davyburns (Jan 7, 2004)

Thanks, Ian, but how do I add that line without the editor? I tried to install startuped 0.2, and that seemed to be what started the problem. Is there any other way of adding it?
Thanks again
Davy


----------



## blindlemon (May 12, 2002)

How did you install TiVoWeb? 

If you used my twinst.zip method then you will have the joe editor already installed - just go the /etc/rc.d folder and type

joe rc.sysinit.author

Make your edits and then press CTRL+K X to save and exit.


----------



## Fred1 (Dec 10, 2002)

Could this be a simple "path" (not sure if this an exclusive DOS term or if applies to Linux too) error?


----------



## Davyburns (Jan 7, 2004)

Thanks Blindlemon, I did use your twinst and joe is there, but I expected to see a normal configuration file, and all I got was

IW rc.sysinit.author (Modified Row 2 Col 1

#!/bin/bash
if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi

Is this right? if so, can you point me to a tutorial please.
Thanks
Davy


----------



## blindlemon (May 12, 2002)

Ahh, that's something to do with startuped. 

Never used it myself so I can't help, but I'm sure someone who has will be along soon


----------



## johala_reewi (Oct 30, 2002)

You access startuped via tivoweb. Having got Tivoweb started, when you browse to your tivo, you should have a tivoweb menu option called Startup Editor. Choose this and you can edit the startup script. You should have something like this.

#!/bin/bash
# Start endpad
/var/hack/endpad.tcl -s 5 -e 20 -auto >>/dev/null &
# Start tivoweb
/var/hack/tivoweb-tcl/tivoweb &


----------



## Davyburns (Jan 7, 2004)

Thanks Johala, I was beginning to give up hope.
After my last post, the Tivo went through a full reset. Guided setup I think they call it. When it was done, It still played in Mode 0, and the logos were still there. so i didnt do anything more til I got your post.
I tried to connect to Tivoweb using 192.168.1.200, but ie wouldnt connect, I sarted tivoweb and got this
Welcome to the wonderful world of TiVo... 

bash: /var/hack/scripts/makero.sh: No such file or directory

Bash /var/tmp #cd /var/hack/tivoweb-tcl
bash: cd: /var/hack/tivoweb-tcl: No such file or directory
Bash /var/tmp #
Bash /var/tmp #cd var/hack
bash: cd: var/hack: No such file or directory
Bash /var/tmp #
Bash /var/tmp #cd /var
Bash /var #
Bash /var #mkdir /var/hack
Bash /var #
Bash /var #cd /var/hack/tivoweb-tcl
bash: cd: /var/hack/tivoweb-tcl: No such file or directory
and the last two lines were after I'd ftp,d the twinst into the hack file.
I tried the command dir to find out what was in /Var/hack but it came back with
Bash /var/hack #
Bash /var/hack #dir
bash: dir: command not found
dont know what I,ve done wrong.
By the way, as I recall, when I had tivoweb working, the only editor on there was the resource editor.
Thanks
Davy


----------



## TCM2007 (Dec 25, 2006)

Looks like you lost you whole /var partition - it happens sometimes. You'll need to set everything up from scratch with regard to TiVoweb. the Mode 0 hack isn't held on /var so that's why it survived.

dir isn't a Linux command - use ls


----------



## Davyburns (Jan 7, 2004)

TCM2007 said:


> Looks like you lost you whole /var partition


Dont think so, after the first line, the bash promt defaulted to /var/temp.
the hack directory wasnt there, but the var directory must have been, musn't it?
by setting every from scratch, do you mean that apart from mode 0, nothing else will have to be re-installed? as I said, the new logos that I put in last week are still there.
Thanks again
Davy


----------



## johala_reewi (Oct 30, 2002)

Sometimes, Tivo resets the /var partition so /var will always be there as will /var/temp but /var/hack (which is not a standard tivo directory) will disappear.

Mode 0 and logos (AFAIR) are not held in /var/hack so will survive a tivo /var reset.

Yes, you will have to install tivoweb, endpad, etc. again.

Moral of story. Take a backup of /var/hack and keep it on your PC.


----------



## Pete77 (Aug 1, 2006)

johala_reewi said:


> Sometimes, Tivo resets the /var partition so /var will always be there as will /var/temp but /var/hack (which is not a standard tivo directory) will disappear.


But its not exactly an everyday occurrence or problem. It has never happened to me once so far in three years of running Tivoweb, says he touching wood, crossing his fingers and tightly holding his four leafed clover.

Loss of the /var/hack directory normally only occurs either because your Tivo hard drive is on the way out or because the machine has been repeatedly disconnected from the mains for only a few seconds over a short period. For example it gets powered off for 2 seconds seven times in an hour. Unfortunately Tivo imagines these frequent reboots caused by powercuts to be a sign its hard drive is failing so clears everything down (including /var/hack) to try to get back to normal. It is best to have your Tivo on a UPS (Uninterruptable Power Supply) to avoid the risk of this happening.

I suppose using ftp and blindlemon's twinst.zip there must be a way to reinstall it all again without pulling the drive.

Once you get a Tivoweb configuration you are happy with its best to copy the whole directory structure to your local hard drive and also off on to DVD or a backup hard drive orwhatever so that if this happens again you just can restore the whole directory structure via FTP.


----------



## mikerr (Jun 2, 2005)

The /var partition gets wiped if 
a) the partition gets full .. so don't throw a load of mp3s on it!
b) tivo doesn't complete a disk check twice (i.e. reboots before its finished).


----------



## blindlemon (May 12, 2002)

Davyburns said:


> the hack directory wasnt there


Yes, you have suffered a /var re-write.

If that was one of my drives, or a Hooched drive then you can re-install /var with a single command from the bash prompt - PM me for details


----------



## Pete77 (Aug 1, 2006)

blindlemon said:


> If that was one of my drives, or a Hooched drive then you can re-install /var with a single command from the bash prompt - PM me for details


It was established in an earlier post in this thread that it was not a drive that came from you, Mike or Dave. Instead it was provided by some other unknown third party.

That being so is it not still possible to reinstall Tivoweb via FTP using twinst.zip?


----------



## mikerr (Jun 2, 2005)

/var wipes don't kill ftp or telnet.

So yes, its easy enough to reinstall all your hacks over ftp without a drive pull.

All my preconfigured drives now have an auto-restore of /var when its been wiped - no keypresses necessary 

(It's basically a tar of /var/hack stored on the root / which is restored if /var/hack doesn't exist on bootup - there's a thread on it somewhere)


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> All my preconfigured drives now have an auto-restore of /var when its been wiped - no keypresses necessary


So a further evolution compared to a certain competitor's product then.

Isn't competition a wonderful thing for the Tivo consumer.


----------



## blindlemon (May 12, 2002)

Pete77 said:


> It was established in an earlier post in this thread that it was not a drive that came from you, Mike or Dave. Instead it was provided by some other unknown third party.


The messages


```
Welcome to the wonderful world of TiVo...

bash: /var/hack/scripts/makero.sh: No such file or directory
```
strongly imply that it was one of my drives or at least created with Hooch.

Edit: Just realised that could be because the OP installed TiVoWeb with twinst.zip - doh!


----------



## blindlemon (May 12, 2002)

Pete77 said:


> So a further evolution compared to a certain competitor's product then.


And cheaper too, I'm surprised you failed to point out


----------



## TCM2007 (Dec 25, 2006)

Pete77 said:


> But its not exactly an everyday occurrence or problem. It has never happened to me once so far in three years of running Tivoweb, says he touching wood, crossing his fingers and tightly holding his four leafed clover.


Certainly not every day, but happened several times to me on several TiVos.



> Loss of the /var/hack directory normally only occurs either because your Tivo hard drive is on the way out or because the machine has been repeatedly disconnected from the mains for only a few seconds over a short period. For example it gets powered off for 2 seconds seven times in an hour. Unfortunately Tivo imagines these frequent reboots caused by powercuts to be a sign its hard drive is failing so clears everything down (including /var/hack) to try to get back to normal. It is best to have your Tivo on a UPS (Uninterruptable Power Supply) to avoid the risk of this happening.


As ever with Pete, there's a glimmer of truth in his received wisdom.

It's nothing to do with how many times in an hour, although two resets an unlucky time apart can do it.

What happens is this.

At each restart, TiVo runs the Linux equivalent of chkdsk on the /var partition. It runs it with the option set to auto-fix errors. Errors are pretty common, as anyone whose run chkdsk on a Windows PC will know; they are not particularly concerning in and of themselves. If TiVo detects that errors have been found, it then runs the program a _second _time. If there are still errors - ones which therefore were not fixed by the first run of the program, it deletes the whole /var partition and re-creates it from scratch.

So if you had the bad luck to have a /var partition with an error on it, and the TiVo powers down before it's finished its error-fixing pass, when it restarts the way the various flags work means that it will think it's on the second pass, the errors will still be there, and so it will wipe /var.



> Once you get a Tivoweb configuration you are happy with its best to copy the whole directory structure to your local hard drive and also off on to DVD or a backup hard drive orwhatever so that if this happens again you just can restore the whole directory structure via FTP.


tivoftpd doesn't deal with file permissions properly, so that won't work. You need to create a tarball containing all the files and directories and back that up. There are several threads which explain it all, and some folks have even automated this.


----------



## TCM2007 (Dec 25, 2006)

mikerr said:


> The /var partition gets wiped if
> a) the partition gets full .. so don't throw a load of mp3s on it!


I think this is a TiVo urban myth. There's certainly no code in rc.sysinit which would do that.


----------



## Davyburns (Jan 7, 2004)

Hi All,
Managed to get tivoweb installed, but have trouble with the syntax to uncomress the endpad file. Is it because of the tar.tar suffix? also, my directories are now in parenthasis

Welcome to the wonderful world of TiVo hacking 
Filesystem on / set to READONLY - type rw to make READ/WRITE
TiVo: {/var/tmp} &#37; rw
File system is now READ/WRITE.
TiVo: {/var/tmp} %
TiVo: {/var/tmp} % cd /var/hack
TiVo: {/var/hack} %
TiVo: {/var/hack} % ls
00ui.itcl joe sortnp.versionlog
bin joe.tar startuped.itcl
endpad-1.4.2-md5.tar.tar joerc tbin.tar
fixmwstate.tcl newtext2osd tivoweb-tcl
folder-s2-p2.PNG rc.sysinit.author.new tivoweb-tcl-1.9.4.tar
fpga7114.o_lj_20030922 scripts tw_setup
install.sh sortnp.tcl ukgenre.js
TiVo: {/var/hack} %
TiVo: {/var/hack} %

Any clues?
Davy


----------



## Davyburns (Jan 7, 2004)

I read my own post and wondered - I wonder if it is the tar.tar. suffix thats causing the bother, so i renamed it on my pc, ftp'd it up and ran
cd /var/hack
gzip -d endpad-1.4.2-md5.tar
cpio -H tar -i < endpad-1.4.2-md5.tar
Wich ended up with 
Welcome to the wonderful world of TiVo hacking 
Filesystem on / set to READONLY - type rw to make READ/WRITE
TiVo: {/var/tmp} &#37; rw
File system is now READ/WRITE.
TiVo: {/var/tmp} %
TiVo: {/var/tmp} % cd /var/hack
TiVo: {/var/hack} %
TiVo: {/var/hack} % ls
00ui.itcl joe startuped.itcl
bin joe.tar tar
endpad-1.4.2-md5.tar joerc tbin.tar
endpad-1.4.2-md5.tar.tar newtext2osd tivoweb-tcl
fixmwstate.tcl rc.sysinit.author.new tivoweb-tcl-1.9.4.tar
folder-s2-p2.PNG scripts tw_setup
fpga7114.o_lj_20030922 sortnp.tcl ukgenre.js
install.sh sortnp.versionlog
TiVo: {/var/hack} %
TiVo: {/var/hack} % cd /var/hack
TiVo: {/var/hack} %
TiVo: {/var/hack} % gzip -d endpad-1.4.2-md5.tar
gzip: endpad-1.4.2-md5.tar: unknown suffix -- ignored
TiVo: {/var/hack} %
TiVo: {/var/hack} % cpio -H tar -i < endpad-1.4.2-md5.tar
cpio: invalid header: checksum error
cpio: premature end of file
TiVo: {/var/hack} %
TiVo: {/var/hack} %

So, I'm no further forward.
I wish a Tivo guru, with too much time on his hands would write a book called command lines for Tivo's for biginners

Davy


----------



## johala_reewi (Oct 30, 2002)

You could try reading linux for beginners.


----------



## Davyburns (Jan 7, 2004)

trying to, but theres no substitute for expierience.
Davy


----------

