1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixes for MFSTools 2.0 swap problems

Discussion in 'TiVo Upgrade Center' started by Robert S, Jul 31, 2002.

  1. Aug 6, 2002 #41 of 609
    Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    I don't know if this applies to the version of Linux running on TiVo. It certainly might apply to the version on the Tom's Root and Boot Disk I used (quite an old one, something like 1.7 (of TR&B)).

    mkswap did say something like 'truncating swap file to ' and gave a number that I think did start with 133. That was what got me paranoid about file lengths, wondering if dd had created a file that was too large for the TiVo's swap partition.

    TiVo are unlikely to have fiddled with the VM on their kernel. I would think a swap partition create the way I suggest would work.

    It's not easy to create another swap partition on your B drive as that drive will be full of MFS partitions. TiVo doesn't need the speed of multiple swap partition.

    I do wonder, though, if you needed emergency swap for a mfsfix whether you could set up a swap file on /var.

    However, it does seem that 64Mb of swap is plenty for TiVo running later than TiVo OS 2.0 and it's only when you get no swap at all that people seem to have real problems.
     
  2. Aug 6, 2002 #42 of 609
    enigma2175

    enigma2175 Long Member

    63
    0
    Apr 1, 2002
    Yeah, a swap file in /var/ might come in super-handy. However, I generally don't have much room in /var and it is getting smaller all the time. But a simple swap file rather than a partition might make it easier for some people to get their TiVos running again.
     
  3. Aug 6, 2002 #43 of 609
    Ivor

    Ivor New Member

    13
    0
    Aug 5, 2002
    Middlesex UK
    I have a Thompson (UK) TiVo with factory fitted 30Gb and 15Gb drives which I want to upgrade to 2 x 120Gb, probably this weekend. Since I'd prefer to have partitions with 1Mb blocks and an increased swap file (to avoid repercussions with fsfix), I don't mind experimenting a bit. I'll try MFStools with the -r 0 and -s 128 options, followed by Robert's procedure above, and let you know what happens. :)
     
  4. Aug 6, 2002 #44 of 609
    Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    Unfortunately we don't know that -r 0 fixes the GSOD problem and I don't know how to run mfsassert without a shell on the TiVo. Can you add mfsassert -please to the start up script the same way I added mkswap? The system should then reboot and green screen. (Does that sound right klincoln?)
     
  5. Aug 7, 2002 #45 of 609
    Ivor

    Ivor New Member

    13
    0
    Aug 5, 2002
    Middlesex UK
    OK - Once I've confirmed I've got a working 128Mb Swap file, I'll add mfsassert -please to rc.sysinit and see if it recovers.

    Question - when fsfix finishes repairing a partition successfully, does it usually reboot the box or just continue with startup? If it reboots, I'd need to interrupt the process at some point to prevent getting into a perpetual loop <break - fix - reboot - break - fix - reboot ...>.
     
  6. Aug 7, 2002 #46 of 609
    Brad Bishop

    Brad Bishop Member

    285
    0
    Sep 11, 2001
    Atlanta, GA
    I went back last night and checked my DirecTiVo which I had upgraded with a 80GB drive. It looked fine as far as the swap file goes. I did notice, though, that it was at 64MB instead of what I had been reading here (128MB). I understand what swap files do but I am left wondering if there's some great increase in performance or need for a 128MB swap file.

    Also, I'm thinking about taking out the 80GB drive and giving it to my daughter (she's building a PC) and putting a 120GB drive inside it. I remember reading a while ago that TiVo would slow down noticably with drives over 100GB. Is this still an issue or is it related to the swap file size or it being corrupted?

    Thanks,

    Brad
     
  7. Aug 7, 2002 #47 of 609
    Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    Ivor, you'd probably need to catch it on that first reboot and reset the sysinit before letting it green screen.

    Brad, I don't think swap size affects the user speed I upgraded with TiVoMad and went to 128Mb and that was noticably slower than the original 40Gb config. That drive then died and MFS Tools 2.0 came out while the drive was being replaced. With MFS Tools 2.0 the TiVo feels very similar to how it did with the 40GB despite now being a 120 and having 11 pages in NP, even with no swap at all! The problem with no swap was that the indexer got stuck, not that the TiVo was unresponsive.

    I think you should be find with 64Mb of swap, but there are several methods in this thread for fixing any swap problems you may have.
     
  8. Aug 7, 2002 #48 of 609
    Cpen

    Cpen CPenRun

    50
    0
    Jul 12, 2002
    Cambridge, MA
    I upgraded to a single 120GB Hard drive. I've noticed no change in speed - more importantly, neither has my wife (beleive me, when she knows I've been monkeying with something, she's quick to let me know if I broke it or made it worse).

    In the absence of the swap file problem (I don't have the swap problem - did not use -s 128), I think the only real slowdown you will see is in some "live" calculations made by TiVo - For example, the Season Pass manager - it may take much longer to calculate changes/additions as it has many more scenarios and data to sort through to calculate available space, potential conflicts, priorities, etc. It's this kind of live calculation that will get slower with more available/stored information to take into account! (I don't have enought season passes, wish lists, etc to have this get noticably slower, but with the new hard drive, I'm well on my way).

    One live process that probably wont be effected is searching for programs to record. You're still working with the same amount of guide data (2 weeks).

    I'm guessing that the swap file problem caused MAJOR slow downs because TiVo's indexing engine used the swap file to speed up indexing. Without the ability to index, a bunch of stuff probably get hosed - Program Guide, searching for programs to record, etc.
     
  9. Aug 7, 2002 #49 of 609
    deek_man

    deek_man New Member

    42
    0
    Jul 26, 2002
    Washington, DC
    I upgraded my Phillips HD112 about three weeks ago and just checked the (kernel) log files using backdoors.

    It read:

    "activating swap partitions"
    "adding swap:65532 swap-space (priority-1)"

    I guess that means everything is ok.

    I used MFS Tools 2.0 and Hinsdale's Upgrade Configuration #2 (dated July 8, 2002) to restore my original 14 hour drive backup on to a virgin 100 gb Maxtor and I also added a second virgin 100 gb Maxtor.

    The restore command I used is as follows:

    mfsrestore -zpi /mnt/dos/tivo.bak /dev/hdb

    My original backup was made using:

    mfsbackup -6so /mnt/dos/tivo.bak /dev/hdc

    I used the following command to expand the two drives:

    mfsadd -x /dev/hdc /dev/hdb (note: no -s command)

    I now have a 250 hour machine and have had no problems that I'm aware of over the past several weeks of use. Hope this helps.;)
     
  10. Aug 7, 2002 #50 of 609
    Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    It's actually the mfsrestore command that affects swap, by the time you get to the mfsadd stage, your swap is already set up.

    Anyway, thanks for the input.
     
  11. Aug 7, 2002 #51 of 609
    deek_man

    deek_man New Member

    42
    0
    Jul 26, 2002
    Washington, DC
    Sorry about that. I know where to plug in the cables but my understanding is a little superficial The restore command I used is as follows:

    mfsrestore -zpi /mnt/dos/tivo.bak /dev/hdb

    My original backup was made using:

    mfsbackup -6so /mnt/dos/tivo.bak /dev/hdc

    Swap is ok and box works great (see previous post). Hope that's a little more helpful.
     
  12. Aug 8, 2002 #52 of 609
    Ivor

    Ivor New Member

    13
    0
    Aug 5, 2002
    Middlesex UK
    Update:

    I started my upgrade yesterday, having first made and tested a divorced backup of my original drives.

    mfsbackup -Tao - /dev/hda /dev/hdb | mfsrestore -r 0 -s 128 -xzpi - /dev/hdc /dev/hdd was used to copy my original a and b drives to the new ones using standard sized blocks and an expanded 128Mb Swap partition.

    As expected the swap partition signature was not recognized by TiVo, and when the new drives were placed in the system this resulted in a perpetual reboot/GSOD/pause/reboot loop.

    The disks were returned the disks to my PC to try and fix the swap partition which was expected to be found on /dev/hdc8.

    TiVoMad disagreed, however, giving the following:
    Code:
    Partition check:
     hda: hda1 
    {my Windows hdd}
    Code:
     hdc:Signature 9214, be16 Signature 1492
    Blocks in Map - 10
     mac st=1 sz=3f name='Apple' t='Apple_partition_map' bim=10
     hdc1 mac st 51ff040 sz=1000 name='Bootstrap 1' t='Image' bim=10
     hdc2 mac st=5200040 sz=1000 name='Kernel 1' t='Image' bim=10
     hdc3 mac st=5201040 sz=40000 name='Root 1' t='Ext2' bim=10
     hdc4 mac st=5241040 sz=1000 name='Bootstrap 2' t='Image' bim=10
     hdc5 mac st=5242040 sz=1000 name='Kernel 2' t='Image' bim=10
     hdc6 mac st=5243040 sz=40000 name='Root 2' t='Ext2' bim=10
     hdc7 mac st=5283040 sz=40000 name='Linux swap' t=Swap' bim=10
     hdc8 mac st=52c3040 sz=40000 name='/var' t='Ext2' bim=10
    
     hdc9   } various MFS regions
     hdc10  }
     hdc11  }
     hdc12  }
     hdc13  }
     hdc14  }
    
     hdc15 ... name='Extra' t='Apple_Free' bim=10
     hdc16 
    {blank}

    I haven't had a chance to look at my original drives again, but it would seem that the partition labels do not match their contents. The log files I expected to have found in '/var' were all on hdc9; hdc8 was unmountable and hdc7 appeared to contain a root directory rather than a swap file. This is about as far as I got before I had to stop.

    Any ideas why the partition names appear to have changed?

    Ivor.
     
  13. Aug 8, 2002 #53 of 609
    Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    I think this is just the rather confusing layout of the boot-up partition table list. If you use pdisk you'll see the labels are correct, and your experiments with mount also verified it. (7 is root, 8 is unmountable because it's swap and 9 is var.)

    If you look closely you'll see that the first partition (Apple_partition_map) doesn't have a number and hdc16 doesn't point at anything. Perhaps on this list the partition names are at the end of the lines and wrap around to the beginning of the next line on an 80 col screen?
     
  14. Aug 8, 2002 #54 of 609
    Ivor

    Ivor New Member

    13
    0
    Aug 5, 2002
    Middlesex UK
    That would make most sense - in fact it seems quite obvious now that you've pointed it out, I'm surprised I didn't think of it! :)

    In any case, I'm about to revisit fixing the swap file shortly. Wish me luck! :)
     
  15. Aug 8, 2002 #55 of 609
    Ivor

    Ivor New Member

    13
    0
    Aug 5, 2002
    Middlesex UK
    Robert was right - pdisk displays the partitions correctly, the version shown at boot up was what confused me! Anyways...

    The new A disk was removed from my Tivo and rc.sysinit was modified to add mkswap /dev/hda8 at the start of the file. The disk was then returned to the TiVo and the box rebooted.

    Mkswap ran and the swap file was created successfully (from the kernel log at next reboot):

    mkswap: warning: truncating swap area to 130752kB
    Setting up swapspace, size = 133885952 bytes
    ...
    Activating swap partitions
    Adding Swap: 130684k swap-space (priority -1)


    So far so good, but then after a while it continued with:

    Time set to: Thu Aug 8 22:58:36 2002
    Have a nice day.
    Checking for additional disk...
    hdb: Generic ATA management
    Starting EventSwitcher...
    Filesystem is inconsistent - cannot mount!
    Writing 207040 bytes to OSD at address 0
    Filesystem assert: cbMap >= sBucket at fszone.C line 170 in FsZone::FsZone(bool, enum FsZoneOwner, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, bool = false)
    Filesystem flagged as inconsistent!
    Tmk Assertion Failure: cbMap >= sBucket
    FsZone::FsZone(bool, enum FsZoneOwner, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, bool = false), line 170 (fszone.C)
    Tmk Fatal Error: Thread main <78> died due to signal -2


    at which point, following a few seconds of GSOD, the box reboots...

    Back to the drawing board. :)
     
  16. Aug 8, 2002 #56 of 609
    kingmiwok

    kingmiwok New Member

    11
    0
    Aug 8, 2002
    Idaho
    I upgraded a series 2 AT&Tivo 40 G to a 120/120 with MFS2.0 about a 5 days ago. Unfortunately I used the dreaded -s 128 option and did not discover the swap problems discussed here untill afterward. Dang.

    Symptoms: It boots OK and will run for about a day, then I get a UI lockup. It keeps recording though, I just can't get menu control. After reboot it runs fine for another 24hr or so.

    I have every reason to believe I have the swapfile problem, but when I access the logs with the backdoor, I do not actually find the....

    "activating swap space"
    "unable to find swap-space signature"
    "swapon: Invalid argument"

    ....entry. Actually, I can't find anything listed on the swap file activation? Am I looking in the wrong place? var/log/kernel, right?

    Is it significant that I can not find this in the log file? I should find it within the time-area for the most recent boot, correct? What other activity in in the log in the same general area?

    Any input would be apreciated.

    Note: I did find, in another log file, a line that stated (something like) "swap file size 0000000". All the other files/partitions listed had significant file sizes.

    Thanks.
     
  17. Aug 8, 2002 #57 of 609
    Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    You'll see it fairly early on in the boot sequence, the date will be in January because the clock has not been set at that point. There will be three lines of error messages if it fails, but just one logging success.
     
  18. Aug 9, 2002 #58 of 609
    Ivor

    Ivor New Member

    13
    0
    Aug 5, 2002
    Middlesex UK
    kingmiwok - if you are going to take the drives out anyway to fix the swap file, you might find it quickest to use the TivoMad or Dylan's Boot disk to mount the /var partition (number 9 on the Tivo A drive), load the kernel log into an editor and then search for 'swap'. As Robert says, it should be a few lines before the box corrects the date and time.

    The swap file is easy enough to fix by putting
    Code:
    mkswap /dev/hda8
    at the start of the /dev/hdaX/etc/rc.d/rc.sysinit file (where X is either 4 or 7 depending on your config). See Robert's post at the start of this thread for full details.

    --oo0oo--

    I completed my second rebuild earlier this morning after running
    mfsbackup -Tao - /dev/hda /dev/hdb | mfsrestore -s 256 -xzpi - /dev/hdc /dev/hdd
    to create a drive with a 256Mb Swap partition but leaving out the -r 0 parameter [standard block sizes]. I then got TiVo to recreate it's own swap partiton by adding mkswap /dev/hda8 to rc.sysinit as above and tested it by running a full program call. This seems to be working fine [no GSOD] I'm not going to tempt fate by running mfsassert -please on this system despite the larger swap file, since I'm fairly certain this would fail.

    Interestingly mkswap did use the full 256Mb allocated to it, although the partition is definitely 256Mb and the MFST2 readme suggests it could use up to 511Mb. Regardless, it is still using the same 133885952 bytes as before, just short of the original 133890048 bytes limitation for early versions of linux...

    Thanks to everyone involved for all their help! :)

    Ivor.
     
  19. Aug 9, 2002 #59 of 609
    kingmiwok

    kingmiwok New Member

    11
    0
    Aug 8, 2002
    Idaho
    Thanks for the replies/advise. Much appreciated. I'll tackle it this weekend and report anything out of the ordinary.

    Slightly OT... I noticed you guys are from the UK. Many of the posts here are, which leads me to believe (incorrectly?) that Tivo may be more of a phenomenon in the UK than in the US.

    In the US there is somewhat of a name recognition for Tivo, but it is hardly a household term. Among my closer friends (mostly computer geek types here in Silicon Valley), NONE have a Tivo. And even though you can't get me to shut up about the virtues of Tivo if asked, I can't get them to take the plunge and get one. It's almost as though they don't get why it's better than their VCR, or don't care. They seem to prefer to watch DVDs they have bought/rented.

    I think maybe they see it as just another unwanted distraction competing for their time. We are all in our 30s+. Maybe it's more popular with a younger crowd, but I don't believe so.

    Is Tivo huge in the UK? Lots of name recognition with the general population? (I have a fascination with why some products take off and others flop, or never get broad acceptance. Yet will be very popular elsewhere.)

    Again, thanks for the tech help.
     
  20. Aug 10, 2002 #60 of 609
    Ivor

    Ivor New Member

    13
    0
    Aug 5, 2002
    Middlesex UK
    This thread http://www.tivocommunity.com/tivo-vb/showthread.php?s=&threadid=70772 suggests there are about 35000 TiVo users in the UK and about 422000 worldwide. That's maybe just over 1 box per 800 households here which would explain why I don't know anyone else who has one... The UK board can probably account for this better than I can. :)
     

Share This Page