TiVo Community Forum banner
1 - 20 of 22 Posts

·
Registered
Joined
·
2,001 Posts
Discussion Starter · #1 ·
I've been rebooting my Tivo ALOT lately (see http://www.tivocommunity.com/tivo-vb/showthread.php?t=360675 ) and would like to find a way to do it gracefully.

Pulling the plug, using "restart the recorder" from the UI, running /sbin/restart or using the reboot binary all crash the system resulting in corruption on the var partition. I'm not surprised that people lose their hacks!

Is there another binary or script that exists which will shutdown the Tivo properly? I always worry about the potential for database corruption that isn't reported since the partitions are not mounted normally.
 

·
It wasn't me.
Joined
·
1,385 Posts
I've rebooted my TiVo plenty of times while tinkering with scripts, and have not once had fsck run. I've even used 'reboot' from the shell prompt and not seen a problem.

So I'm wondering if your tinkering has made the TiVo unstable.

Also - is your root partition set to read only before a reboot or RW? I'm wondering if rebooting while in RW mode is causing the problem.
 

·
Registered
Joined
·
2,001 Posts
Discussion Starter · #3 ·
Check your kernel log. e2fsck always runs even if the FS is clean. I tested this by pulling the drive and cleaning the var partition and then placing it back into the Tivo. I didn't mean mfsfix/gsod. The closest thing I can think of is running
Code:
sync ; reboot
But even that still causes some corruption on var

Here is an example of what to look for.
Code:
Jan  1 00:03:18 (none) kernel: Loading input section drivers
Jan  1 00:03:18 (none) kernel: [b]Cleanup /dev/hda9 pass 1[/b]
Jan  1 00:03:18 (none) kernel: ext2fs_check_if_mount: No such file or directory
Jan  1 00:03:18 (none) kernel: /dev/hda9 was not cleanly unmounted, check force
Jan  1 00:03:18 (none) kernel: Deleted inode 28712 has zero dtime.
Jan  1 00:03:18 (none) kernel: Set dtime? yes
Jan  1 00:03:18 (none) kernel:
Jan  1 00:03:18 (none) kernel: Fix summary information? yes
Jan  1 00:03:18 (none) kernel:
Jan  1 00:03:18 (none) kernel: /dev/hda9: 505/32768 files (4.0% non-contiguous)
Jan  1 00:03:18 (none) kernel: Cleanup /dev/hda9 pass 2
Jan  1 00:03:18 (none) kernel: ext2fs_check_if_mount: No such file or directory
Jan  1 00:03:18 (none) kernel: /dev/hda9: clean, 505/32768 files, 27338/131072
Jan  1 00:03:18 (none) kernel: /dev/hda9 is clean after pass 2
 

·
Registered
Joined
·
2,001 Posts
Discussion Starter · #5 ·
I edited my first post to include restart. It does it too. Here is the log entries from using /sbin/restart

Code:
Jan  1 00:03:19 (none) kernel: Loading input section drivers
Jan  1 00:03:19 (none) kernel: Cleanup /dev/hda9 pass 1
Jan  1 00:03:19 (none) kernel: ext2fs_check_if_mount: No such file or director
Jan  1 00:03:19 (none) kernel: /dev/hda9 was not cleanly unmounted, check forc
Jan  1 00:03:19 (none) kernel: Fix summary information? yes
Jan  1 00:03:19 (none) kernel:
Jan  1 00:03:19 (none) kernel: /dev/hda9: 529/32768 files (6.0% non-contiguous
Jan  1 00:03:19 (none) kernel: Cleanup /dev/hda9 pass 2
Jan  1 00:03:19 (none) kernel: ext2fs_check_if_mount: No such file or director
Jan  1 00:03:19 (none) kernel: /dev/hda9: clean, 529/32768 files, 32223/131072
Jan  1 00:03:19 (none) kernel: /dev/hda9 is clean after pass 2
Jan  1 00:03:19 (none) kernel: Mounting /var
I'm going to now try
sync ; mount -o remount,ro /var ; restart
even though it doesn't take car of the MFS partitions.
 

·
TiVoCentral.co.uk
Joined
·
2,589 Posts
running restart at least tries to dismount /var ...

bash-2.02# restart
Killing processes...
Dismounting /var
Couldn't dismount /var
Restarting system...
umount -f /var
gives the mesage that forced umounts aren't implemented yet :(

fuser -km /var

but fuser isn't on tivo series1, unless there is a binary floating around the net ?
 

·
Registered
Joined
·
2,001 Posts
Discussion Starter · #7 ·
Haha I was just going to post the exact same thing not including fuser.

My attempt above using "sync ; mount -o remount,ro /var ; restart > /var/reboot.log" resulted in me getting stuck at a "mount: /var is busy" prompt and I cant undo it :(

Ive been doing all my testing remotely using telnet and a slingbox so it seems I might be done for the night!
 

·
Serious TiVo User
Joined
·
892 Posts
rebooting by pulling the plug or using the shutdown in the UI shouldn't lose /var.

In my experience, what causes my /var partition is pulling the plug while a reboot is in progress or possibly immediately after TiVo has rebooted while system tasks are still being completed.
 

·
Registered
Joined
·
2,001 Posts
Discussion Starter · #9 ·
Even if thats the case any of the current methods of rebooting the system cause some type of errors on the partition and I dont like it. Try it yourself. Afterword search your kernel log for "cleanup"

Looks like there was a discussion about something similar on the other forum http://xaddr.com/sh

Edit: Hmm this is getting a little better but not quite http://forums.oztivo.net/showthread.php?t=962
 

·
Registered
Joined
·
1,605 Posts
aerialplug said:
In my experience, what causes my /var partition is pulling the plug while a reboot is in progress or possibly immediately after TiVo has rebooted while system tasks are still being completed.
Your local electricity company can also do it remotely by cutting your power twice in quick succession.
 

·
Registered
Joined
·
3,948 Posts
Those error messages just seem to indicate that the "unmounted cleanly" flag (if that's what it's called) isn't set. I can't see this does any harm? /var is only wiped if it fails a second check.
 

·
Registered
Joined
·
2,098 Posts
aerialplug said:
iankb said:
Your local electricity company can also do it remotely by cutting your power twice in quick succession.
Yes, I suffered this last December.
I stuck a cheap UPS on mine to prevent it all going to pot when the power goes out for a couple of minutes which was quite regular over winter. Pleased to learn this should save me more than the odd recording!

I can recommend this 500VA one - you'll need to convert a power strip to a kettle lead connection.
http://cpc.farnell.com/jsp/search/productdetail.jsp?SKU=CS1324907
£33 inc VAT + delivery or free delivery if your exVAT order is over £40.
 

·
TiVoCentral.co.uk
Joined
·
2,589 Posts
TCM2007 said:
What do you mean? TiVo's output is always interlaced.
One of my tivos does that too... tivo seems to get its video output clock rate confused, all display including menus are all affected. Its like the effect you get when a PC is its outputting a scan rate the monitor can't handle (no picture roll though)

Its been doing it once a week or so for the past 2 years, and hasn't got any worse. A reboot cures it, and recordings are unaffected.
 

·
Registered
Joined
·
2,001 Posts
Discussion Starter · #17 ·
The best solution I have found so far is to use
Code:
/bin/sync ; /sbin/restart
This still results in the error on startup that the FS was not unmounted but at least there aren't other errors. The /sbin/restart binary tries to unmount var but is unable to because the FS is in use. I think tivoweb and mfs_ftp are to blame so I'm going try and create a scrip that syncs the disk, kills the offending app and then runs the combination sync;restart.

Code:
bash-2.02# sync ; restart
Killing processes...
Dismounting /var
Couldn't dismount /var
Restarting system...
TmkLogger:
 

·
Registered
Joined
·
2,001 Posts
Discussion Starter · #19 ·
Nice! Ill try that. Its kinda funny but I was planning to re enable mode0 on my tivo and after searching I found a post by myself that I didn't even remember writing that had all the settings in it LOL
 

·
Registered
Joined
·
3,948 Posts
mikerr said:
I've just found a post from yourself saying you have the fuser binary, so

fuser -km /var

kills any processes that are using /var
then you should be able to unmount it.

fuser -um /var

would show which processes are using /var
Careful; forcibly killing a process running under tivosh which has the databse open can (and usually does) make the TiVo crash and reboot in anything but a nice way!

That's why EndPad, mfs_ftp and other have these convoluted ways of unloading themselves, 'cause kill -9 ends up with the "Almost there..." screen.
 
1 - 20 of 22 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top