Superblocks…

Discussion in 'TiVo Upgrade Center' started by Soapm, Jan 10, 2012.

  1. Soapm

    Soapm Active Member

    1,666
    9
    May 9, 2007
    Aurora, CO
    Sorry for the length of this post but I wanted to ask something then give the reason for my question. What is the superblock and what does it mean in terms of the partition table and how the OS will use the partitions?

    Look at these sets of partition tables. The first two were copied from the stock drive to a 1TB with WinMFS then from the 1TB to a 2TB with jmfs. Look closely at the Super Header and notice how partition 14 is listed on both headers. Does this mean the Tivo will try to use those partitions?

    1TB WinMFS
    Code:
    MFS Super Header
    	state=0 magic=ebbafeed
    devlist=/dev/hda10 /dev/hda11 /dev/hda12 /dev/hda13 [B]/dev/hda14[/B] /dev/hda15
    
    Partition Maps
     #:                  type name                            length base      ( size  )
    10                   MFS MFS application region          589824@311662658 ( 288.0M)
     11                   MFS MFS media region             137629696@171919424 (  65.6G)
     12                   MFS MFS application region 2        589824@312252482 ( 288.0M)
     13                   MFS MFS media region 2           171919360@64        (  82.0G)
     [B]14                   MFS MFS App by Winmfs                 2048@312842306 (   1.0M)[/B]
     15                   MFS MFS Media by Winmfs         1640673280@312844354 ( 782.3G)
    
    2TB WinMFS then jmfs
    Code:
    MFS Super Header
    	state=0 magic=ebbafeed
    devlist=/dev/hda10 /dev/hda11 /dev/hda12 /dev/hda13 [B]/dev/hda14[/B] /dev/hda15 /dev/hda16
    zonemap_ptr=1121 total_secs=3904915456
    
    Partition Maps
     #:                  type name                            length base      ( size  )
     10                   MFS MFS application region          589824@311662658 ( 288.0M)
     11                   MFS MFS media region             137629696@171919424 (  65.6G)
     12                   MFS MFS application region 2        589824@312252482 ( 288.0M)
     13                   MFS MFS media region 2           171919360@64        (  82.0G)
     [B]14                   MFS MFS App by Winmfs                 2048@312842306 (   1.0M)[/B]
     15                   MFS MFS Media by Winmfs         1640673280@312844354 ( 782.3G)
     16                   MFS MFS media region 3          1953511534@1953517634( 931.5G)
    
    Now look at the two partition sets when upgraded only with jmfs. Notice it doesn't write partition 14 into the Super Header.

    1TB jmfs
    Code:
    MFS Super Header state=0 magic=ebbafeed
    devlist=/dev/hda10 /dev/hda11 /dev/hda12 /dev/hda13 /dev/hda15
    
    Partition Maps
     #:                  type name                            length base      ( size  )
    10                   MFS MFS application region          589824@311400514 ( 288.0M)
     11                   MFS MFS media region             137629696@171919424 (  65.6G)
     12                   MFS MFS application region 2        589824@311990338 ( 288.0M)
     13                   MFS MFS media region 2           171919360@64        (  82.0G)
     [B]14            Apple_Free Extra                             1645@312580162 ( 822.5K)[/B]
     15                   MFS MFS media region 3          1640943361@312581807 ( 782.5G)
    
    2TB jmfs
    Code:
    MFS Super Header
    	state=0 magic=ebbafeed
    devlist=/dev/hda10 /dev/hda11 /dev/hda12 /dev/hda13 /dev/hda15 /dev/hda16
    
    Partition Maps
     #:                  type name                            length base      ( size  )
       10                   MFS MFS application region          589824@311400514 ( 288.0M)
     11                   MFS MFS media region             137629696@171919424 (  65.6G)
     12                   MFS MFS application region 2        589824@311990338 ( 288.0M)
     13                   MFS MFS media region 2           171919360@64        (  82.0G)
     [B]14            Apple_Free Extra                             1645@312580162 ( 822.5K)[/B]
     15                   MFS MFS media region 3          1640943361@312581807 ( 782.5G)
     16                   MFS MFS media region 4          1953504000@1953525168( 931.5G)
    
    What do you conclude if anything from this? Could this be why an HD will work with a 2TB drive updated by jmfs and not WinMFS? Or does that Super Header entry mean something entirely different?
     
  2. unitron

    unitron Well-Known Member

    16,576
    41
    Apr 28, 2006
    semi-coastal NC
    I assume all of those examples started with copying a 160GB HD drive to the larger one, and then expanding.


    The TiVo comes with an application region partition and a media region partition pair, and, except perhaps for early small drive S1s, a second application and media region pair.

    So they are partitions 10, 11, 12, and 13.

    The old MFS Tools, its successor MFS Live, and WinMFS all expand by adding another MFS pair.

    So, if you expand with any of those they all add MFS pair 14 and 15.

    Sometimes MFS Tools and MFS Live leave a little extra at the end, which, because of the way the Apple Partition Map does things, or the way stuff that reads APMs does things, gets called an Apple Free Partition. Everything's a partition, even the unpartitioned part.

    WinMFS seems to be able to avoid leftovers.

    So, in the first example, WinMFS copies and expands and fills the 1TB drive.

    Is the second example copying the 1TB of the first example with jmfs to the 2TB and then expanding one more time?

    That's what it looks like.

    Copying the 160GB drive straight to the 2TB drive with WinMFS and then expanding, as I recall, doesn't stop at the 1TB border like that, but I tried a number of different tricks and combinations and could be remembering something else.


    In the third and fourth examples it looks like jmfs does its math from the end of the drive backwards when figuring out what it can do new partition wise, and since it just copied from the original 160GB, it hasn't yet rewritten the partition map so the free space on the target drive isn't yet classified as an Apple Free partition.

    So on the 1TB drive in the third example you've got the 2 MFS pairs put on at the factory, a single MFS media partition added by jmfs at the end of the drive, and a little extra space in between.

    That could actually be copied to a 2TB by jmfs and have it add a 16th partition, I suspect.

    On the 2TB drive in the fourth example you've got the 2 original MFS pairs, a single MFS media partition that doesn't break the "no partitions over 1TB rule" added at the end, another single MFS media partition added just before that, and that little extra bit left just before that.

    Since that little extra bit gets classified as an Apple Free Partition, but not as an MFS partition, it's left out of the dev list in the superheader, which only lists MFS partitions.
     
  3. Soapm

    Soapm Active Member

    1,666
    9
    May 9, 2007
    Aurora, CO
    Ok, so having partition 14 in the superblock means nothing since the way WinMFS does it that partition is formatted MFS. That makes sense. Another way to look at it is that jmfs actually waste that space which is like crumbs falling from the table when that space is less than 1mb on a 2TB drive.

    I thought I was on the trail of why a jmfs 2TB formatted drive works in a HD but a WinMFS formatted 2tb drive will give you fits. Of course my theory had a major flaw since a WinMFS 1TB drive works fine in a HD but has that same partition 14 in the superblock.
     
  4. unitron

    unitron Well-Known Member

    16,576
    41
    Apr 28, 2006
    semi-coastal NC
    Your examples don't show the first 9 partitions, so I don't know what size the swap partition, partition 8 in the normal scheme of things, is, but that'd be an excellent place to put that extra space (which would have to be done during a WinMFS copy operation). In other words, make 8 bigger, which bumps 9 through 13 closer to the end of the drive.
     
  5. Soapm

    Soapm Active Member

    1,666
    9
    May 9, 2007
    Aurora, CO
    My theory may be flawed but my problem with a large swap partition is that it's a waste of space. The most the swap partition is used is during a mfsassert -please repair job. Other than that the original size from Tivo has been sufficient.

    Now I could see the point of increasing the var partition since that would allow you to store all your hacks in var without fear of exceeding the 40% wall. One problem I found with jmfs is that it didn't allow any of the switches to customize those partitions when I used it from CLI.

    The first 9 partitions in each of those schemes are stock. I don't see the point of a larger swap.
     
  6. unitron

    unitron Well-Known Member

    16,576
    41
    Apr 28, 2006
    semi-coastal NC
    I have no idea what a 40% wall is.

    As for your problem with jmfs not allowing any customization, that's why I used the 1TB as a middleman, so that I could use WinMFS on it, and then just use jmfs to copy to the 2TB and add one big partition.

    If I needed customization further than a bigger swap size, I'd use the greater flexibility of MFS Live, without expanding, then use WinMFS to expand, all onto the 1TB middleman.

    I have a 1GB swap partition on my HD's 2TB drive.

    That's 15 minutes of best quality SD video.

    Or put another way, one half of one-thousandth of that 2TB. 0.05%

    I can spare it.

    That free space that's showing up as partition 14 in 2 of your examples that I suggested be added to the swap partition? It's a little more than half of a 1.44 MB 3.5" floppy disk. If you have a stock 128MB swap partition, adding it would get it up to 129 if you round up. It's about nine-tenths of a second of best quality SD video. By the time the nightly news anchor says "Good Evening", it's used up.
     
  7. Soapm

    Soapm Active Member

    1,666
    9
    May 9, 2007
    Aurora, CO
    I read somewhere that 40% is where the var partition wipes itself. To keep it from wiping you need to stay under 40%.

    Makes sense, I just wish jmfs was a little more robust.

    True dat... I guess you're saying swap is where the live video buffer is. I didn't know that. My traditional thinking of swap is it gets used when regular memory runs out.

    Again, true dat. One of these days I'm going to get lrhorer to teach me how t manually manipulate the partitions using PDISK. Until then me and mine will have to live with the outcome of my limited skills...
     
  8. unitron

    unitron Well-Known Member

    16,576
    41
    Apr 28, 2006
    semi-coastal NC
    Frankly, I'm not really sure at all what TiVo does with var.

    Yeah, it'd be nice if it had as much flexibility and muscle as the MFS Live cd (and I wish I better understood how it works), but considering what I paid for it (nothing) and what it let me do that I couldn't have done otherwise...

    I have no idea where the 30 minute buffer is, but since it's TiVo video, I'm thinking one of the MFS media partitions, especially since the swap partition on a stock dual tuner S2 was no bigger than the one on a single tuner model.

    If prices ever come back down so I can get some decent used drives on which to practice ...

    As it is, owning TiVos has me running 3 more computers than I used to, so I'm running short on spare hardware.
     

Share This Page