PDA

View Full Version : Hard and fast MFS information



Saturn
07-10-2001, 02:10 PM
Well, I've seen mfs thrown around more and more lately - some have figured out how to get data out of it, change it, and some are even rebuilding it. However, I have yet to see a simple description of exactly what mfs is, and how to access it. Here's the data I've gathered:

0. mfs is multimedia file system. Or maybe just media file system.

1. mfs is a journaled filesystem (fs), developed by TiVo, for TiVo. A journaled fs, from my understanding, means that changes to the fs go through different states, much as a database transaction does - pending, written, etc. This way, if something _bad_ happens during a write, it doesn't corrupt anything.

2. mfs is only accessible from tivosh. But why? What makes tivosh so special? tivosh is a shell of its own that accepts mfs commands. Anyone have a comprehensive list of mfs commands?

3. ?most? mfs commands must be enclosed within a transaction, or tivosh just pouts at you.

4. mfs is extendible through the use of blessed drives and utilities such as TiVoMad's. All of these boil down to a utility provided by TiVo called mfsadd. But why can additions to the mfs be made only once?

Can anyone point me to a resource that describes mfs and its commands (functions, libraries, anything) in more detail? I'm more interested in the "why", not the "how". That is, why something works the way it does, not how to do X.

iceberg
07-10-2001, 03:27 PM
You are ahead of me in understanding mfs. I'm not quite at the point where I could accuratly formulate a question about it. I'm looking forward to seeing some responses to this.

Saturn
07-11-2001, 05:16 PM
Found out a little more. This is more about how, not why...

How to get a directory listing of mfs:

in tivosh, type:

mls /

This gives you a directory listing of everything in the root of mfs. This indicates that mfs is organized into a directory structure, just like all of the other filesystems we are used to.

mls /SwSystem

gives you a list of the files in /SwSystem

mls /S gives you a list of the files in /, but only those that would sort after "S"

mfs is case sensitive. And it is (apparently) automatically sorted by name. Sort order is:

Numbers
Uppercase Letters
Lowercase Letters



in tivosh, as far as I can tell, there is no notion of a "current" directory. (i.e. no "mcd" command)

Objects (files) in mfs have certain attributes. Those directly visible from mls include:

Name
Type (tyDir [directory], tyDb [file])
FsId (a file system identifier)
Date
Time
Size

Other attributes may exist, don't know how to view them yet.


Please feel free to correct me if I'm wrong anywhere here.

Saturn
07-11-2001, 05:32 PM
I'm going to attempt to make a list of mfs commands and what they do. In addition, a list of TiVo provided .tcl mfs related scripts, and what they do.

Here's the ones I know so far (message will be edited to reflect any additions)


MFS commands

mls --"ls" equivilant




MFS scripts
dumpobj.tcl --dumps an object. Type dumpobj for useage information. Don't know exactly what it is dumping yet.

Saturn
07-11-2001, 05:35 PM
Found a complete list of the available commands in tivosh, simply by hitting ?. Please help me document these commands.

Vadmir - can you provide some web space or some cleaner way to document these commands (perhaps a FAQ format or something, one header for each command).

AddObject
AddToObjectCount
ApgCompare
AppendSlashIfNone
AttributeNameToEnumType
ClearLookupForOurName
ClearObjectCounts
ComputeObjectId
ComputeObjectIdFromObjectId
CreateLookupForEnum
DecimalCompare
DumpObject
DumpObjectCounts
EnumsInType
FAlreadyVisited
FileDate
FileSize
FindAllDirs
FindOrCreateObject
FindOrCreateSubObject
ForeachMfsFile
FromMfs
GlobObjSpec
IndentSpace
LinuxFileSameAsMfsFile
LookupEnumNameByValue
LookupEnumValueByName
LookupOurNameFor
MfsFileExists
MfsLog
MfsRemoveTree
MfsRubbishTree
MfsSetVerbose
NormalizeIndexPath
ObjectIds
PrefixMatches
ReadableApgFrequencyLNB
ReadableApgFrequencyLNBs
ReadableApgFrequencyParameters
ReadableApgProgramCategory
ReadableCategory
ReadableChannelNum
ReadableConditionalExpression
ReadableLogoIndex
ReadableThumbs
RetryTransaction
RubbishObjectByFsId
TailBuffer
ToMfs
_MfsExists

(cont'd in next message)

Saturn
07-11-2001, 05:36 PM
after
append
array
auto_execok
auto_load
auto_mkindex
auto_qualify
auto_reset
binary
body
break
case
cat
catch
catvar
cd
class
cleanPools
cleanchildren
clock
close
closelog
code
concat
config
configbody
continue
cp
dbclose
dbhandles
dbhasrefcounts
dbindex
dbload
dbloadmfs
dbloadschema
dbopen
dbunload
delete
dumpobj
dumpobjUsage
ensemble
eof
error
eval
event
exec
exit
expr
fblocked
fconfigure
fcopy
file
fileevent
find
flush
for
foreach
format
getpri
gets
glob
global
grep
holdoff
if
incr
info
interp
interp0
ioctl
itcl_class
itcl_info
itrans
join
kill
killall
killproc
lappend
lindex
link
linsert
list
llength
load
local
log
lrange
lreplace
ls
lsearch
lsort
min
mls
namespace
open
package
pid
pkg_mkIndex
pool
proc
procinfo
ps
putlogputs
pwd
random
read
reboot
regexp
regsub
rename
return
rm
scan
scope
seek
set
setSyslog
setlog
setpri
shaketcl
slice
socket
source
split
string
subst
switch
sync
tail
tclLog
tclMacPkgSearch
tclPkgSetup
tclPkgUnknown
tell
time
trace
transaction
try
tvsource
unknown
unlink
unset
update
uplevel
upvar
util
variable
vwait
while


I know it is a daunting task...but it will help out so many people looking for information on mfs...

Lure
07-14-2001, 07:01 AM
look at this, saturn
list of tivosh commands (editable for everyone) (http://213.10.105.132/tivowebsite/tivoshdatabase/main.cfm)
Is this what you had in mind?

Lure

Vadim
07-14-2001, 08:34 AM
Lure,
Great job.. However it should only stay editable for right now, later that edit option should be password protected.

TiVoMad
07-15-2001, 08:12 AM
Hi,
Some of the verbs you have listed are actually tcl functions which are in the files in /tvlib/tcl/tv. A good one to look at is mfslib.tcl. You see a lot of these files included in the 'main' scripts.

Regarding mfsadd only working once, that's because the TiVo programmers were lazy. There are assumptions in the mfs library code about where to put new values like device names, sector lists etc. If you call it a second time it doesn't append, it just overwrites and so screws up everything in the process. The V2 mfsadd is better. It can add an mfs partition to a system that is already married BUT, it still has bugs which stop it from being truly re-callable. However, I have reverse engineered this program and am in the process of fixing the bugs. This will allow DirecTiVoMad and multiple marriages.

I would certainly be in favour of a good repository for mfs information. Remember there is more than one aspect to cover. As I see it there is the data schema (the object hierachy), tivosh, the tcl scripts and also, the low level mfs format (i-nodes, buddy maps, sector lists, etc). The first two are useful for data manipulation, adding TiVo functionality, data extraction and so on. The third is good for backups, expansion, divorcing and the like.

I could certainly contribute to the 'uncencored FAQ' !

Kind Regards,
Trevor.

aram1s
07-17-2001, 08:12 PM
More importantly, the second one is good for MFS emulation on an i386 PC. It would be a lot easier to play with all of this stuff on an i386 PC where a kill -9 will get you out of a locked up tivosh :)

A

black_widow000
09-20-2001, 08:58 PM
Has any further effort been made to document the MFS database?
if so where could I find more detailed information

▀lack Widow

AlphaWolf
07-11-2002, 08:34 PM
Does anybody know of a way to send a general query to the database? (or at least some way of searching it)

TheD0CT0R
01-22-2003, 10:31 AM
Did this project ever go anywhere? I'm interested in finding a description of the tivosh commands and any other info this (or a similar) project might have unearthed.

Thanks!
Doc

Lure
01-22-2003, 03:36 PM
I plulled the plugout of the database but is there is someone who wants to put it to live. fine i start over again. As far as I know there where simularities in other systems that made this project worthless.
I never went further with it.

TheD0CT0R
01-22-2003, 07:16 PM
Lure, being new to this, I'm looking for all the info I can get my hands on. If nobody wants to take this on, I'd gladly at least take what you already have for my own education. You say that, there where similarities in other systems that made this project worthless... Can you elaborate or give me some links?

Thanks!
Doc

TheD0CT0R
01-23-2003, 08:49 AM
Thanks for the pointers, I'll look into them.

Doc

NutKase
12-13-2003, 05:19 AM
Originally posted by TheD0CT0R
Thanks for the pointers, I'll look into them.

Doc

You must have received the 'pointers' via pm. That didn't help anyone but you...

So... for the benefit of the rest of us, can you post the pointers?

NutKase

rc3105
12-13-2003, 04:09 PM
there used to be several more posts in this thread. they were edited down to "delete me's" (peeps tired of getting pm's from the clueless begging for more info I guess)

NutKase
12-14-2003, 01:34 AM
Originally posted by rc3105
there used to be several more posts in this thread. they were edited down to "delete me's" (peeps tired of getting pm's from the clueless begging for more info I guess)

Sounds like "Knowledge is power" if you ask me.

NutKase

PS. That kind of attitude hurts us all and it's still not absent.

rc3105
12-14-2003, 03:38 AM
hacking a tivo's not a simple thing, it's a tweaked ppc linux distro with a very custom tcl driven database (mfs/tivoapp) & no official api

can't speak for others, but every time I get a pm from somebody too lazy / dumb to search / read the faqs, or see a post that starts out with "I looked but couldn't find..." about a stickied topic - I feel less & less like posting & making myself a target

if somebody actually puts a little effort in I'll gladly answer questions or provide info / links, but WAY too many people just want to be spoon fed and it gets old

nothing sinister 'bout it. it's a hobby so people do whatever they feel like, not what others want/expect/insist

NutKase
12-14-2003, 05:16 AM
Originally posted by rc3105
can't speak for others, but every time I get a pm from somebody too lazy / dumb to search / read the faqs, or see a post that starts out with "I looked but couldn't find..." about a stickied topic - I feel less & less like posting & making myself a target

I feel the same way. :)


Originally posted by rc3105
if somebody actually puts a little effort in I'll gladly answer questions or provide info / links, but WAY too many people just want to be spoon fed and it gets old

Right. Thanks for the links too. I hope you're not putting me in that category.

NutKase

Lure
12-14-2003, 05:54 AM
the project died right after it started but I have found the empty database in an old back up. If some one wants to have it, take it: ftp://tivo:tivo@80.61.68.159:21

It is an empty database. If I have energy enough i might even upload the whole html site I had around it.

Thinking about the why it ever died: most of the commands are already discribed somewhere else. most of it was standard.

At this point I almost stopped completely putting energie in TiVo hacking. I was only trying to get a dumb vcr like machine on PAL to use for sportpurposes. I got it to work with the help of this communitie but are now using standard PAL hdr's. The prices come down very hard, no use to get a tivo over to europe anymore.

no more tivo's to europe: I know someone that will regret that:-)... we find something else.:D :D :D

NutKase
12-14-2003, 01:55 PM
Thanks. The file say 'Unrecognized database format in Access', any ideas?

I'll try again in a couple of days if you can leave it up. I'm going out of town in a few hours until the 19th

NutKase

Lure
12-14-2003, 06:48 PM
try changing the language settings in windows.

the "," and the "." and the date "/" and "-" could give problems. Try Dutch/netherlands settings.

it is a regular ms access file. I opened it here with access 2002 (10.2616.3501) SP-1

did anyone else have problems?

:D :D :D

mpauley
12-14-2003, 10:56 PM
Here ya go.. in coma seperated values (csv) format...