[ExtractStream] Re: ExtractStream + new SVR2000 FIXED!
Edmond E. Shwayri
eshwayri at n...
Tue, 08 Jan 2002 04:32:23 -0500
I have figured out the problem. Here are my calculations based on -w's
output :
Error mapping FSID to partition/offset!
device: /dev/hda10
sector: 2252
offset: 1153024
fsid: 70845
calcPartition: 2
calcOffset: 579072
======
Error mapping FSID to partition/offset!
device: /dev/hda10
sector: 2253
offset: 1153536
fsid: 70845
calcPartition: 2
calcOffset: 579072
Doing the calculation :
70845 * 20db2 = 9534178410
With FFFFF Mask :
00111000010010000000010001101010
00000000000011111111111111111111 (DirecTivo Mask FFFFF)
00000000000010000000010001101010
00010000000010001101011000000000 269014528
With 3FFFF Mask :
00111000010010000000010001101010
00000000000000111111111111111111 (Original Mask 3FFFF)
00000000000000000000010001101010
00000000000010001101011000000000 579072
Well neither of these is right; however, notice what happens if we add :
00000000000010001100001000000000 573952 (0x461 << 9)
--------
1153024
Now we match. So what this means is that eventhough this is part #2 it must
be calculated the same as #0.
Lets look at 1 from part #0 :
Error mapping FSID to partition/offset!
device: /dev/hda10
sector: 6724
offset: 3442688
fsid: 67033
calcPartition: 0
calcOffset: 137660416
======
Error mapping FSID to partition/offset!
device: /dev/hda10
sector: 6725
offset: 3443200
fsid: 67033
calcPartition: 0
calcOffset: 137660416
67033 * 20db2 = 9021167074
00011001101101000001010111100010
00000000000011111111111111111111
00000000000001000001010111100010
00001000001010111100011000000000 137086464
00011001101101000001010111100010
00000000000000111111111111111111
00000000000000000001010111100010
00000000001010111100011000000000 2868736
+ 573952
-----------
3442688
A match!
So from this I can draw the following conclusions :
[1] The proper mask for a Sony SVR-2000 is 0x3ffff. 0xfffff will NOT work
on stand-alones like the SVR-2000. A switch say -m <mask value> may be a
good parameter to add so that one program can work in both
situations. Also maybe an environment variable could be checked.
[2] /dev/hda12 and /dev/hda13's calculations seem to depend on who created
these partitions. On my Sony SVR-2000 these partitions were created at the
factory. They need to be treated in the same way as /dev/hda10 and
/dev/hda11 when it comes to calculating offsets. They must have been
formatted with some sort of header area. On TivoMad expanded A drives,
those partitions get their own special calculations since they are
formatted different (without the header).
So, what should work on my system is :
loff_t mapFSID(unsigned long fsid, int *partition) {
loff_t tempOffset;
int tempPartition;
tempOffset = ((((loff_t) fsid * 0x20db2) & 0x0003ffff) + 1) << 9;
tempPartition = (tempOffset & 0xf0000000) >> 27;
tempOffset += (0x461 << 9);
*partition = tempPartition;
return tempOffset;
Could you please compile a quick copy and email it to me
(eshwayri@n...) so that I can try these calculations. I promise to
install the cross-compiler very soon, but that will take time since I am
not sure where to begin.
At 04:21 PM 1/7/02, you wrote:
>--- In ExtractStream@y..., "Edmond E. Shwayri" <eshwayri@n...> wrote:
> > That does not fix it for the Sony SVR-2000. Here is the output from an
> > extraction I tried. Looks like it found 1 of 4. 2 of the ones it didn't
> > find are on hda12, but 1 is on hda10.
> > Grrrrrrrrrrrrrrrrrrrrrr...........................
>
>Could you please try ExtractStreamDx1 -w and tell me what the results
>are. It should walk every other MFS App partition and print a summary of
>the results. You have a two drive system with 6 partitions, and it could
>very well be that the formula for second partitions isn't correct in that
>case. Thanks!
>
>-Ray
>
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
>
>To unsubscribe from this group, send an email to:
>ExtractStream-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to the
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.