# Mac Tools



## jgraessley

I've been working on some tools for exploring the TiVo using a Mac.

I've placed the tools here:
http://josh.graessley.net/tivo/

The two tools I've written are:

TiVoPartitionScheme
This is a system kext that will let Mac OS X read the TiVo parition of a Series 1 TiVo. You can use the ext2fs support for Mac OS X from source forge to mount the ext2 file systems (/var and the two root partitions) on a Mac OS X box. This is really handy when combined with a IDE to firewire case.

MFS Browser
This is a tool that lets you browse the stuff on the MFS partitions. This will not let you extract video. It just lets you poke around and find out what's on those MFS partitions. This should work without modification with any single disk series 2 tivo. For the series 1, the TiVoPartitionScheme kext mentioned above is required.

Enjoy,
-josh


----------



## ADent

Thank you.

Now if there were some way to get the source code of MFStools ( http://sourceforge.net/projects/mfstools/ ) from Tiger we would be cooking with gas.


----------



## v8q

> _Originally posted by jgraessley _
> *I've been working on some tools for exploring the TiVo using a Mac.
> 
> I've placed the tools here:
> http://josh.graessley.net/tivo/
> 
> The two tools I've written are:
> 
> TiVoPartitionScheme
> This is a system kext that will let Mac OS X read the TiVo parition of a Series 1 TiVo. You can use the ext2fs support for Mac OS X from source forge to mount the ext2 file systems (/var and the two root partitions) on a Mac OS X box. This is really handy when combined with a IDE to firewire case.
> 
> MFS Browser
> This is a tool that lets you browse the stuff on the MFS partitions. This will not let you extract video. It just lets you poke around and find out what's on those MFS partitions. This should work without modification with any single disk series 2 tivo. For the series 1, the TiVoPartitionScheme kext mentioned above is required.
> 
> Enjoy,
> -josh *


This is very cool!!
I did not know there was a way to deal with ext2 on a BSD system. I will have to check this out next time I need to mess with my tivo - which btw has not been touched for well over a year.


----------



## v8q

> _Originally posted by ADent _
> *Thank you.
> 
> Now if there were some way to get the source code of MFStools ( http://sourceforge.net/projects/mfstools/ ) from Tiger we would be cooking with gas. *


I would not count on this happening. Tiger seems to have a big problem with releasing the code under GPL or even getting this software to run on a PPC platform. I am not even sure why he put a project on SOURCEFORGE when he has no intention of ever releasing source.
It seems a little two faced of him since he used open source tools and help from this list to get mfstools going in the first place but that is the way it is.


----------



## Tiger

> _Originally posted by v8q _
> *I would not count on this happening. Tiger seems to have a big problem with releasing the code under GPL or even getting this software to run on a PPC platform. I am not even sure why he put a project on SOURCEFORGE when he has no intention of ever releasing source.
> It seems a little two faced of him since he used open source tools and help from this list to get mfstools going in the first place but that is the way it is. *


Okay, major clue here.. Have you actually LOOKED? The source code was up within 24 hours of the sourceforge project being opened. It was already up by the time I announced anything. I even just logged out to make sure I could access it. I followed the instructions on the project page (Well, I copy and pasted the two commands) and checked out the source code without logging into my account.

I do not have a problem getting the software to run on PPC. In fact, it's probably most the way there. I had even used TiVo as a test platform for most the tools. The exception was backup and restore because I didn't feel it was worth the effort to try and work around some linking issues with libz for TiVo. That was really the only limitation.

And yes, I used open source tools. I used gcc. I used libz as well, but libz makes no demands on the final product besides being mentioned, which it is. Oh, and Linux. Well, I'm sure many of you are using those as well, and don't go handing out everything you make.

And what sort of community support has there been? I've gotten several offers from people to do a Mac port. I couldn't very well do it myself, as I did not have the platform for development. I even took some of those people up on the offers. I never heard back from any of them. Not one. It's not like I wasn't receptive to it, it's that people were not coming through with their offers.

So I create a sourceforge project, opening it up to a wider audience. I have yet to get any response from people, either requests to join the project, or offers to contribute back changes people have made.

And help? I got help from all of 1 person. I looked at some other stuff that was passed around, but most of it was unrelated to what I was doing, so didn't interest me, or was stuff I already knew. I had a bit of an information exchange with pjcreath. I can attribute to him my knowledge of the TiVo CRC checking, and putting names to concepts I already knew. For example, I had been calling the zone maps "allocation maps" since I was doing everything from a point of view of examining the data as opposed to examining the executables, where the names come from.

I had never (And still have never) seen any other source or even discussion of being able to mimic the TiVo mfsadd process without modifying the mfsadd executable on the TiVo. I had never (And still have never, though I'd be surprised if this isn't out there) seen source or dicsussion on dealing with the MFS transaction log. I also had never (And still have never) seen any source or discussion of successfully divorcing drives.

I didn't even get an invitation to this "elite little club" until after I already had a fully working "mls" program.

Now take your false accusations and shove it.


----------



## v8q

> _Originally posted by Tiger _
> *Okay, major clue here.. Have you actually LOOKED?
> .
> .
> .
> Now take your false accusations and shove it. *


Well - I guess I got your attention.

I did look - not at the CVS tree (where I do now see source files) but on the download button which does nothing. My bad. All I found the first time was the zip files containing the exe files.

As for my statements about your un-willingness to release code, that was based on a conversation I had with you well over a year ago when I offered to help with a PPC port. You said you could not send me the code because some of it was top secret but that I could send you my computer. I declined.

Sorry to ruffle feathers but I was just passing on info as relayed to me.
My goal is not to piss any one off - just to get this working on PPC and maybe even OSX. 
Thanks for the release and if I am able to get anything working I will let you all know.

Nuff said??

btw, I have not been tuned in here for about a year - and this is what I found when I came back. Glad to see some movement towards Mac tools.


----------



## wmcbrine

I downloaded the CVS source of MFS Tools and attempted to compile it on the SourceForge Mac (I don't have an OS X system of my own). I've gotten pretty far along (had to make a number of changes), but I haven't finished it yet. Someone else will have to test it, in any event.

Some folks on DDB seem to have compiled it native for the Tivo, IIRC. So, there's certainly activity there. The source has only been available a short while... and I have to say, I saw no reason to contact Tiger about what I was doing, as (for one thing) I rather had the impression that he was abandoning the project.


----------



## v8q

> _Originally posted by wmcbrine _
> *I downloaded the CVS source of MFS Tools and attempted to compile it on the SourceForge Mac (I don't have an OS X system of my own). I've gotten pretty far along (had to make a number of changes), but I haven't finished it yet. Someone else will have to test it, in any event.
> 
> Some folks on DDB seem to have compiled it native for the Tivo, IIRC. So, there's certainly activity there. The source has only been available a short while... and I have to say, I saw no reason to contact Tiger about what I was doing, as (for one thing) I rather had the impression that he was abandoning the project. *


So you can perform a compile on a computer at sourceforge? I have never done any of this stuff so I guess I am pretty clueless about whats available out there.
I had a linux PPC (2.4.17 I think) system setup on my old mac 8500 but I have abandonded it in favor of OS 10.2. I could probably get it set up again if you need a tester. 
Tiger mentioned something about a boot CD too. I do have a kernel that unlocks the tivo disks, and the yellowdog install CD is probably a good template for the boot CD. You are welcome to to the kernal if you want it.
I am pretty sure I still have the source code.


----------



## Tiger

Ooh, I didn't even think to look for a MacosX in the sourceforge compile farm. I don't tend to use the compile farm normally. I'm kind of curious how difficult people found the porting. I tried to write it cross platform compatible as much as possible. Nearly everything has been tested natively on TiVo so I know the core code works. The only thing that hasn't been tested is backup and restore. That's also probably the ugliest code in there, the backup and restore stuff. It used to be worse before I rewrote some of it for 2.0. I have ported MFS Tools to QNX just for grins. Just took tweaking a few header files. However I've only ever tested the backup and restore on an intel platform, and intel is different from nearly everyone else in byte ordering. In THEORY, the backups can be passed between machines of different byte ordering. It notices the signature is backwards and swaps the order of everything. In practice... Well.. Anyone want to share if it actually worked? 

I'm sorry you weren't happy with the response v8q. Most likely it was because either I already had someone "working" on it, or I had already been burned out by the lack of response I'd gotten from the other who said they would help.

wmcbrine, I haven't abandoned it as such. I just do not have time to work on it myself at the moment. If I were just abandoning it, I would have just tarred up the source and dropped it somewhere instead of going and opening up a sourceforge project for it. I see no reason not to have a central location for the project. If that ends up being somewhere else, maintained by someone else... Well that's the nature of open source. However it would be a shame to see the project space on source forge not put to use. After all, that is where people who get a URL out of a book are being sent now.


----------



## wmcbrine

OK, I guess I misunderstood your announcement. Good to hear that you'll remain involved.

Unfortunately, it didn't seem that portable to me; but I think it can be made so without too much trouble. The issues I found were basically just BSD vs. Linux conventions. I also have QNX, so I'll try that, too. And maybe BeOS for good measure.


----------



## Tiger

I'll have to admit I haven't done much BSD work. However I do know there are more than a few linux-isms in the code. I imagine that's just shuffling around header files and #ifdefs though. At least that's most of what it was for QNX. (Incedentally, the QNX sales rep I work with is named Dave Bott. No relation, though he does use a TiVo.) What I'm more worried about would be the kind of things that compile but don't work right due to byte ordering.


----------



## v8q

> _Originally posted by Tiger _
> *
> I'm sorry you weren't happy with the response v8q. Most likely it was because either I already had someone "working" on it, or I had already been burned out by the lack of response I'd gotten from the other who said they would help.
> 
> *


No problem at all Tiger. I have been waiting patiently ever since the release of OSX for someone smarter than me to pick up this ball and run with it. I figured it was only a matter of time. There are quite a few people out there now who have discovered that the Mac is a good platform for a hacker (the real kind - not the script kiddy version) as evidenced by the large and growing number of linux tools being ported. In fact, I think the whole x-window system can run side by side (not dual boot, running concurrently) with mac osx. Very cool stuff. 
And thanks again for releasing mfstools to the rest of us!

Dave


----------



## Tiger

Posting in this thread since nobody else here seems to be working on such a thing..

If anyone is interested in supporting MFS Tools backups without actually porting MFS Tools/including MFS Tools code, the format is fairly simple. I've added a file called "Format-bak" to MFS Tools CVS with a brief description of how it works. I make no claims to accuracy though, as it's been awhile and I was writing it from memory, with glances at code when I needed it.


----------



## v8q

> _Originally posted by Tiger _
> *Posting in this thread since nobody else here seems to be working on such a thing..
> 
> If anyone is interested in supporting MFS Tools backups without actually porting MFS Tools/including MFS Tools code, the format is fairly simple. I've added a file called "Format-bak" to MFS Tools CVS with a brief description of how it works. I make no claims to accuracy though, as it's been awhile and I was writing it from memory, with glances at code when I needed it. *


Well...
I guess I can confirm my moron status. I can not find format-bak anywhere, but I did download the rest of the CVS files so I will try to get them compiled up on my system. I will post here if I get anything working.


----------



## Tiger

Well it would be more accurate to call that an "I forgot to do a cvs commit after the cvs add".  Should be there now.


----------



## Loki

Well my Tivo's HD finally lost a few sectors and I didn't have a PC around so I finally got around to trying to compile mfstools for OSX. The good news is that it now compiles by hand, my expertise with makefiles and config aren't good enough to figure out what was dying in that process. How about I just make an Xcode project for it?

As for running it I've been having fun , mostly due to Darwin's /dev partitioning scheme vs linux. lib/volume.c is looking ugly with #if #else etc's now. Here's an example output from a quickly dying Series2 80 hr info command, I'll have to track down the labeling problem but its getting the info correct:

MFS volume set for /dev/disk0s10
The MFS volume set contains 4 partitions
/dev/disk0s1010
MFS Partition Size: 256MiB
/dev/disk0s1011
MFS Partition Size: 33375MiB
/dev/disk0s1012
MFS Partition Size: 256MiB
/dev/disk0s1013
MFS Partition Size: 41975MiB
Total MFS volume size: 75862MiB
Estimated hours in a standalone TiVo: 79
This MFS volume may be expanded 4 more times

I hope to have binaries available by the end of the week for all the functions but info is all I know for sure right now.

Quick question, when running the info command on linux do you need to just specify the disk device or the first mfs partition. Right now I'm specifying the first mfs partition and it works fine.


----------



## Loki

Okay I think I have mls working now. If someone can confirm this looks like an appropriate output: 
Name Type FsId Date Time Size
---- ---- ---- ---- ---- ----
Anchor tyDir 39965 04/15/04 04:21 5380
AreaCode tyDir 3353 02/17/03 14:24 16
AuxInfo  tyDir 346838 07/28/03 18:10 32
Avalanche tyDir 48223 02/24/03 04:29 20
AvalanchePP tyDir 35170 04/21/03 04:42 4
CaptureRequest tyDir 35159 02/19/03 02:12 68
Clips tyDir 39979 02/20/03 04:52 44
Component tyDir 202 08/20/02 11:55 40
Config tyDir 26 08/20/02 11:54 32
CorrelationIndexPart tyDir 35156 02/26/03 21:56 16
DataSet tyDir 24 04/15/04 01:36 1048
DataSetVersion tyDir 164365 04/17/04 13:21 1200
Database tyDir 2366 04/17/04 12:20 244
DiskUsed tyDir 164349 04/17/04 16:03 3444
Genre tyDir 42 03/05/04 14:37 2476
GuideIndexV2 tyDir 3287 04/17/04 13:16 372
GuideIndexV2.temp tyDir 3651 04/17/04 13:16 4
Headend tyDir 3632 09/05/03 00:57 16
HeadendPostalCode tyDir 3633 12/02/03 16:48 24
HeadendTms tyDir 3634 09/05/03 00:57 20
LeadGeneration tyDir 39797 04/15/04 01:36 1864
LinkTag tyDir 346842 04/09/04 19:26 3796
LogoGroup tyDir 1754 08/20/02 11:57 52
MenuItem tyDir 35200 02/21/04 14:30 20
MessageItem tyDir 34503 02/18/03 19:11 48
Package tyDir 39303 04/12/04 18:36 3816
Person tyDir 3062 02/19/03 20:42 32
PostalCode tyDir 3638 02/17/03 14:25 16
Preference tyDir 34539 02/17/03 15:47 12
Recording tyDir 2166 04/23/03 02:05 332
Resource tyDir 1396 04/23/03 02:10 80
Rubbish tyDir 3339 04/17/04 12:20 436
Schedule tyDir 3290 03/26/04 23:50 332
SeasonPass tyDir 3349 04/23/03 02:09 96
Server tyDir 4 04/17/04 13:17 1272
Setup tyDb 3291 03/16/04 04:59 3700
Showcase tyDir 39309 04/15/04 01:36 1132
ShowcaseIndex tyDir 3333 04/17/04 13:27 216
ShowcaseIndex.temp tyDir 3644 04/17/04 13:27 4
Star tyDir 3064 08/20/02 12:08 36
State tyDir 3289 04/27/03 21:39 260
StationTms tyDir 3364 03/16/04 04:50 4880
SwModule tyDir 5 01/22/04 02:12 164
SwSystem tyDir 3060 01/21/04 08:51 44
Table tyDir 21 08/20/02 11:54 52
Theme tyDir 272311 06/18/03 21:19 24
TuikRes tyDir 141249 04/14/03 04:50 44
User tyDir 3309 04/23/03 02:09 4
tmp tyDir 34765 04/17/04 17:03 4


----------



## Loki

I'm calling it a night.
Good news, I appear to have gotten the backup function to work
Bad news, My Tivo's harddrive is refusing to give up data 480 MB into the backup. Guess I get to reprogram all my season passes.


----------



## Loki

It lives! Going cold turkey without a Tivo for two weeks is NOT a pleasant experience. Anyways mfstools appears to be succesfully ported to OSX as a command line tool. I'm going on travel on Wed-Fri but once I get back I'll start submitting DIFFS to Tiger. The only issues I found was the difference in partition naming, some ioctls, and a few bugs in the endian conversion code.


----------



## ADent

Thanx for the work. 

Looking forward to a download for us dummies.

Now I just need to go install OSX on one of my old Towers (OSX in on my eMac, not the optimal machine for pulling/swapping hard drives). Any chance of this working in an external firewire case?


----------



## Loki

There should be no problem with using a Firewire drive enclosure. The BSD system sees all hard drives as additional disk devices. The problem will be figuring out what drive is what. I think I'll add a quick utitility to attempt to identify all the drives with their /dev numbers. The most important thing to remember is that the /dev numbers change, or at least have the potential, to change with each boot.


----------



## jgraessley

You can open /dev/disk<n> and read the first two or four bytes to look for the TiVo signature to identify TiVo disks. You can also use IOKit to find any MFS partitions. In doing so, it's easy to spot TiVo disks (this only works for Series 2 TiVo drives unless you install the TiVoPartitionScheme kext). If you go the IOKit route, you can get notifications when disks are inserted and removed. IOKit can also give you more information about the drive (manufacturer, whether it's connected via FireWire, etc). I'm working on adding the functionality of mfstools to the MFS Browser tool. I'd like to get a real UI on top of this stuff so you can just select a disk from a menu to back up. It's going to be a while though.


----------



## Loki

Attached is some code that will determine the drive designators. If anyone knows of anymore magic numbers for the first few bytes let me know and I'll add them.

After downloading the file do the following in a terminal or xterm
mv main.c.txt main.c
cc main.c
sudo ./a.out


----------



## Loki

I've sent Tiger the diffs, hopefully I didn't break anything on the PC side. If anyone is desperate for a binary or the source code let me know. The tivo I restored with this code and expanded onto 120 Gig drive has been working fine for the past 4 days.

As for an OS 9 version I won't be doing it but it shouldn't be that hard with this code and the MacTivo Blesser code.


----------



## v8q

Rumor has it (I don't have an emac) that if your e-mac is 800Mhz or faster, you have two IDE busses - so you can connect up to four disk devices. 
Previous emacs and all imacs have only one IDE bus.
It would be a messy affair - you would need an external power supply and need to run a long IDE cable out of the computer somehow but others have done it and it seems to work just fine.



> _Originally posted by ADent _
> *Thanx for the work.
> 
> Looking forward to a download for us dummies.
> 
> Now I just need to go install OSX on one of my old Towers (OSX in on my eMac, not the optimal machine for pulling/swapping hard drives). Any chance of this working in an external firewire case? *


----------



## mattack

Do these tools have lba48 support? Can I then use a new kernel as described in 
http://www.courtesan.com/tivo/bigdisk.html after using these tools?

If not, does anyone plan on upgrading them for such support?


----------



## ADent

Anybody get this to work? Directions on what to download and how to get it to work?

I would pick up a couple of extra firewire cases if I could run MFSTools on my Mac.


----------



## bergschrund

Anyone have this working? I'd be happy to help out in any way I can.

Thx


----------



## jimphillips224

I was able to get MFStools to work a restore for me. Thanks Stan for the help. That is it worked once for a few hours. However, I now think my hard drive is dead. I just had one replaced last July and the darn TiVo crashed during a program update and never restarted.


----------



## ADent

So you used MFSTools to restore an image using Mac OS X (10.3 or 10.4?) to a drive that then died shortly thereafter.

Did you use a drive hooked up the IDE bus or external case?


----------



## jimphillips224

I am using OS 10.4 with my Tivo drive connected to the IDE bus.


----------



## jimphillips224

Here's the entire story, I have a Pioneer 810H. About a month ago while it was updating the program information it crashed and never was able to restart. I just got the Welcome screen and after about 60 seconds it would reboot itself over and over again.

I tested the hard drive with Maxtor's PowerMax test utility at work. And it tested fine.

I asked Stan for a Pioneer 810 Tivo image, and he promptly replied. I downloaded devMapper1.1 and mfstool 2.0 from Loki. And followed the instructions and I was able to reimage my Tivo drive. But then it crashed again while updating the program information.

So, I bought a new hard drive and repeat the steps above and it doesn't work.

What am I doing wrong? Any help is appreciated.

Here is my terminal session.

-------------------

Available functions:
backup Backup TiVo drive fast and small.
restore Restore mfstool backups to TiVo drive.
add Add partitions to your TiVo MFS volume.
mls List files in the MFS volume.
d Dump raw data from MFS volume.
info Display information about MFS volume.
For help on a particular function: Desktop/mfstool <function> -h
My-Mac-Computer:~ phillijd$ sudo Desktop/mfstool info /dev/disk1
MFS volume set for /dev/disk1
The MFS volume set contains 4 partitions
/dev/disk110
MFS Partition Size: 256MiB
/dev/disk111
MFS Partition Size: 33887MiB
/dev/disk112
MFS Partition Size: 256MiB
/dev/disk113
MFS Partition Size: 42991MiB
Total MFS volume size: 77390MiB
Estimated hours in a standalone TiVo: 81
This MFS volume may be expanded 4 more times
My-Mac-Computer:~ phillijd$ sudo Desktop/mfstool d -h
Usage:
d [-i inode] [-f fsid] [-s sector] [-c count] [-h] [-b]
-f Read from fsid
-i Read from inode
-s Read from sector, or from offset into file
-c Read count sectors, where applicable
-h Display in hex, no matter the format
-b Display in binary, no matter the format
My-Mac-Computer:~ phillijd$ sudo Desktop/mfstool restore -h
Usage: restore [options] Adrive [Bdrive]
Options:
-h Display this help message
-i file Input from file, - for stdin
-p Optimize partition layout
-x Expand the backup to fill the drive(s)
-X scale Expand the backup with block size scale
-q Do not display progress
-qq Do not display anything but error messages
-v size Recreate /var as size megabytes (Only if not in backup)
-s size Recreate swap as size megabytes
-l Leave at least 2 partitions free
-b Force no byte swapping on restore
-B Force byte swapping on restore
-z Zero out partitions not backed up
My-Mac-Computer:~ phillijd$ sudo /Users/phillijd/Desktop/mfstool restore -bzpi /Users/phillijd/Desktop/pioneer810-5.2.1A-01-2-275.bak /dev/disk1
Password:
Drive 1 size: 160086464
Size needed for single drive restore: 159429632
Moving partition 11
Moving partition 13
Starting restore
Uncompressed backup size: 1510 megabytes
Restoring 1510 of 1510 megabytes (100.00%) (46.28% compression) 
Cleaning up restore. Please wait a moment.
Restore done!
My-Mac-Computer:~ phillijd$ sudo Desktop/mfstool mls /dev/disk1
Password:
Name Type FsId Date Time Size
---- ---- ---- ---- ---- ----
Anchor tyDir 105959 03/25/04 04:21 1068
AreaCode tyDir 5737 03/12/04 21:57 16
AuxInfo tyDir 128291 03/25/04 04:09 32
Avalanche tyDir 106086 03/15/04 04:28 20
CaptureRequest tyDir 5431 03/16/04 11:39 92
Clips tyDir 5471 03/15/04 04:21 44
Component tyDir 254 09/16/03 15:40 40
Config tyDir 5595 09/16/03 16:53 56
CorrelationIndexPart tyDir 23018 12/31/03 00:15 16
DataSet tyDir 29 03/27/04 01:48 688
DataSetVersion tyDir 30 04/03/04 12:57 808
Database tyDir 5102 04/03/04 02:57 524
DiskUsed tyDir 2367 04/03/04 13:00 3580
Genre tyDir 32 03/12/04 23:45 2476
GuideIndexV2 tyDir 59680 04/03/04 13:14 372
GuideIndexV2.temp tyDir 97268 04/03/04 13:14 4
Headend tyDir 6049 03/12/04 22:01 40
HeadendPostalCode tyDir 6050 03/12/04 22:01 64
HeadendTms tyDir 6051 03/12/04 22:01 52
LeadGeneration tyDir 5343 03/18/04 14:49 1552
LinkTag tyDir 128295 03/25/04 04:14 1588
LogoGroup tyDir 2356 03/13/04 01:02 52
MenuItem tyDir 5409 09/16/03 15:56 36
MessageItem tyDir 6728 12/30/03 21:50 48
Package tyDir 5354 03/29/04 23:41 3824
Person tyDir 5106 03/13/04 02:08 32
PostalCode tyDir 6053 03/12/04 22:01 16
Preference tyDir 59258 03/12/04 17:29 12
Recording tyDir 5467 03/15/04 04:20 240
Resource tyDir 1590 09/16/03 15:47 80
Rubbish tyDir 5631 04/03/04 12:39 468
Schedule tyDir 2 03/13/04 17:10 1812
SeasonPass tyDir 5478 03/12/04 18:35 96
Server  tyDir 7 04/03/04 12:54 2128
Service tyDir 5094 09/16/03 15:47 24
Setup tyDb 59667 03/18/04 09:16 16124
Showcase tyDir 5416 03/27/04 01:48 500
ShowcaseIndex tyDir 5540 04/03/04 13:01 216
ShowcaseIndex.temp tyDir 22939 04/03/04 13:01 4
SpigotMap tyDir 5084 09/16/03 15:47 28
Star tyDir 5108 09/16/03 16:14 36
State tyDir 4 03/13/04 00:47 308
StationTms tyDir 5754 03/12/04 22:00 7464
SwModule tyDir 8 03/15/04 22:05 124
SwSystem tyDir 5104 03/14/04 12:38 44
Table tyDir 26 03/12/04 23:44 52
Theme tyDir 59633 03/29/04 10:51 176
TmpStorage tyDir 100217 04/03/04 12:33 132
TuikRes tyDir 2425 09/16/03 15:46 44
tmp tyDir 6057 04/03/04 13:39 4
My-Mac-Computer:~ phillijd$ umount /dev/disk1
umount: /dev/disk1: not currently mounted


----------



## mattack

I have no idea -- but are you using a series 1 or 2? The tools supposedly don't work on a s1 -- and they didn't when I tried a long time ago. I keep meaning to try again on an Intel Mac.. and even directly boot the Linux tools CD if necessary.. (Hmm, I guess they don't have the EFI support necessary??)


----------



## jimphillips224

I am using a series 2 tivo. The funny thing is that I was able to restore the image once before.


----------



## entropy

So far, this isn't working for me. Using 10.4.5, a 250G Seagate drive (7200.8) and the command line

sudo mfstoolDEBUG backup -Tao - /dev/disk1 | mfstoolDEBUG restore -s 127 -pxi - /dev/disk2

I get

No such file or directory
zsh: 3173 broken pipe sudo mfstoolDEBUG backup -Tao - /dev/disk1 | 
zsh: 3174 segmentation fault mfstoolDEBUG restore -s 127 -pxi - /dev/disk2

With several variations of that line, I get

No such file or directory
Restore failed: Internal error 4.

I don't want to backup video, so I originally tried

sudo mfstool backup -o - /dev/disk1 | mfstool restore -s 127 -xpi - /dev/disk2

(is this the right command for that?) and start with

/dev/disk1 Big Tivo 37.29 40.04
/dev/disk2 Big Mac 232.89 250.06

I end up with (no crashes or errors, but)

/dev/disk1 Big Tivo 37.29 40.04
/dev/disk2 Little Unknown 232.89 250.06

and the drive won't boot. Looking at the first few bytes, it seems that it isn't the same at all.

thylacine:~: head /dev/disk1
?root=/dev/hda4 dsscon=true unfinaltest=trueunnamed
@?EMFS media region 2MFS?E3?TPM

thylacine:~: head /dev/disk2
[email protected] 1Image3PM??A Kernel 1Image 3PM?ARoot 1Ext23PM?ABootstrap 2Image3PM?$AKernel 2Image3PM?4ARoot 2Ext23PM?4A?Linux swapSwap?3PM?,A/varExt23PM?,MFS application [email protected]??MFS media regionMFS??3PM?,Second MFS application [email protected]?DSecond MFS media regionMFS?D3PM?,ANew MFS ApplicationMFS3PM?0Aq New MFS MediaMFSq 3PMPA /ExtraApple_Free /3

Is this a byteswapping problem? Previous to this attempt, I tried to backup to a file and restore from that. Using both the -b and -B options, I seemed to get the same thing--a drive that wouldn't boot in the TiVo. Or, could it be that early AT&T Series 2 hardware can't actually handle 250G drives?

Thanks for any advice you can come up with. I'm probably going to have to use my friend's Linux box to do this since I want to get it done tonight or Saturday, but I'd *really* like to see this stuff working on a Mac.

(For reference, my hardware is a 20" iMac G4, and I'm using IDE-to-USB adapters.)

Thanks (again)

~ Kiran <[email protected]>


----------



## mattack

Are you sure you're using the right /dev entries? It would be useful to try each part of the command separately to figure out what you're getting the "no such file or directory" from.


----------



## entropy

mattack said:


> Are you sure you're using the right /dev entries? It would be useful to try each part of the command separately to figure out what you're getting the "no such file or directory" from.


I'm using the right entries.

I can back up to a file... just not restore from that file. So i assume that something fairly subtle is going on here.

~ Kiran <[email protected]>


----------



## mattack

actually it looks like the restore command is crashing because of the segmentation fault line.


----------



## entropy

mattack said:


> actually it looks like the restore command is crashing because of the segmentation fault line.


<nod>

However, I can run a backup to a file (812M) and restore from that without crashing (and I believe I can also successfully pipe using no flags (except -o of course)) so that doesn't explain why I'm ending up with a drive that doesn't boot, and seeing different data on the two drives.

~ Kiran <[email protected]>


----------



## PaulWilkinsUK

Can anyone tell me how to remove com_graessley_iokit_TiVoPartitionScheme from my Mac


----------



## Marconi

Might someone post a sticky to this thread explaining the state of Mac TiVo tools and perhaps some download links?


----------



## j-beda

Marconi said:


> Might someone post a sticky to this thread explaining the state of Mac TiVo tools and perhaps some download links?


Please?

I can't seem to find any Mac information nicely collected anywhere either.


----------



## OKCRandy

Where might these tools be found?


----------



## rhaleblian

hello folx.
mfstools nearly built without changes. had complaints

#if !HAVE_ENDIAN32_SWAP
static inline u_int32_t
Endian32_Swap (u_int32_t var)
{
var = (var << 16) | (var >> 16);
var = ((var & 0xff00ff00) >> 8) | ((var << 8) & 0xff00ff00);
return var;
}
#endif

errors from gcc are forthcoming...


----------



## rhaleblian

restore.c:40: error: parse error before '(' token
restore.c:43: error: initializer element is not constant
restore.c:43: warning: type defaults to 'int' in declaration of 'var'
restore.c:43: warning: data definition has no type or storage class
restore.c:44: error: parse error before 'return'

commented out the function above. what's the ramificiation? am i freakin crazy?
and yes this can go offline...


----------



## Marconi

I have Series 2 TiVos. I would like to remove recordings from TiVo, store them on a drive attached to my Mac and then later return those .tivo files to the DVR.

I've found that I can use pyTiVoX to return .tivo files to the DVR. (I makes them available for transfer from Mac to the TiVo, so I can add multiple items to a transfer queue, same as if I were transferring from another TiVo DVR. So, the getting the recordings back to TiVo is solved.

I can download .tivo files using Safari, but only one at a time. Is there something that will allow me to select multiple recordings on a TiVo DVR and queue them to be transferred to my Mac? I want to keep them as plain .tivo files, not convert them in any way. That eliminates iTiVo and TiVoDecodemanager. Those apps apply a conversion.

I'm not shell script savvy enough to use curl to iterate through an entire TiVo and transfer everything (which is what I want to do).

What's the best way to download all of a DVR's recordings to my Mac, saveing them as .tivo files?


----------



## wmcbrine

There's not much reason to avoid simple conversion to MPEG -- it's fast, and there's no quality loss. I think the stripped files even transfer back faster. But anyway, are you sure iTiVo or TDM doesn't have an option to do it?


----------



## j-beda

Marconi said:


> I've found that I can use pyTiVoX to return .tivo files to the DVR.


Is that better than just using TiVo Desktop with the "unsupported" video sharing turned on? There are instructions on how to do that manually, but I also have TiVoGoBack.zip (TiVoGoBack Enabler.app) by the VisualHub guy that does it at a click of a button - see sourceforge.net/forum/forum.php?thread_id=3255518&forum_id=874533


----------



## Marconi

j-beda said:


> Is that better than just using TiVo Desktop with the "unsupported" video sharing turned on? thread_id=3255518&forum_id=874533


As long as the files are in .tivo format, TiVo Desktop works just as well. If the files have been decoded or converted, then the recording metadata are lost. Even including the showname.xml file in the TiVo Desktop upload directory doesn't preserve the metadata. So, yes, pytivoX is a better solution if the format is other than .tivo.

The best solution is straight .tivo files though.


----------



## j-beda

So, does pytivoX preserve or enable the metadata in other formats?


----------



## Marconi

j-beda said:


> So, does pytivoX preserve or enable the metadata in other formats?


pytivoX USES the metadata if it's there in a txt file. The metadata file needs to be created by iTiVo when it downloads the recording. Unfortunately, for me, this is not presently working; the txt files are empty.


----------



## Marconi

What tools are available to Mac users to edit TiVo recordings in their native MPEG2 Muxed format? 

I'm using iTiVo to download movies ('decrypt') and I'd like to trim the start and end of each. MPEG Streamclip can edit, but when I play a file with it, I get audio and no video. Hard to edit that way. I can play the files fine in VLC player. What does VLC have that MPEG Streamclip does not? 

Anyway, what will properly display and edit MPEG2 Muxed TiVo files?


----------



## Marconi

I have a Series 2 DVR with two 500GB drives and I am unable to run a kickstart on it. The lights which indicate it's time to enter the KS code never illuminate. I'm assuming this is a problem with the installed TiVo software. 

I'm hoping there's a way that I can use some other tool to do fsck or some such on my Mac. I have mfslive v 1.3b on a CD and it boots fine on my Mac and it is the main tool I use for upgrading drives and such for my TiVos. I connect multiple drives using USB adapters and use mfslive to copy from old to new drives.

The CD does not, unfortunately, have 'fsck' and I don't know if it has anything else I can use to try and repair what is, apparently, damaged TiVo s/w or some such on this S2.

I am reluctant to connect any TiVo drive to my Mac when booted to OS X as Finder will add files, Spotlight will want to start indexing everything and so on.

So, what tools are available to Mac users to diagnose/repair drives from a Series 2 TiVo DVR?


----------



## Marconi

How does one mount a TiVo (Series 2, if that matters) drive on OS X 10.5.8?

I can't do it in Disk Utility (fails) so I'm guessing I have to do it in Terminal.

What's the correct 'mount' syntax to mount a TiVo drives partitions?


----------



## mattack

You can't mount it, the filesystem isn't a normal filesystem. (I've been told that the filesystem is a slightly modified HFS, but it isn't regular HFS..)

You can boot from a linux CD on an Intel Mac, or use Mac-compiled tools to do drive upgrades on a Mac though.. I've done it..


----------



## mattack

btw, mplayer will play tivo downloaded files. I haven't found a way to edit them either. I had thought someone replied here earlier about a way to remux the files without a lengthy reencoding, but it must have been a different thread.


----------



## wmcbrine

mattack said:


> You can't mount it, the filesystem isn't a normal filesystem. (I've been told that the filesystem is a slightly modified HFS, but it isn't regular HFS..)


No HFS, AFAIK. What it is, is the partition table is based on an old-style Mac partition table, but uses a different ID. Then the software partitions are ext2, while the recordings are stored in "MFS" partitions, that are accessed only in userspace, by tivoapp.


----------



## mattack

So then maybe I'm wrong----if all of this is known, are there tools to get programs out when directly connected to a computer? Not 'mount' it exactly, but do the equivalent of copying over the network without that overhead?


----------



## wmcbrine

Yes there are. But I think it's still a banned topic here. Also, last I looked (quite a few years ago now), it only worked if you'd already disabled encryption on the TiVo before making the recordings.


----------



## Marconi

I typically use iTiVo (decrypt) to transfer recordings to my Mac then use KMTTG to cut commercials. KMTTG uses mencoder to implement the cuts and always crashes with HD content from a TiVo HD.

Usually, the comskip step (creating the .edl file) works and the cut step fails but sometimes the comskip step crashes before completing the edit list. 

Is this a known problem with HD content? Is there a fix that involves configuration?


----------



## Marconi

What's a Mac tool that can concatenate multiple muxed MPEG2 files? I get my recordings from TiVo via iTiVo using the 'decrypt' option so that the files remain in muxed mpeg-2 format containing multiple streams (including multiple CC streams).

Sometimes I need to join several recordings. I still use the no-longer-supported VisualHub for concatenating but it does not process the Closed caption streams so I'm looking for another tool that will concatenate files without losing the CC streams.

Any ideas?


----------



## mattack

Heh, I know above I said that I have compiled mfstools.. but now I can't.. I was probably on a PPC machine at the time.. I'm on 10.5.8 at the moment (yes I know that's very old but irrelevant to this specific topic).

The first error is:

readwrite.c: In function 'tivo_partition_read':
readwrite.c:138: error: 'off64_t' undeclared (first use in this function)

and I tried googling it, and see various other times people run into that, even on Linux.. but not a simple solution.

Has anybody compiled it on OS X for Intel? I presume that the bootable CD does not have support for a dual-SATA/USB adapter (i.e. an external device you can plug two SATA drives into at the same time). The other Tivo tools disk definitely doesn't have that support. So I had to bring my drives into work, and might do it again... (this time, replacing my S3 drive that died)

But getting this running on a laptop would be good.


----------



## mattack

Actually, I found that was typedefed in /usr/include/sys/dtrace.h, but including that ends up getting me to a link error:

gcc -g -O2 -o mfsadd -Wl,main=mfsadd_main mfsadd.o -L../lib -lmfs -lmfsvol -lmacpart 
ld: file not found: main=mfsadd_main
collect2: ld returned 1 exit status
make[1]: *** [mfsadd] Error 1
make: *** [install-recursive] Error 1

that was after I removed all references to "--defsym" IIRC from the makefiles.. something ld was complaining about.


----------



## fhturner

mattack said:


> Heh, I know above I said that I have compiled mfstools.. but now I can't.. I was probably on a PPC machine at the time.. I'm on 10.5.8 at the moment (yes I know that's very old but irrelevant to this specific topic).


Hey mattack, any chance you can step me/us through your compilation on a PPC Mac? Did it function correctly? I'd like to get MFS Tools working on a G4 running 10.5.8, but I'm not quite sure where to begin, aside from stabbing blindly in the dark. I'm no expert on this, clearly, but I'll help you out however I can as you try to compile on x86.

Thx,
Fred


----------

