Page 1 of 2 12 LastLast
Results 1 to 15 of 21

Thread: Extending MFS-Tools For the TiVo Premiere (Support Thread)

  1. #1
    Join Date
    Aug 2010
    Posts
    3

    Extending MFS-Tools For the TiVo Premiere (Support Thread)

    The attachment found in development thread post (link) includes pre-compiled executables that one can use with the 1.4 MFSLive BootDisk to backup, restore, and even expand a TiVo Premiere drive. These exectuables have limitations and are released to allow experimentation.

    Some warnings about these exectuables
    1. These are not backwards compatible with S3 and earlier drives (hence the different executable extension).
    2. These have only been tested once with a single stock drive (other configurations including multiple drives or expanded drives have not been tested)
    3. These executables do not handle the SQLite partition (partition 14), so one must manually delete this partition prior to backing up and must manually recreate the partition after a restore (see usage notes below).
    4. One can expand using mfsadd to expand only by creating a "single, coallesced partition" or "uneven SOMETHING SOMETHING", this should be considered experimental.


    Usage notes
    1. Run these executables along side the normal compliment of PC-side tivo tools. They should work with any modern Linux distribution, Linux LiveCDs (or the MFSLive boot disk), a Linux Bootable USB derived from a LiveCD, etc...
    2. Backups are best made of a stock drive configuration by first using pdisk to delete the partition 14 (the 3GB SQLite partition) and then creating a backup using -9vo (i.e. omit backing up the var partition).
    3. When restoring one can specify "-v 3584" to make the var partition 3.5GB in size. This allows you to, later, manually divide it (again using pdisk) into partitions 9 (512MB var) and 14 (3GB SQLite) and then initialize their filesystems by hand (i.e., "mke2fs -t ext2 /dev/sdb9; mke2fs -t ext3 /dev/sdb14"). It's not necessary to save the contents of var or db (SQLite), as the TiVo will repopulate these partitions during power-up.
    4. Expansion can be done with JMFS or using the modified provided mfsadd.s4.x86. The process I used is described here: on the mfslive forums Note that with either method (as both use the same underlying principle), there are still unanswered questions about the suitability of later adding (and removing external storage). Tivoapp contains the string: "TROUBLE: Partitions are supposed to come in pairs!", thus, there is reason to believe that perhaps during some level of mfscheck/fsfix might barf with a configuration like this.
      • run mfsadd.s4.x86 being sure to specify the "-r 4" option.
      • use pdisk to delete the newly created partitions 15 and 16 and create a single partition equivalent in size in their place.
      • hexedit the MFS superblock (found in partition 10) to remove (overwrite with zeros) "/dev/sda16" and
      • correct the superblock checksum (corrupted when you manually removed /dev/sda16) using "mfs_info -f"
      Note that after you expand, its not possible (with the provided executables) to backup the expanded drive.


    Remember: these executables are experimental, your mileage may vary, works for me, always back up your... oh, never mind about that last one
    Last edited by puffdaddy; 08-29-2010 at 10:37 PM.

  2. #2
    Join Date
    May 2007
    Posts
    449
    I hope this is the correct thread since its for support. How do you get tools like these or pdisk to work on a Debian machine? I get "cannot execute binary" when I try to run them. There must be a step I'm missing...

  3. #3
    Join Date
    May 2007
    Posts
    449
    I've been moving along but this ones has got me absolutely stumped. I compiled mfstools on a Debian machine and replaced the 4 tools with the ones from the bin folder. My tivo disk is /dev/sdc but when I try mfsinfo /dev/sdc it keeps saying hda11 isn't valid. I thought these tools changed it from hda to sdc

    Code:
    root@lenny:/usr/local/bin# mfsinfo /dev/sdc
    mfsinfo: Unknown MFS partition device /dev/hda11
    Anyway, I found someone said you can do

    Code:
    export MFS_HDA=/dev/sdc
    but even after that I get the exact same error. Can someone nudge me over this hurdle?

    I tried running the patches but for ex one is named mfstools-src_lib_volume.c.patch and I have no idea which tool to apply that patch against. I guessed to apply it against mfstools but I get nothing but failed hunk errors.

  4. #4
    Join Date
    May 2007
    Posts
    449
    I think I got past this hurdle. I didn't realize I have to begin each command with mfstools.
    Last edited by Soapm; 02-04-2012 at 10:55 PM.

  5. #5
    Join Date
    May 2007
    Posts
    449
    did you make them executable? chmod 777 <executable>

  6. #6
    Join Date
    Dec 2004
    Posts
    830
    Quote Originally Posted by Soapm View Post
    did you make them executable? chmod 777 <executable>
    755 is preferable if it is a script. 555 is probably good if it is an executable binary. 777 means anyone can read, write, or attempt to execute it.
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  7. #7
    Join Date
    Jul 2001
    Posts
    31
    puffdaddy, thanks for the tools and explanation. I was able to migrate all of my recordings and settings off of my stock THR-22 internal drive and onto a larger eSATA drive. The new backup and restore programs don't work for the THR-22, but this is what I was able to get working:

    1. Duplicated old drive to new one using dd.
    2. Booted the MFSLive CD, put your programs on an SD card so I could mount them.
    3. Used your version of mfsadd.s4.x86 to add partitions 15 and 16.
    4. Used pdisk to delete partitions 15 and 16 and created a new 15 with the combined size.
    5. Used dd to overwrite " /dev/sda16" with null bytes in partition 10.
    6. Used the MFSLive version of mfs_info -f to correct the checksum (needed to first do "export MFS_DEVICE=/dev/sda10" to get it to work.)
    7. Hooked up the new drive via eSATA, rebooted the THR-22, and all was well.

    Thank you so much!
    Last edited by webdeck; 12-16-2012 at 11:39 PM.

  8. #8
    Join Date
    Aug 2010
    Posts
    3
    Thanks for the feedback and glad that the tools were of use to do a manual expansion. I don't believe that there's been much work done on the THR22's yet, and while I've not yet had a chance to play with one, from memory of what folks posted, the partition numbering was the same; however, the bootstrap/kernel/root partition triplets are absent (or replaced with an mtd partition). So that may have confused MFS-Tools, though it may well have been something else; e.g., lack of bootpage arguments).

  9. #9
    Join Date
    Jan 2004
    Location
    Noo Hampsha
    Posts
    738
    The method described in http://www.dbstalk.com/showthread.php?t=148760 supposedly also works for the THR22. I need to do this in the near future, nice to know there are choices.
    Steve

  10. #10
    Join Date
    Jul 2001
    Posts
    31
    Quote Originally Posted by stevel View Post
    The method described in http://www.dbstalk.com/showthread.php?t=148760 supposedly also works for the THR22. I need to do this in the near future, nice to know there are choices.
    The method in that thread works for the non-TiVo DirecTV DVRs (I've used it myself), but doesn't work on the THR22.

  11. #11
    Join Date
    Jan 2004
    Location
    Noo Hampsha
    Posts
    738
    Interesting. I was going to try this next weekend. Can you provide the detailed steps you successfully used on the THR22? I could probably figure it out from your earlier reply, but if you could give the exact commands that would be helpful. Thanks.
    Steve

  12. #12
    Join Date
    Jan 2004
    Location
    Noo Hampsha
    Posts
    738
    I could really use some help with steps 4 and 5 above. I am stuck there...
    Steve

  13. #13
    Join Date
    Nov 2004
    Posts
    412
    What sort of help are you looking for:
    4. Used pdisk to delete partitions 15 and 16 and created a new 15 with the combined size.
    5. Used dd to overwrite " /dev/sda16" with null bytes in partition 10.
    From memory, pdisk (run from a linux PC, with the tivo drive attached as /dev/sdb) would be "pdisk /dev/sdb", once in the interactive mode, you can then do "p" or "P" to display the partition map of /dev/sdb. I think then the commands (you can always type ? for help) a "d" to delete and then 15. Then d 16. You'll want to make note of the blocks in those partitions so that you can then (after having deleted them both) create a new partition ("c", with the first block probably the default suggested by pdisk, and then the size specified as the number of blocks of 15 & 16 combined, give it a custom type "t" of MFS Partition).

    For step 5, you might be better off dd'ing out the first 20k bytes of partition 10 to a file, using a hex editor to locate the /dev/sda16 string, and then overwriting it with zeros, saving the file, and then dd'ing it back to partition 10. Basically the same process, but a little more manual.

    Hope this helps.

  14. #14
    Join Date
    Jan 2004
    Location
    Noo Hampsha
    Posts
    738
    What exactly do I type for the "t" argument? That's what I was stuck on. I'm also insufficiently familiar with dd to do step 5 - it's intensely arcane syntax, even for Linux.
    Steve

  15. #15
    Join Date
    Nov 2004
    Posts
    412
    I believe that the "type" of the partition reflected in the apple partition map doesn't really matter (the tivo software won't care), but most just set the type to match what tivo (and mfs-tools) labels them, which you can see in the "-p" & "-P" outputs is "MFS" (minus the quotes).

    dd is very simple and powerful, so it's worth learning your way around. For what you wish do to do (copy the first 20k or so sectors from a harddisk partition to a file, modify that file, and then copy the file back), here's how you could do it.
    Code:
    # dd if=/dev/sdb10 of=/path/to/dir/on/linuxPC/or/Linux/Boot/Disk/Stick/image.img bs=512 count=20k
    20480+0 records in
    20480+0 records out
    <then edit this file with a hex editor, I think the /dev/sda16 should actually appear within the first 512byte sector>
    # dd if=/paht/to/modified/image.img of=/dev/sdb10 bs=512 count=20k
    The only other thing I recall having seeing folks have trouble with was the "mfs_info -f" step, for which, it's necessary to export an environmental variable to let know mfs_info that the MFS superblock lives in, say, /dev/sdb10. e.g.,
    Code:
    export MFS_DEVICE=/dev/sdb10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •