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. Feb 5, 2003 #301 of 609
    Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    You should be able to fix the reboot loop by following the 'rescue' maneuver in the third post of this thread. I think it's sufficiently 'spoon-fed', but do let me know if you need clarification.

    Do you remember what options you used for the upgrade? I assume that you didn't do -s 127 because of the reboot loop. Is it possible you did -s 128? See the first post in this thread (and Cpen's post on the first page) for instructions on how to check this.

    If you did -s 128 then instead of the rescue maneuver you should manually initialise your swap as described in the first post. You can/should do this to both your TiVoes.

    On the other hand, if you didn't use -s at all, then you can't permanently increase your swap, but the rescue maneuver should allow your TiVoes to recover from a green screen if it happens again.

    Note that the TiVo can not take a software upgrade while it's in the 'rescue' configuration (because we're using the space required for the upgrade for swap). However, as DTiVoes do not seem to be due for a software update any time soon you can regard backing out of the rescue as non-urgent.
     
  2. Feb 5, 2003 #302 of 609
    Michael248363

    Michael248363 New Member

    69
    0
    Jul 22, 2002
    Salt Lake...
    Thanks Robert. It probably is pretty straight-forward once you know which instructions to follow. :D

    I don't remember what the options were that I used when I did the upgrade. It could have been "-s 127", "-s 128", or nothing at all, I don't remember.

    A couple of questions for clarification before I start and remove my ability to get on-line and ask questions. I apologize in advance for the quantity and of questions and their probable obvious answers. I feel a little embarassed that what seems like it should be a rather straight-forward task is causing me, and therefore you, so much grief. :eek:

    1. Both of my DTiVoes have A & B drives that are 160Gb each. Do I need to do something to both drives or only to drive A? In post #3 you talk about upgrading twin-drive TiVoes, so I got a little confused because I don't still use the original A drive. I don't think that section applies to me, but wanted to make sure.

    2. Is there a way to validate, once the drive is connected, that you are working with drive A and not drive B. It seems like when I did the upgrade, I followed the instructions but the drives weren't cabled or jumpered the way I thought they would be.

    3. For my DTiVo that is in the GSoD loop, I have to go through the steps to renumber the partitions in the third post of this thread. For my DTiVo that is working normal, I don't because this process just allows fsck to run. Correct?

    4. After I find out which partition is the root partition do I still need to mount the drive or is that portion only if "edit_bootparms" doesn't work?

    5. In step F, where I restore the original partition numbers, I use the exact same commands based on what the original inactive partition was. If the at the beginning the inactive partition was 4, then in step F, I would type:
    r 8 4
    r 5 9
    The order or anything else doesn't change since I have renumbered partitions, correct?

    So after putting the rebooting DTiVo back together and letting it fix itself (hopefully it will), I should now have two working DTiVoes. Which leads me to the steps to prevent this from happening in the future that I need to do to both machines so that I don't have to go through this again.

    6. Does what I do to fix the "future" problem depend on what "-s" parameter I used? If so, which steps do I use based on what I find out from the logs? Is there one set of instructions that I can use regardless that will increase the size of the swap file and still maintain my settings & recordings?

    7. How do I tell whether I used "-s 128" or didn't use "-s" at all. From what I can tell, after I enable backdoors and access the log, if I used "-s 128", I should get the error messages that CPen stated saying it was "unable to find swap-space signature" because the swap file was never created. If I didn't use "-s", I don't know what I should see. If I used "-s 127", I shouldn't be reboot looping so that's not really an option.

    Thank you very much for your help.
     
  3. Feb 5, 2003 #303 of 609
    lemketron

    lemketron Senior Bit Twiddler

    73
    0
    Jun 24, 2002
    Sunnyvale, CA
    That sounds correct. I have seen this myself as I did several upgrades last summer with "-s 128" (before it was known that this was bad).

    That sounds correct as well. If you did "-s 127" presumably everything would be fine. If you didn't use "-s" then I believe the upgrade process would have left the original 64MB swap partition. This (as noted) can cause problems down the road since fsck (or whatever the repair utility is that TiVo may one day run?) can't successfully run on two 160GB drives with only 64MB of swap space.

    How can you tell? You'll probably have to dump the partition map and see if you can identify the swap partition. I don't recall which partition it's usually on, but if you hook up the boot drive to your PC and boot the MFSTools CD, you may be able to see the partition information displayed as the CD boots -- or maybe someone else can followup and tell you specifically how to tell whether your swap is 64MB or 128MB.

    If it's 64MB, you'll want to figure out a way to make it 128MB. I don't believe you can actually do that in-place if you've already expanded your image to the full 160GB. You may have to re-do the upgrade (assuming you still have the original drive(s).)

    If it's 128MB, then you need to find a way to run mkswap. I was able to easily do this via telnet on all of the stand-alone boxes I upgraded with "-s 128". I never did figure out how to do it on a DirectTiVo without going through all sorts of extra hacking tricks. There may be instructions around and if so you'll need to find them (or maybe someone can follow-up with the details).

    Good luck!
     
  4. Feb 6, 2003 #304 of 609
    wr9966

    wr9966 New Member

    10
    0
    Feb 1, 2003
    My drive A died and I had to 80GB drives floating around. I did not have a backup of the drive so I downloaded a virigin copy of a backup for a HDR112 and then RESTORED it to BOTH of my new 80GB drives using mfsrestore -s 172 blah blah blah /dev/hdc /dev/hdc

    My TIVO is working and booted up with out a hitch. But I wonder if I am going to have problems with this in the future.


    Thanks.
     
  5. Feb 6, 2003 #305 of 609
    stormsweeper

    stormsweeper How *you* doin'?

    424
    0
    Nov 27, 2001
    NYC, USA
    I hope you were more careful typing that in while working than here. -s 172 won't work correctly, but -s 127 will.
     
  6. Feb 6, 2003 #306 of 609
    Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    The second part of post three describes how to increase swap while upgrading the A drive of a twin drive TiVo. You aren't doing that.

    All the system partitions are on the A drive, so it looks very different to the B drive (up to 16 partitions instead of just 2).

    If your swap partition is already 128Mb then you can just manually initialise it as in post 1. If your swap is only 64Mb then you can't permanently increase the size of your swap because there's no spare space on the disk. You'll just have to do the rescue when needed.

    The point is to find out which root partition is the active one. Mounting it isn't part of the fix itself.

    To return the partitions to their original order you do exactly what you did before - the operation is self-inverse.

    If you have 64Mb of swap, when you do CPen's thing to read the logs you'll see 'activating swap' and a number around 65 million.
     
  7. Feb 6, 2003 #307 of 609
    Michael248363

    Michael248363 New Member

    69
    0
    Jul 22, 2002
    Salt Lake...
    The planets must be aligning against me or something.

    Couple of questions:

    1. What is a command that I can issue that will tell me definitively whether or not I'm looking at drive a or drive b? I connected the drive from my DTiVo that was at the end of the cable and set as master, but I think it's drive b and not drive a.

    2. What is the command to show what is connected to hda, hdb, hdc, hdd?

    3. Is there a command that will show me how many partitions are on a particular drive?

    4. Apparently I can't access backdoors because I'm running version 3.1. So I guess the only way that I can view the log now is to mount the drive. What would be the commands to mount the necessary partition, and where is the log file located?

    5. I couldn't get edit_bootparms to work, it says it can't find the file. I'm booting from the MFS Tools 2.0 CD is there anything I need to do before typing the edit_bootparms line to get it to work?

    Thanks again.
     
  8. Feb 6, 2003 #308 of 609
    Michael248363

    Michael248363 New Member

    69
    0
    Jul 22, 2002
    Salt Lake...
    Thanks Robert! I now have the Green Screen of Life!

    I am still a bit curious about the questions I posted earlier. But now on to the next half of my problem. How can I fix the swap file problem so that this doesn't happen again?

    Thanks again!
     
  9. Feb 9, 2003 #309 of 609
    sskraly

    sskraly New Member

    46
    0
    Dec 11, 2002
    Sorry, still a bit confused after reading this thread:

    How do I upgrade from a 40+80GB unit (which was previously upgraded from a 15GB to 15+80 to 40+80, always preserving recordings) to a 40+120GB unit?

    In other words, I'm upgrading the B drive, and I assume that I need to increase the swap, AND I want to preserve recordings. Most of this thread seemed to discuss replacing the A drive.

    Thanks,
    Sam
     
  10. mrtickle

    mrtickle Active Member

    2,824
    0
    Aug 26, 2001
    Birmingham, UK
    You're definitely right that you need to increase the swap.
    Swap has to go on the A drive.
    So, you can't have a "40+120" setup - you must make the 120 the A drive.

    Use New Hinsdale UPGRADE CONFIGURATION #6 to combine everything onto a new 120GB "A" drive.
    Then use mfsadd to make the spare 40GB drive your B drive.


    HTH
     
  11. sskraly

    sskraly New Member

    46
    0
    Dec 11, 2002
    Aha--brilliant! Thanks!

    One other question: if my B drive has a few potential bad blocks (failed the Read Verify test in WD Data Lifeguard), is there any command line switch to add to the mfsbackup to let it coast through the errors (similar to the dd conv=noerror,sync switch when using the dd method)?

    mfsbackup -Tao - /dev/hda /dev/hdb | mfsrestore -s 127 -xzpi - /dev/hdc

    Thanks again!
     
  12. sskraly

    sskraly New Member

    46
    0
    Dec 11, 2002
    OK, I tried Upgrade Config #6 and it's claiming that the backup won't fit on the target. I've got:

    hda: 78125000 sectors (40000MB), CHS=4863/255/63
    hdb: 156301488 (80026MB), CHS=9729/255/63
    hdc: 240121728 (122942MB), CHS=238216/16/63

    I'm running:

    mfsbackup -Tao - /dev/hda /dev/hdb | mfsrestore -s 127 -xzpi - /dev/hdc


    and I get this during the mfsbackup scan:

    Source is 15 hours upgraded to 95 hours upgraded to 127 hours...

    Uncompressed backup size: 113434MB

    "Restore failed: Backup target not large enough for entire backup by itself"

    Any ideas? Could it have anything to do with the 120GB drive coming up as 16 logical heads, whereas the others have 255?

    Thanks in advance...
     
  13. Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    You need to follow the second past of the third post in this thread. Use dd to clone the A drive on to the new one, follow the instructions to manually create a larger swap partition and then use mfsadd to expand to a 120+80Gb.

    Or, if you /have/ to replace the 80Gb drive (faulty?), dd the 80Gb on to the new one and then use mfsadd to expand, but keep a copy of the 'rescue' maneuver (first half of post three) handy as doing this will break the TiVo's ability to recover from a green screen.
     
  14. Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    Michael: To get any of these things to work on a Series 1 TiVo you have to boot byteswapping. If you manage that, the answers to most of your questions become obvious.

    pdisk is the tool to manipulate the partition table. If you invoke pdisk -l /dev/hdX it'll list the partitions on the drive you designate. If you run pdisk without -l it'll enter an interactive mode (be careful!) where pressing p prints the partition table.

    A drives have lots of different partitions, B drives have just two (or, at least, very few) MFS partitions, so the difference is obvious.

    You can't fix the swap problem permanently without deleting your recordings because there's no unused space on the disk. The space used for the 'rescue' maneuver is only temporarily unused, which is why you have to back out to the original config when the TiVo recovers.
     
  15. Michael248363

    Michael248363 New Member

    69
    0
    Jul 22, 2002
    Salt Lake...
    Thanks Robert. I ran pdisk and listed the partitions, based on what I found I've got a couple of questions. I've abbreviated to only include the relevant partitions that I reordered so that I could get past the GSoD reboot loop. I've since re-reordered the partitions so 8 is 7 and 7 is 8.

    7: Swap Linux Swap 262144@75685952 (128.0M)
    8: Ext2 Root 2 262144@75423808 (128.0M)

    So if I'm understanding this right, it looks like my swap file partition is 128MB, the same size as the rescue partition. If that is true, why can't I create a swap file that is 127MB in size? Is there something else on the drive that would prevent me from using the entire drive to create a 127MB swap file? If the partition is 128MB, the when I did the upgrade, did I create the partiton correctly, but just not create/initialize the swap file? If so, do I just need to run mkswap. If so, what are the parameters that I should use to get 127MB of swap file?

    I just want to make sure I've exhausted all possibilities and that if I can't fix it to prevent future problems, I want to understand exactly why. Plus, I also want to understand it better. Like I said, my experience with Linux is pretty limited.

    Thanks again for the help.
     
  16. Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    It looks like you used -s 128 after all.

    I did suggest that you check for that and if you had done that you could rescue your TiVo by following the instructions in the first post to run mkswap against that partition.

    Although the partition labels are messed up, you could just leave things the way they are.
     
  17. Michael248363

    Michael248363 New Member

    69
    0
    Jul 22, 2002
    Salt Lake...
    I couldn't remember what option I ran when I did the upgrade and didn't know how to check the size of the partition earlier and since I've got 3.1, I can't enable backdoors to check the logs.

    So running /sbin/mkswap -v0 /dev/hdc8 (using the right drive of course) will create the proper swap file.

    I understand everything about the command except for the -v0. I saw in the help for the program that you could also do -v1. What is that option for?

    Just trying to understand it better.
     
  18. Robert S

    Robert S New Member

    9,725
    0
    Jul 8, 2002
    Cambridgeshi...
    They changed the way swap works after the kernel that (Series 1) TiVo uses was compiled. -v0 tells mkswap to make an old-style partition (limited to 127Mb). -v1 is the default and creates the new style partition. Unlimited size (?), but not compatible with a Series 1 TiVo.

    I think Series 2 TiVoes should be able to use a new-style swap partition, but I don't have confirmation of that.
     
  19. davidk

    davidk New Member

    26
    0
    Dec 27, 2001
    Los Angeles, CA
    I need some advice!

    I revived my DSR6000 from the GSOD by using the inactive swap partition method described by Robert at the top of this thread. I let my DirecTiVo fix itself and I swapped the partitions back. I made a backup image of my 3.1 TiVo. However, now I'm getting frequent reboots and I fear that the only way to really fix my TiVo is to clear my hard drives (160G A Drive and 120G B Drive) and restore a backup.

    Here's my question: is it ok to use the 3.1 backup that I made after TiVo self-repaired from GSOD or should I go back to my original backup image (I made it back in 2/2002) with a system version that I don't remember?

    Also, when I restore, I plan to use MFS 2.0 (to get increased speed in navigating menus) and increase swap to 127MB. Can I do this with the old backup image from a year ago (if that's the backup I should use)?

    Thanks to everyone for all of the great advice and help! I have enjoyed a 245-hour DirecTiVo due to the efforts of those on this board.

    --David
     
  20. Michael248363

    Michael248363 New Member

    69
    0
    Jul 22, 2002
    Salt Lake...
    A couple of questions that are probably pretty basic if you understand Linux:

    1. Is there any way to tell if a partition is set up correctly to use a swap file without using backdoors? I.e. commands on the MFS Tools CD that would show a directory listing of the swap file.

    2. When you issue the mkswap command, does it utilize the entire partition regardless of partition size for the swap file (up to the 127MB max, of course).

    I've looked at both of my DTiVoes (DSR6k, both running 3.1 software), one has a 128MB partition for the swap file, the other has a 64MB partition. I have no idea why they are different. I thought I upgraded them using the same commands, but apparently I didn't.
     

Share This Page