# The -f option in MFSLive



## Dougal (Oct 31, 2002)

I am planning to try upgrade my dual 160GB UK Series 1 Tivo to a single Western Digital RE2 GP 1TB drive, and then enable mode 0 for the first time 

I am going to use an Addonics SATA to IDE converter (which supports LBA48) to connect the drive.

I have been doing a bit of reading around and have a couple of questions:

1) Does the current MFSLive 1.3b have the -f option available yet? I will need to use this option as I have already hit the max partition limit on drive A.

2) I see that the -f option was available in a beta release, but that the author considered some of the bugs significant enough to withdraw the beta until fixed. So I am now curious to know what were/was the significant bug/bugs deemed serious enough to withdraw the beta? Did the -f option work properley on Series 1? It seems a lot of people have had good success with the beta.

3) What does the -F (uppercase) option do as opposed to -f (lowercase)

4) It seems that the Windows port, WinMFS, has an mfsadd function that can perform the same as the mfstools -f. Although I prefer the idea of using the traditional Linux command line mfstools, the windows GUI version, WinMFS does look like it should work a treat - thanks spike2k5.

5) What exactly does the -f option do? i.e. I am interested in a technical explanation. Reading around I see that one possible way of beating the max partition limit is to coalesce adjacent partitions and hack the partition table accordingly. Is this exactly what -f does or does it expand the last partition "properley" so it's entirely the same as if it had been created larger in first place.

6) If the -f switch doesn't expand the last partition so that it is exactly the same as if it were created this way in the first place, are there any disadvantages to doing a -f rather than doing a truncated backup/restore and recreating the MFS partitions? e.g.


Will a -f'd Tivo perform as well as one with freshly recreated MFS partitions? 
Will the backup and restore tools work properly on a -f'd drive
Does performance degrade if I expand a second time with -f again, not that I plan on going past 1TB 

If anyone can cast any light on the above queries that would be great. I will let you know how the upgrade goes


----------



## Da Goon (Oct 22, 2006)

-F forces kernel/root partitions to 4 megs/256 megs. If the version posted on mfslive.org is missing what you're looking for, PM me. I've got a beta copy somewhere. It should work fine for your situation.


----------



## Dougal (Oct 31, 2002)

Thanks for your reply Da Goon. A copy of the beta would be greatly appreciated in case WinMFS doesn't work for me (will PM you).

I think I will try the utilities in following order:

1) WinMFS as this should work and seems to be the author's recommended approach for -f expansion now (handled automatically by mfsadd).

2) Mfslive 1.3b as this is the latest Mfslive as we speak, but I don't think the -f option has been incorporated yet.

3) Mfslive beta (now somewhat outdated, but hopefully works well enough for Series 1 Tivos and is currently the only release with the -f option).

Thanks for the explanation of -F (uppercase). It seems that the Series 1 Tivo has the smaller kernel/root partitions anyway and that -F is only needed if an old version of mfstools (with the partition shrinking bug) has been used on a Series 2 or 3 (not available in the UK).

I am still interested to know technically how -f works. i.e. whether it does the partition coalesce hack or something fancier? Anyone know?


----------



## Pete77 (Aug 1, 2006)

Dougal said:


> I am still interested to know technically how -f works. i.e. whether it does the partition coalesce hack or something fancier? Anyone know?


I believe it expands the last partition to properly fill the rest of the disk, although I stand prepared to be corrected by those who better understand these things and also have far more practical experience in Tivo hard drive upgrading than I.

I would have thought that Spike would happily answer your question on that particular point though?


----------



## Dougal (Oct 31, 2002)

Thanks Pete77. I may post the question on the Spike's mfslive forum. If I find out I will post my findings here.


----------



## Dougal (Oct 31, 2002)

Well, I tried just about everything I could to move my 2 x 160GB drives to a single 1TB drive, preserving recording, but it seems my particular scenario is not yet supported.

Specifically, it seems neither MFSLive beta (-f option) or WinMFS will (as yet) do a 2 to 1 drive expansion, preserving recordings, if the "A" drive has previously been expanded:
http://www.mfslive.org/forums/viewtopic.php?t=120

This gotcha isn't made clear in the mfslive/WinMFS docs, so might be worth updating if you are reading this Spike:
http://www.mfslive.org/softwareguidep3.htm

BTW, one notable difference between the WinMFS and MFSLive backup tool is that WinMFS backup does not preserve /var. This is mentioned in the docs on mfslive.

As I had a spare TiVo hanging around , in the end I decided I would try to upgrade without preserving recordings and watch all the old programs by putting the old discs in the other TiVo.

Then more problems...I found that the WinMFS beta truncated backup just hung in the middle of copying. I nearly went for a dd_rescue (although I was sure none of the partitions were corrupt), so instead tried the mfslive linux "backup|restore" command (without preserving recordings) and it worked a treat. BTW, thanks Spike for maintaining and improving these tools.

I did have various other problems along the way e.g. couldn't get the mfs linux ISO to boot (hung at ACPI related stuff) - managed to get it to work with ACPI=off as a boot parameter. In fact, in the end I actually copied the mfslive command line utils to a floppy and used Knoppix as it recognises my 3ware IDE card.

Anyway, suffice to say I am now the proud owner of a single drive 1TB Tivo  and for what it's worth I would say it runs a little quieter and cooler than the 2 old Maxtors. Thanks Da Goon and Pete77 for your input.


----------



## Pete77 (Aug 1, 2006)

Dougal said:


> This gotcha isn't made clear in the mfslive/WinMFS docs, so might be worth updating if you are reading this Spike:
> http://www.mfslive.org/softwareguidep3.htm


I doubt he will be reading this thread in the Tivo UK section. Perhaps best to PM him on this point as we know he is usually very responsive to end user input.



> Anyway, suffice to say I am now the proud owner of a single drive 1TB Tivo  and for what it's worth I would say it runs a little quieter and cooler than the 2 old Maxtors. Thanks Da Goon and Pete77 for your input.


Good to hear that a 1TB SATA drive can be made to work in a UK Tivo S1 with an IDE to SATA converter.

As to running cooler than the two Maxtors for such a huge drive I would say that is an achievement, even allowing for the unfair advantage of now running 2 drives rather than one. Even my supposedly quiet and cool pair of Samsung HA250JC 250 Gb drives run a good deal hotter at a 37C Tivo System Information temp in a 21C living room compared to 27C for the original 30Gb +15Gb Quantum drives.

Its a shame MFSLive and WinMFS does not yet support a 2 drive to 1 drive upgrade as this is clearly a common requirement on already upgraded pairs of drives, especially given the huge capacity of the very latest single drives.

As your 1TB drive must give you around 300+ hours of recordings in Mode 0 I doubt any more hard drive capacity than that is advisable in view of the significant slow down in Now Playing and other Tivo menu operations with 400or more items in Now Playing, even with a Cachecard and 512MB of RAM. Unfortunately at this point the puny Tivo S1 processor begins to catch up with us.


----------



## Dougal (Oct 31, 2002)

Just send Spike a PM as suggested



> Even my supposedly quiet and cool pair of Samsung HA250JC 250 Gb drives run a good deal hotter at a 37C Tivo System Information temp in a 21C living room compared to 27C for the original 30Gb +15Gb Quantum drives.


I never spent much time monitoring the temperature of my 2 drive setup but I am sure it doesn't run any hotter with the single 1TB and maybe 1 or 2 degrees cooler (dependent on room temperature, but between 28 degrees and 36 degrees over the last week).

Bear in mind the drive is part of the Western Digital "Green Power" range with low power consumption as a design aim (so cooler and quieter running follows). I believe they don't actually quote a spindle speed for these drives - I think the speed varies between 5400rpm and 7200rpm depending on load. Not the cheapest drive at the moment (found one for just over £200), but do look like the ideal DVR drive.
http://www.wdc.com/en/products/Products.asp?DriveID=385

BTW, I don't work for WD - I am sure other manufacturers will follow with similar products 



> As your 1TB drive must give you around 300+ hours of recordings in Mode 0 I doubt any more hard drive capacity than that is advisable in view of the significant slow down in Now Playing and other Tivo menu operations with 400or more items in Now Playing, even with a Cachecard and 512MB of RAM. Unfortunately at this point the puny Tivo S1 processor begins to catch up with us.


I don't anticipate needing any more space and, as you say, I should fit about same (slightly more) on the 1TB in mode 0 as I did on 2x160GB at "medium" quality. The 2x160GB was always very responsive (with 512MB CacheCard installed), so I expect the 1TB to perform similarly once full of 400 mode 0 recordings. However, I imagine I would see quite a slowdown if I let it fill up with 1000 "medium" quality recordings!


----------



## Dougal (Oct 31, 2002)

Just another small gotcha to be aware of if you find you need to do a truncated backup in order to upgrade your Tivo. Remember to include the -l 32 parameter in the backup command. The -l 32 parameter is needed for all truncated backups of UK Tivos. The mfslive documentation doesn't mention -l 32 as it is written with US Tivos in mind and so uses -f 9999 instead.

See this post for more info on why -l 32 is important (and the symptoms if you you omit to us it):
archive.tivocommunity.com/tivo-vb/history/topic/84133-1.html

I used the following to upgrade my dual 160TB Tivo to a single 1TB drive (substitute your drive device names accordingly):

```
backup -l 32 -so - /dev/sdb /dev/sdc | restore -s 1024 -zpi - /dev/sdd
Then, WinMFS mfsadd
```
Swap file of 1GB is sufficient to allow a 2TB Tivo to recover from GSOD. I don't plan to ever upgrade to 2TB, but heh you never know 

I didn't use the x parameter in the restore, but instead used the WinMFS mfsadd option to add the extra partition pair to fill the full 1TB. Using the restore x parameter works just as well but seems to leave a few hundred kilobytes unused (i.e. mfsinfo lists a partition at the end described as "Apple_Free Extra", a few hundred kilobytes in size).


----------



## Pete77 (Aug 1, 2006)

Dougal said:


> I used the following to upgrade my dual 160TB Tivo to a single 1TB drive (substitute your drive device names accordingly):
> 
> 
> ```
> ...


Did you not need to use the -r4 option (see www.steveconrad.co.uk/tivo/upgrade3.html) in the restore command to ensure the larger block size was used in view of using a 1TB drive? Or do the WinMFS methods with expanding the partition size avoid the need to take this route to successfully format the drive?


----------



## Dougal (Oct 31, 2002)

The "-r 2" bug is fixed in the latest version of mfslive 1.3b. "-r 2" is the default for the "restore" or "mfsadd" command in mfslive (i.e. the Linux tools), and this should now work fine, although I used WinMFS to do the mfsadd.

Per the WinMFS FAQs:



> While performing restore or mfsadd you can set r value to control the minimum allocation size. This is used only when creating new media zones (where all the recorded shows are stored) using -x options.
> What it means is the smallest block of data that TiVo file system(mfs) can access is the r value.
> 
> r 0 = 2048 sectors or (1MB blocks) (TiVo and blesstivo default)
> ...


BTW, it is a little misleading - "might be better to keep r 2 for SD recordings to reduce file fragmentation". I don't think use of "r 4" is being discouraged - what it means is "r 1" is not recommended, even for SD recordings.

As the WinMFS allocation size of 20480 sectors (or 10MB blocks) is midway between "r 2" (4MB) and "r 4" (16MB) I figured this was probably a sensible block size anyway for a larger drive. i.e. Good compromise between fragmentation and wasted space (as I am not exactly short of space now anyway).

To be honest, if I had used the "x" option in the Linux tools I would probably have just stuck with the "r 2" default now the bug is fixed. I have never noticed any performance issue with my Tivo that I would attribute to file fragmentation, so I guess "r 2" is perfectly adequate.


----------



## Pete77 (Aug 1, 2006)

Dougal said:


> BTW, it is a little misleading - "might be better to keep r 2 for SD recordings to reduce file fragmentation". I don't think use of "r 4" is being discouraged - what it means is "r 1" is not recommended, even for SD recordings.
> 
> As the WinMFS allocation size of 20480 sectors (or 10MB blocks) is midway between "r 2" (4MB) and "r 4" (16MB) I figured this was probably a sensible block size anyway for a larger drive. i.e. Good compromise between fragmentation and wasted space (as I am not exactly short of space now anyway).
> 
> To be honest, if I had used the "x" option in the Linux tools I would probably have just stuck with the "r 2" default now the bug is fixed. I have never noticed any performance issue with my Tivo that I would attribute to file fragmentation, so I guess "r 2" is perfectly adequate.


Thanks for the interesting information.

I always did wonder if a 1TB drive might require "r 8" or similar but it appears that setting does not even exist. Its good to hear that the revised MFS tools appear able to cope with almost any drive size. Although we could obviously try to figure out ways to support 2 x 1TB SATA drives in a Tivo no doubt a 2TB SATA drive will be along shortly................

2TB would work but there would be a lot of frustrating hanging around for the various file operations in the Now Playing screens to work. This is entirely caused by finite memory and processor speed limitation of the Tivo S1 machines.


----------

