PDA

View Full Version : Loss of VAR??



tivomaster
07-31-2003, 12:26 PM
Reading the threads it seems that one of the ways that the TIVO looses it's mind is that the VAR directory gets re-initialized. Could we not build a check int the romfs.img rebuild that rebuilds a minimum /var/hacks directory. IE. If /var/hacks doesn't exist then put a mini /var/hacks/hackinit with serial BASH, tivoftpd, and tnlited built in?

That way if the /var/hacks/* got munged at least we would not have to remove our hard drives to get it going again.

MuscleNerd
07-31-2003, 02:34 PM
The correct way to solve this problem is to not use /var for your hacks. It's going to bite you someday if you do. Just create another ext2fs partition and use that. The TiVo software won't ever look for it, won't e2fsck it, won't try to rebuild it, etc.

What you call "loosing it's mind" is really the TiVo doing a pretty smart thing. It tries a few times to e2fsck the partition, and if that fails then it just rebuilds it, all before trying to use it. (Either that, or it's just too full, which should never happen to a box calling in every few days, or even weeks). The ext2fs filesystem (and any non-journaling FS) is not designed for use in a box like TiVo, where power can just be turned off without warning.

TiVo has made some pretty screwy decisions in the past, but the sanity-checking and rebuilding of /var is not one of them.

Anyway, the real point of this post is: create and use your own partition instead of depending on /var.

tivomaster
07-31-2003, 02:44 PM
Originally posted by MuscleNerd
Anyway, the real point of this post is: create and use your own partition instead of depending on /var.

I had never thought of that. All of the instructions that I have read point you to putting the stuff in /var. It seems it would be easier to do it your way and create a seperate partition and put the stuff in there than having the boot process re-create it. Being a n00b though It is a little beyond my eperience level. Have you got a good starting point where what you describe is posted?

Thanks for the recomendations MucleNerd....

BubbleLamp
07-31-2003, 04:36 PM
You can also comment out the section of rc.sysinit that checks the space and deletes/rebuilds /var, and the How-To sticky has directions on how to keep the log files from growing too large in the first place.

tivomaster
07-31-2003, 05:01 PM
Originally posted by BubbleLamp
You can also comment out the section of rc.sysinit that checks the space and deletes/rebuilds /var, and the How-To sticky has directions on how to keep the log files from growing too large in the first place.

Thanks BubbleLamp.
From what I read as long as the TIVO continues to make it's daily calls the var should not grow to the point of it having to rebuild it. Is that Right?

From there can I just delete them periodically? I thinks so but can't find a definitive yes. If so can I delete them all or are there some that I have to leave alone?

:confused:
Man I have to figure out how to efficently use the search engine. My last search returned a thread with 600+ entries. Is there a way to tell which of the 600+ entries my search criteria existed in?

BubbleLamp
07-31-2003, 06:47 PM
I'm not sure making the daily call will keep the logs from causing the rebuild of /var. I use SuperZap's method to turn them into null files, so they NEVER get bigger. This also means they contain no data, so if you wanted to refer to them for some reason, they'll be empty. Other folks just delete them periodically, either manually or via a script. I kill all the files in /var/log and /var/persist.