# WinMFS "Fix Bootpage" hosed my Series 1 boot partition :-(



## sskraly (Dec 11, 2002)

Series 1 (HDR112) upgraded couple of years ago w/320GB WD and LBA48 kernel. Was in a GSOD loop, so someone suggested using WinMFS "Fix Bootpage Option 2" option to switch the boot partition to the other boot partition. 

Before doing this, WinMFS could select the drive, and mfsinfo/pdisk worked fine and showed all my partitions. Now, can't select the drive, it says "Wrong Tivo Partition Signature", and can no longer do anything with the drive. 

Any ideas how to get back to the other boot partition (I'm afraid to try WinMFS Fix Bootpage Option 1") or fix so that I can select the drive again?

Thanks,
Sam


----------



## sskraly (Dec 11, 2002)

Forgot to mention that, when I try to select it, WinMFS reports that the drive is Format="Tivo Series 2 or 3".


----------



## lillevig (Dec 7, 2010)

sskraly said:


> Series 1 (HDR112) upgraded couple of years ago w/320GB WD and LBA48 kernel. Was in a GSOD loop, so someone suggested using WinMFS "Fix Bootpage Option 2" option to switch the boot partition to the other boot partition.
> 
> Before doing this, WinMFS could select the drive, and mfsinfo/pdisk worked fine and showed all my partitions. Now, can't select the drive, it says "Wrong Tivo Partition Signature", and can no longer do anything with the drive.
> 
> ...


Try putting the drive back in the box and using the kickstart code to swap the boot partition back. Then use the codes to check the drive. Here's a link to kickstart codes for each Tivo series.

http://www.weaknees.com/tivo-kickstart-codes.php


----------



## sskraly (Dec 11, 2002)

I don't see a kickstart code to swap the partition back, but I don't even get
to the left LED turning yellow (it turns green and the screen just says "Your PTV is Starting Up", so I can't get to the kickstart codes. I might have tried code 52 or 56 if I could get that far.

Presumably, the unit isn't recognizing the drive at all and isn't even starting to boot--I guess kickstart is on the HDD rather than the motherboard?

Anyone have any idea what WinMFS->Fix Bootpage->Option 2 could have possibly done to screw my drive up so badly? More importantly, is there any way to get back to the other partition if Linux boot CDs don't even recognize the drive any more? The other boot partition was functional enough that I could boot mfstools and run mfstools and pdisk on it despite the GSOD loop.

Thanks
Sam


----------



## lillevig (Dec 7, 2010)

sskraly said:


> I don't see a kickstart code to swap the partition back, but I don't even get
> to the left LED turning yellow (it turns green and the screen just says "Your PTV is Starting Up", so I can't get to the kickstart codes. I might have tried code 52 or 56 if I could get that far.
> 
> Presumably, the unit isn't recognizing the drive at all and isn't even starting to boot--I guess kickstart is on the HDD rather than the motherboard?
> ...


I think that code 52 (Emergency SW reinstall) actually swaps the two boot partitions. As for getting to the kickstart mode, did you try this:

(If you are unable to catch the change in color or timing, you may also hold the PAUSE button down continuously during the restart until the second light comes on.)

In other words, just press and hold the PAUSE button before applying power to the Tivo. It does take some time to get the yellow LEDs to light up so be patient.


----------



## sskraly (Dec 11, 2002)

Update: mfslive1.4 w/lba48 support can see the drive and run things like pdisk, tpip,
bootpage, etc (but not mfsinfo).

It still complains about "unknown partition table" and "unknown partition signature 0x504d (expected 0x4d50)"

I figured out that bootpage -p (or tpip --flipboot) both work to swap the Partition #s for the boot partition (from 6 to 3 or vice-versa), but they don't seem to flip the root partition (from 7 to 4 or vice-versa). I think I can change this with 

tpip -P "root=/dev/hda4" (current set to root=/dev/hda7 to go along with changing boot partition from 6 to 3. 

Can anyone confirm if this sounds right or if there's a better way (still can't get into kickstart from the Tivo)?

Thanks!
Sam


----------



## bshrock (Jan 6, 2012)

Are the kickstart codes in ROM or are they on the disk? If the DVR will not boot then the kick start codes will not work.


----------



## GBL (Apr 20, 2000)

sskraly said:


> Update: mfslive1.4 w/lba48 support can see the drive and run things like pdisk, tpip,
> bootpage, etc (but not mfsinfo).
> 
> It still complains about "unknown partition table" and "unknown partition signature 0x504d (expected 0x4d50)"
> ...


Looks like you have a byte-swap issue. Try mfslive 1.3b.


----------



## sskraly (Dec 11, 2002)

OK, 1.3b fixed the partition signature issue (Thanks!), but mfsinfo still says "/dev/sdb10: No such device or address" (I'm using an IDE->USB, so my Tivo drive is sdb.

As a quick recap:
- Series 1 expanded with 320GB WD a couple of years ago. Don't remember which boot cd version I used, but must have had LBA48 support.
- After a power outage, came back up in GSOD loop
- WD Extended Diags on the drive ran fine, no errors
- Suspected OS corruption, ran WinMFS FixBoot, put back in Tivo and now can't get past "Powering Up" screen. 


- Don't know what WinMFS did, but assuming it messed up the Boot flip, I'll try to switch back to old Boot partiition and Root Partition to see if I can get into Kickstart on the Tivo

Any other ideas?

Thanks for all the ideas...


----------



## unitron (Apr 28, 2006)

Somehow WinMFS reporting that as a Series 2 or 3 drive went right by me.

WinMFS should be able to handle byteswapped S1 drives without any problem.

It now occurs to me however, that when you upgraded to the 320GB drive you probably used the -p option when you ran the restore command, probably blindly copied it from a tutorial and had something like this

...restore -s 127 -xzpi - 

which means you gave it the "optimized" partiton layout introduced in the Series 2s.

Series 1s don't know to expect that.

(I unthinkingly did something like that with a Series 2, forgot to include the -p, because I'd been doing S1s up until then, which left me with a 500GB drive that worked but that failed when I tried to make a backup image, so don't feel like the Lone Ranger. )

Do you have a spare drive at least as big as that 320 you can temporarily use? There may be a way around the problem, but I'll have to do some experimenting to see if what I have in mind will work. I'm almost finished setting up my dedicated TiVo wrangling computer, so I'll try to make that my first project.


MFS Live v1.4 should handle byte-swapping just as well as 1.3b, although I seem to remember something about a problem with 1.4 not being able to mount partitions that 1.3b could.

Did you run WinMFS's fixswap before flipping the boot partitions?


If you do MFS Live's bootpage this way

bootpage -?

it'll show you the available options, one of which lets you swap 3 and 6 and another of which lets you swap 4 and 7, but they don't work quite the same way--on one you just plug in a number (if i recall correctly, it's been a while) and on the other it's something like entering

root=7

or 

boot=7


----------



## sskraly (Dec 11, 2002)

> Did you run WinMFS's fixswap before flipping the boot partitions?

I never ran fixswap, I ran WinMFS's fix bootpage->Option 2 after someone suggested that my OS was corrupt and this might let me run off the alternate copy. Prior to that, mfsinfo worked fine. After running fix bootpage, that caused mfsinfo to stop working and WinMFS to report that I have Format="Tivo Series 2 or 3". 

I was able to bvot MFSLive 1.3b and run bootpage -f to flip the boot partition from 6 to 3 and then bootpage -P "root=/dev/hda4" to presumably use the alternate kernel (was set to root=/dev/hda7). Put back in the Tivo and still no sound of drive activity or getting past the "Powering Up" screen so that I can try to get into Kickstart. 

Yes, I can get a spare drive. What are you thinking might be going on and what do you have in mind to try?

Thanks!
Sam


----------



## unitron (Apr 28, 2006)

sskraly said:


> > Did you run WinMFS's fixswap before flipping the boot partitions?
> 
> I never ran fixswap, I ran WinMFS's fix bootpage->Option 2 after someone suggested that my OS was corrupt and this might let me run off the alternate copy. Prior to that, mfsinfo worked fine. After running fix bootpage, that caused mfsinfo to stop working and WinMFS to report that I have Format="Tivo Series 2 or 3".
> 
> ...


Not sure at this point what's going on, not having your hardware here to so my own tests on, but what I'm thinking, based on my suspicion that you've got an S2/S3 partition layout on that drive, is to restore a Philips image to a separate drive, and expand, getting the same size MFS partitions, but with an S1 partition layout, and then using dd_rescue to copy over the MFS partitions from the problem drive to see if we can save the recordings.

This would be a lot easier if I had your stuff on my bench.

If it's any consolation, S1 drives seem to corrupt easily. Like I said, I've got a shelf full.


----------



## lillevig (Dec 7, 2010)

sskraly said:


> > Did you run WinMFS's fixswap before flipping the boot partitions?
> 
> I never ran fixswap, I ran WinMFS's fix bootpage->Option 2 after someone suggested that my OS was corrupt and this might let me run off the alternate copy. Prior to that, mfsinfo worked fine. After running fix bootpage, that caused mfsinfo to stop working and WinMFS to report that I have Format="Tivo Series 2 or 3".
> 
> ...


If you decide to follow Unitron's suggestion I can provide you with an S1 image for use with WinMFS. Just send me a PM if interested.


----------



## sskraly (Dec 11, 2002)

Thanks for the help--is there any other info you want me to extract from the drive to confirm your diagnosis? Otherwise, let me know what you want me to try next...

Also, remind me how to ensure I have LBA48 support on the new drive--I remember it was copykern but can't remember syntax or where that is done in the process...


----------



## unitron (Apr 28, 2006)

sskraly said:


> Thanks for the help--is there any other info you want me to extract from the drive to confirm your diagnosis? Otherwise, let me know what you want me to try next...
> 
> Also, remind me how to ensure I have LBA48 support on the new drive--I remember it was copykern but can't remember syntax or where that is done in the process...


Download this

http://www.dvrupgrade.com/dvr/stores/1/downloads/BOOTCD/ptvlba48-4.04.iso.zip

unzip it and burn yourself a copy.

You boot from it.

Then you mount the drive it's in

something like

mount -t iso9660 /dev/hdd /cdrom

assuming the drive is the slave on the secondary IDE channel

and you can do

ls

at the command line (that's a lowercase L followed by an s, means list) to see what directories the cd created in memory, I'm pretty sure cdrom is one of them.

For some reason, for some people, if the cd isn't mounted, copykern can't fully find itself even though it may appear to have worked.

Once you've mounted the cd drive, just type

copykern

and follow the directions.

That assumes you have the drive with the image already restored to it connected to the computer as well as the cd drive (and good idea not to have any other drives connected besides those 2 at the time).

The step before all of that is to get a good S1 Philips image and restore it to a spare drive without using the -p option.

I'll have to do something like that here to refresh my memory on some points (which means it won't happen until tomorrow after I've had some sleep, but I'm not giving up on trying to get you out of what I sort of helped you get into)

What do you have in the way of a spare drive?

(I just looked at this post in preview, I can tell I need sleep)


----------



## unitron (Apr 28, 2006)

sskraly said:


> Thanks for the help--is there any other info you want me to extract from the drive to confirm your diagnosis? Otherwise, let me know what you want me to try next...
> 
> Also, remind me how to ensure I have LBA48 support on the new drive--I remember it was copykern but can't remember syntax or where that is done in the process...


Don't do anything to the problem drive that makes any changes to it until I get back in touch tomorrow.

In the meantime, see if pdisk from the MFS Live cd can show the partition info and better yet send its output to a text file.

If you have a USB thumb drive (formatted FAT32) you could insert it, wait for it to be detected (might have to hit enter to get back to command line), then mount it

mount -t vfat /dev/sda1 /dos

then

pdisk /dev/hda | /dos/pmap.txt

then

ls /dos

to see if it's in there and then you can copy and paste instead of having to copy it all off of the screen by hand (and possible making a mistake)


----------



## unitron (Apr 28, 2006)

sskraly said:


> Thanks for the help--is there any other info you want me to extract from the drive to confirm your diagnosis? Otherwise, let me know what you want me to try next...
> 
> Also, remind me how to ensure I have LBA48 support on the new drive--I remember it was copykern but can't remember syntax or where that is done in the process...


Okay, so tomorrow turned into day after tomorrow.

Did you ever get the partition map copied?

UPDATE!

I may have figured out what happened.

Based on this

"unknown partition signature 0x504d (expected 0x4d50)"

That's a byte-swap problem

Because you apparently used the -p option of the restore command, you gave that S1 drive an S2 and above partition layout.

Which I didn't know or didn't catch when I first suggested boot fix.

Apparently (and if not for your problem this would never have occured to me) WinMFS doesn't look to see if the drive is byte-swapped but decides if it's dealing with a byte-swapped S1 by looking at the partition layout, so even though it can handle byte-swapping, it doesn't know to do it in that circumstance.

So boot fix gave you a non-byte swapped bootpage.

S1s don't speak non-byte swapped.

If you just want the Philips to work again, we can overwrite that 320GB with a new image.

If you want to save what's on the drive, we'll need another drive and even then no guarantees, but it's worth trying.


----------



## sskraly (Dec 11, 2002)

Here's the pdisk output showing the partition info:


Partition map (with 512 byte blocks) on '/dev/sdb'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1 
2: Image Bootstrap 1 4096 @ 181070912 ( 2.0M)
3: Image Kernel 1 4096 @ 181075008 ( 2.0M)
4: Ext2 Root 1 262144 @ 181079104 (128.0M)
5: Image Bootstrap 2 4096 @ 181341248 ( 2.0M)
6: Image Kernel 2 4096 @ 181345344 ( 2.0M)
7: Ext2 Root 2 262144 @ 181349440 (128.0M)
8: Swap Linux swap 260096 @ 181611584 (127.0M)
9: Ext2 /var 262144 @ 181871680 (128.0M)
10: MFS MFS application region 1048576 @ 182133824 (512.0M)
11: MFS MFS media region 24777728 @ 156293184 ( 11.8G)
12: MFS Second MFS application region 8192 @ 183182400 ( 4.0M)
13: MFS Second MFS media region 156293120 @ 64 ( 74.5G)
14: MFS New MFS Application 1024 @ 183190592
15: MFS New MFS Media 441942016 @ 183191616 (210.7G)
16: Apple_Free Extra 8816 @ 625133632 ( 4.3M)

Device block size=512, Number of Blocks=625142448 (298.1G)
DeviceType=0x0, DeviceId=0x0

Your theory certainly sounds feasible--I used Hinsdale verbatim so that sounds like I would have used the -p option (probably "restore -s 127 -xzpi" as you suggested above.
Does it make sense that the drive worked fine in the S1 for several years with the "Series 2/Optimized" partition layout? If WinMFS gave me a non-byteswapped bootpage, I wonder why we can't just switch back to the other boot partition--did it screw up both copies? 

BTW, is WinMFS still maintained by spike? Maybe he can change this so other folks don't hit this issue in the future...

This S1 has a lifetime subscription, so it's definitely worth getting it working again. Saving the recordings will be a big plus, but if it doesn't work, I'll be happy just getting it going.

Thanks again for the help...


----------



## unitron (Apr 28, 2006)

> Does it make sense that the drive worked fine in the S1 for several years with the "Series 2/Optimized" partition layout?


When the TiVo goes to write something to a particular partition it looks at the partition map to see where that partition starts, so an S1 can function with the S2 partition layout and vise versa, but having the wrong one can cause other problems, like the 500GB drive I put in an S2 without having used the -p option (being at that time accustomed to avoiding it when working on S1s), which worked, but I couldn't make a backup of it, or in your case, a utiility that made a mistake about which platform because it was misled.



> If WinMFS gave me a non-byteswapped bootpage, I wonder why we can't just switch back to the other boot partition--did it screw up both copies?


It didn't do anything to any of the partitions, it did it to the part before the first partition. It wrote it non-byteswapped. TiVo 1s have a CPU that requires byte-swapping because they load them into the CPU in reverse of the way that x86-type CPUs and the S2 and later CPUs do it, so they (S1s) can't read non-byte-swapped.



> BTW, is WinMFS still maintained by spike? Maybe he can change this so other folks don't hit this issue in the future...


I think spike is mostly spending his time on other things these days, perhaps something foolish like actually making a living, so I wouldn't hold out hope for the program to be changed to protect just people who've already upgraded and done it, shall we say, less than exactly right.

I need to know what else you have around there in the way of spare hard drives, brand, model number, and size.

I'm going to do some experimenting here to see if I can replicate your problem so as to test my ideas on how to solve it. Might not happen instantaneously.


----------



## sskraly (Dec 11, 2002)

Thanks for the further explanations...makes a lot of sense now...

I have a 320GB Maxtor EIDE and a 320GB WD SATA (could potentially use with a Rosewill SATA->IDE adapter) but will try the Maxtor first as the WD has some other data on it.

Just to confirm that the rest of the box is working, what exact params should I use to restore the Philips image to one of these other drives and get the box back to life before trying to salvage the recordings:

Using MFSLive1.4:

restore -s 127 <what else> hdr112.tbk
copykern 
<anything else?>

Thanks!


----------



## unitron (Apr 28, 2006)

sskraly said:


> Thanks for the further explanations...makes a lot of sense now...
> 
> I have a 320GB Maxtor EIDE and a 320GB WD SATA (could potentially use with a Rosewill SATA->IDE adapter) but will try the Maxtor first as the WD has some other data on it.
> 
> ...


Before you do anything, I need the model number of the 320GB in the TiVo, the model number of the Maxtor and the model number of the SATA WD.

And do you already have the Rosewill adapter and what's the model number of it?


----------



## sskraly (Dec 11, 2002)

In the Tivo: WD3200AAJB
Maxtor 320GB: 5A320Jo
WD 320GB SATA: WD3200JD

Rosewill RC-A-SATA-IDE Adapter: ordered from NewEgg couple of days ago when I thought I might be starting with a new drive; should have it this week.


----------



## unitron (Apr 28, 2006)

sskraly said:


> In the Tivo: WD3200AAJB
> Maxtor 320GB: 5A320Jo
> WD 320GB SATA: WD3200JD
> 
> Rosewill RC-A-SATA-IDE Adapter: ordered from NewEgg couple of days ago when I thought I might be starting with a new drive; should have it this week.


Okay, sit tight while I do some math.


----------



## lillevig (Dec 7, 2010)

sskraly said:


> Thanks for the further explanations...makes a lot of sense now...
> 
> I have a 320GB Maxtor EIDE and a 320GB WD SATA (could potentially use with a Rosewill SATA->IDE adapter) but will try the Maxtor first as the WD has some other data on it.
> 
> ...


You can't use a tbk file with MFSTools. I created a bak version of the image and sent you a PM.


----------



## unitron (Apr 28, 2006)

lillevig said:


> You can't use a tbk file with MFSTools. I created a bak version of the image and sent you a PM.


Apparently MFS Live (and its predecessor, MFS Tools, which is what he probably originally used with the Hinsdale how-to) sometimes leaves some unused space on the end of the drive when it expands, and WinMFS has figured out how not to.

Which is why he has an Apple Free partition.

What I'm thinking is to figure out how to put your image (either) on one of his spare drives, doing so with an S1 partition layout, and juggling the swap partiton size so as to have the expanded MFS partitions be the exact same size as what he has now and then copying over the MFS partitions from his currently screwed drive to see if we can save his recordings.

Were your images made before or after running copykern on the drive from which they were made?


----------



## unitron (Apr 28, 2006)

sskraly said:


> In the Tivo: WD3200AAJB
> Maxtor 320GB: 5A320Jo
> WD 320GB SATA: WD3200JD
> 
> Rosewill RC-A-SATA-IDE Adapter: ordered from NewEgg couple of days ago when I thought I might be starting with a new drive; should have it this week.


For the time being restore lillevig's image (either one, just use WinMFS for the .tbk, or MFS Live for the .bak) to the Maxtor, without expanding, and test it in the TiVo to make sure that the software on the AAJB is the only problem.


----------



## lillevig (Dec 7, 2010)

unitron said:


> Apparently MFS Live (and its predecessor, MFS Tools, which is what he probably originally used with the Hinsdale how-to) sometimes leaves some unused space on the end of the drive when it expands, and WinMFS has figured out how not to.
> 
> Which is why he has an Apple Free partition.
> 
> ...


I've seen WinMFS leave an Apple Free partition on a drive that wasn't expanded. Not sure what that means but the Tivo still thought it was a smaller drive.


----------



## lillevig (Dec 7, 2010)

unitron said:


> For the time being restore lillevig's image (either one, just use WinMFS for the .tbk, or MFS Live for the .bak) to the Maxtor, without expanding, and test it in the TiVo to make sure that the software on the AAJB is the only problem.


I sent the bak file untested (I told him so in the PM) and now I am having problems getting it to restore to a drive. The file I sent was a truncated backup but I have also tried doing a full backup and restore. Same issue, it finds some sort of error in the "backup stream" at different places for each backup file. I tried another truncated backup and it failed at a different place than the first truncated backup. I know the WinMFS version works.


----------



## lillevig (Dec 7, 2010)

unitron said:


> Were your images made before or after running copykern on the drive from which they were made?


I didn't do copykern.


----------



## unitron (Apr 28, 2006)

lillevig said:


> I've seen WinMFS leave an Apple Free partition on a drive that wasn't expanded. Not sure what that means but the Tivo still thought it was a smaller drive.


If you don't expand, and there's room on the end of the drive, there will be an Apple Free partition the size of the extra space, that's just the way the Apple Partition Map works.

It's when you do expand, at least on up to 1TB drives, that WinMFS will use all of the space but MFS Live will sometimes leave a little unused.


----------



## unitron (Apr 28, 2006)

lillevig said:


> I didn't do copykern.


Okay, I'll restore the WinMFS version to a drive and patch, and then make .tbk and .bak backups of that, and get them online somewhere.


----------



## sskraly (Dec 11, 2002)

I'll just use WinMFS to restore the .tbk. Is this just the File->Restore->Tivo Drive... option (as opposed to Restore->Kernel)? If it prompts for swap size, do I choose 127MB to match my old drive? 

I don't need to do copykern yet since we're not expanding the drive yet, right? 

Anything else needed aside from the Restore before I can try putting it into the Tivo?

For bonus points: assuming we can eventually restore recordings to the Maxtor, is there any way to then restore back to the WD? The WD drive is much quieter than the Maxtor but it has slightly fewer blocks (625M vs. 632M) so I'm guessing it might be a problem to try to go back from the Maxtor to the WD. If not, no problem--I'll be grateful just to get this beast working again.

Thanks,
Sam


----------



## unitron (Apr 28, 2006)

sskraly said:


> I'll just use WinMFS to restore the .tbk. Is this just the File->Restore->Tivo Drive... option (as opposed to Restore->Kernel)? If it prompts for swap size, do I choose 127MB to match my old drive?
> 
> I don't need to do copykern yet since we're not expanding the drive yet, right?
> 
> ...


We're only putting it on the Maxtor 'cause your SATA WD has stuff on it, and we're only putting the original image on, and not expanding, 'cause we want to test everything else about the TiVo besides the drive. Don't record anything on the Maxtor you want to save unless you're going to do so by copying it to VCR.

When you restore the image to the Maxtor, the software and the TiVo should think it's a 13GB drive.

If not, we'll have to run copykern on it, but try it first.

Hook the Maxtor to the computer, boot and start WinMFS, select drive, then File, restore (If there is a word after restore that word should only be image or backup, not kernel or bootpage) (which just gave me an idea, more about that later)

When the restore dialog box pops up, accept whatever swap default it offers, make sure it's set to NOT use the "optimized" partition layout, and point it at wherever you've got that .tbk file stored.


----------



## sskraly (Dec 11, 2002)

IT'S ALIVE! Restored to Maxtor, accepted 128MB default swap, declined offer to Expand, put it back in the Tivo and it boots to Guided Setup!

It turns out that the WD 320GB SATA has exactly the same # of blocks as the WD EIDE, and they are both MUCH quieter than the Maxtor, so I'm thinking I will copy the data off the WD SATA and use it instead of the Maxtor, keeping the Maxtor as an unexpanded backup for the future. WinMFS can select the WD SATA using a SATA->IDE adapter (as long as I select "Show mounted drives" since Windows automatically assigns it a drive letter).

I think these are the next steps; let me know if this sounds right:

- Restore and Expand the tbk file to the WD SATA (Will WinMFS fix the bootpage, etc. as needed due to the fact that this was a Windows drive and automatically got a drive letter, or does the Restore just rewrite everything so that it won't matter that this was a Windows drive?)
- Copy recordings from WD EIDE to WD SATA (reply back with commands to do this when you get a chance)
- Confirm WD SATA works in the Tivo

If this all works, what's the right way to copy the WD SATA image (preserving recordings) back to the WD EIDE and hopefully repair the partition table and OS? Presumably this means going back to MFStools, but what's the exact syntax needed to avoid the problems I had previously and get the right swap size, etc.

Thanks again for all the help--it's awesome to revive this old box!


----------



## unitron (Apr 28, 2006)

sskraly said:


> IT'S ALIVE! Restored to Maxtor, accepted 128MB default swap, declined offer to Expand, put it back in the Tivo and it boots to Guided Setup!
> 
> It turns out that the WD 320GB SATA has exactly the same # of blocks as the WD EIDE, and they are both MUCH quieter than the Maxtor, so I'm thinking I will copy the data off the WD SATA and use it instead of the Maxtor, keeping the Maxtor as an unexpanded backup for the future. WinMFS can select the WD SATA using a SATA->IDE adapter (as long as I select "Show mounted drives" since Windows automatically assigns it a drive letter).
> 
> ...


Restore will overwrite *everything* on the target drive.

Go ahead and find some room somewhere else to copy off everything on the SATA WD so that we have it and the Maxtor to play with.

Or, if necessary, you can format the Maxtor with Windows and copy everything from the SATA WD to it.

Do you know how to run copykern yet? (I lose track of who I talked to about what, but if I told you I included instructions about mounting the copykern cd to cdrom before running copykern).

Once you have the SATA WD free and available, we want to try to do a restore and expand on it that results in all of the partitions (except #8, the swap) being the exact same size as the ones (#1-15, except 8) on the current "problem" drive, as you listed here:

http://www.tivocommunity.com/tivo-vb/showthread.php?p=8892361#post8892361

The goal is for partitions 10-15 to be the same size.

10-13 should be automatically, it's 14 and 15, the ones added by expansion, that'll be tricky.

WinMFS and MFS Live seem to create that extra MFS pair slightly differently when it comes to figuring out the size, so we may eventually have to do this with MFS Live, but for now...

Use WinMFS and restore that image to the SATA WD once the stuff on it has been safely backed up.

Only this time, specify a swap of 131.

That's the original 127 plus the 4 MB Apple Free partition extra space that MFS Live or MFS Tools left when you upgraded to the PATA WD.

And, of course, do not let it use the "optimized" partition layout.

Also this time, when it asks if you want to expand, say yes and let it do so.

Then compare the sizes of the partitions 14 and 15 which it just added to 14 and 15 on your previous partition map.

(you'll notice that the number after--to the right of-- the @, which is the number of the location where the partition starts, will be different for everything except partition 1, because we aren't making the mistake of using the "optimized" layout. That won't be a problem for what I have in mind)

Don't go by the number in parentheses on the right, use the number to the left of the @, just after the partition name.

If they aren't the same, do it again, changing the swap size up or down by 1. If the new one (it'll probably be 15, 14 will probably be the same) is bigger than the map in post 8, do the whole process again, but increase the swap size from 131 to 132. If it's smaller, decrease it to 130.

As I said, the idea is to get all of the partitions except the swap and any leftover space the exact same size as the original.

Once we get that done, if this works, we can talk about using dd_rescue on the MFS Live cd to copy partition to partition. Which only works if they're the same size, and the same size as specified in their respective partition maps.


----------



## sskraly (Dec 11, 2002)

OK, I've got the data I need off the WD SATA so I can use it for the Tivo. 

One crazy question first: now that I can create a good drive with no recordings, is there any way to copy the OS partitions back to the "problem" WD EIDE drive rather than trying to copy the recordings to the new WD SATA drive?

I have MFSLive latest version--would that be the better way to do the restore rather than WinMFS? If so, what syntax would I use for the restore?

Assuming I get the partitions to match as you describe above using either WinMFS or MFSLive, what syntax for dd_rescue did you have in mind? I tried reading the man page and saw there are a lot of options as well as mixed opinions on how to set things like the -b option, etc.

Thanks!


----------



## unitron (Apr 28, 2006)

sskraly said:


> OK, I've got the data I need off the WD SATA so I can use it for the Tivo.
> 
> One crazy question first: now that I can create a good drive with no recordings, is there any way to copy the OS partitions back to the "problem" WD EIDE drive rather than trying to copy the recordings to the new WD SATA drive?
> 
> ...


The problem drive is the one with the non-Series 1 partition layout that got you into trouble in the first place.

Do not write to it at all until we get the SATA drive working right, if we do (you had a problem before it got a non-byte swapped bootpage written to it, remember?).

If we get the SATA WD squared away, with all your shows intact and everything, then we can clone it back on top of the original PATA/IDE WD.

In the meantime, you need to get the image onto the SATA drive and do it as many times as it takes to make the partitions the same size as the ones in the map you copied and pasted.

Then you put the Rosewill adapter on it and hook it to the TiVo and make sure it boots there okay.

If it does, and wants to do guided setup, or says something about error 51, that's good enough, pull the AC plug at that point.

Then report back and in the meantime I'll try to figure out or remember how to copy partition to partition when byte-swapping is involved if I can keep enough of my own hardware running long enough to do so.

It may be as simple as choosing one of the non-default boot options from the MFS Live cd, but I don't remember if I don't remember, or if I never knew in the first place.

The actual commands will be fairly simple, something like

dd_rescue sourcepartition1 targetpartition1

only linux-ier than that.

You'll just be telling it take partition "x" on the source drive and write it to the area where partition "x" is on the target drive (which is why they have to be exactly the same size--except for the swap, where nothing permanent was kept).


----------



## sskraly (Dec 11, 2002)

OK, I did a WinMFS restore/expand to the WD SATA with swap=131, and it only created partitions 10-13 and 11 isn't even the same size as my old 11. Now that I think about it, I think I did two expansions over the life of this old box which presumably created those other partitions...is there any way to replicate that now on the new drive?

Here's the Partition Table for the WD SATA now:

Partition Maps
#: type name length base ( size )
1 Apple_partition_map Apple [email protected] ( 31.5K)
2 Image Bootstrap 1 [email protected] ( 2.0M)
3 Image Kernel 1 [email protected] ( 2.0M)
4 Ext2 Root 1 [email protected] ( 128.0M)
5 Image Bootstrap 2 [email protected] ( 2.0M)
6 Image Kernel 2 [email protected] ( 2.0M)
7 Ext2 Root 2 [email protected] ( 128.0M)
8 Swap Linux swap [email protected] ( 131.0M)
9 Ext2 /var [email protected] ( 128.0M)
10 MFS MFS application region [email protected] ( 512.0M)
11 MFS MFS media region [email protected] ( 11.8G)
12 MFS MFS App by Winmfs [email protected] ( 1.0M)
13 MFS MFS Media by Winmfs [email protected] ( 285.3G)

Total SA SD Hours: 332	Total DTV SD Hours: 290	100 % Free
Software: 3.0-01-1-000	Tivo Model: not set in MFS

Thoughts?

Thanks...


----------



## lillevig (Dec 7, 2010)

sskraly said:


> OK, I did a WinMFS restore/expand to the WD SATA with swap=131, and it only created partitions 10-13 and 11 isn't even the same size as my old 11. Now that I think about it, I think I did two expansions over the life of this old box which presumably created those other partitions...is there any way to replicate that now on the new drive?
> 
> Here's the Partition Table for the WD SATA now:
> 
> ...


I'm assuming that you don't have your SATA to IDE adapter yet for the Tivo, otherwise I'd say just stick it in the box and see if it flys. If it flys, then you can see if you got the correct number of expanded hours for the drive size. It looks like you have it correctly expanded since WinMFS added partition 13 for media.


----------



## unitron (Apr 28, 2006)

sskraly said:


> OK, I did a WinMFS restore/expand to the WD SATA with swap=131, and it only created partitions 10-13 and 11 isn't even the same size as my old 11. Now that I think about it, I think I did two expansions over the life of this old box which presumably created those other partitions...is there any way to replicate that now on the new drive?
> 
> Here's the Partition Table for the WD SATA now:
> 
> ...


You see where it says partition 11 starts @64?

That's not a Series 1 partition layout. Which is how we got in this mess.

On a Series 1 layout, partition 1, the Apple Partition Map, starts @ block 1 and it's 63 blocks long, so it takes up blocks 1 through 63, and partition 2, the Image Bootstrap 1, starts at block 64, and all of the partitions follow each other on the drive in the order of their numbering--3 comes right after 2, 4 comes right after 3, etc.

On a Series 2 layout, which is what you've gotten both times so far, partition 11 (one of the two media partitions on an S2 or later stock drive) starts at block 64 so as to be near the outer edge, with 13, the other media partition, at the end of the stock drive near the center or hub of the platters, so that the operating system part is in the center of the drive and the heads are only half way away from either media partition for quicker access.

I've got that same .tbk image.

Let me pull my S1 Philips out of service and do some experimenting with some spare drives and both WinMFS and MFS Live, and see if I can figure out what size drive you used in between the original 13GB Quantum and the 320GB WD to come up with those particular sizes (on your PATA/IDE WD) for partitions 12 and 13.


----------



## sskraly (Dec 11, 2002)

FYI, I put the SATA->IDE adapter on the drive and it boots up fine to Guided Setup (without ever having run copykern)! Maybe WinMFS takes care of LBA48 support automatically?

BTW, I'm running MFSLive and WinMFS on a Lenovo T400 laptop. Its Windows drive is coming up as sda, my Tivo drives via an IDE->USB adapter come up as sdb, 2nd USB port comes up as sdc, but I can't figure out what the CD Drive is. I've tried mounting via hda/b/c/d, sdd and none are recognized, so that's when I decided to punt copykern and just see if the drive would work as is since WinMFS release notes mention LBA48 support.


----------



## sskraly (Dec 11, 2002)

Also, my guess is the first expansion was probably an 80GB or 120GB drive, but it was probably 5+ years ago, so can't be sure, but you might want to try those first.


----------



## unitron (Apr 28, 2006)

sskraly said:


> FYI, I put the SATA->IDE adapter on the drive and it boots up fine to Guided Setup (without ever having run copykern)! Maybe WinMFS takes care of LBA48 support automatically?


No. It doesn't.

I'll make patched .bak and .tbk images and put them online somewhere, just not in the next five minutes.



sskraly said:


> BTW, I'm running MFSLive and WinMFS on a Lenovo T400 laptop. Its Windows drive is coming up as sda, my Tivo drives via an IDE->USB adapter come up as sdb, 2nd USB port comes up as sdc, but I can't figure out what the CD Drive is. I've tried mounting via hda/b/c/d, sdd and none are recognized, so that's when I decided to punt copykern and just see if the drive would work as is since WinMFS release notes mention LBA48 support.


Googling suggests the cd or dvd drive or whatever else is in cd drive's ultrabay slot should show up as /dev/hda, though perhaps it needs a disc in it.

Can you set the laptop to boot from the optical drive?

If so, boot with MFS Live cd.

try

pdisk -l

(that's a lowercase L)

it should report not finding TiVo partitions on the non-TiVo hard drives and choke on trying to read cd drive, so whatever shows in the error message should be cd drive.

Then try

mount -t iso9660 /dev/hda /cdrom

then

ls /cdrom

(that's lowercase LS, means list)

and see if you get a bunch of file and directory listings.

If so, that's also what you'd need to do after booting with PVRupgrade cd with copykern on it before running copykern, but, as I say, I'll make patched images and get them online "sometime this weekend".


----------



## unitron (Apr 28, 2006)

sskraly said:


> Also, my guess is the first expansion was probably an 80GB or 120GB drive, but it was probably 5+ years ago, so can't be sure, but you might want to try those first.


Considering your original partition 11 11.8G and partition 13 74.5G, I'm wondering if you used the world's only 90GB drive. Perhaps a 100GB.


----------



## sskraly (Dec 11, 2002)

The original (WD EIDE) Partition table was: 

Partition map (with 512 byte blocks) on '/dev/sdb'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1 
2: Image Bootstrap 1 4096 @ 181070912 ( 2.0M)
3: Image Kernel 1 4096 @ 181075008 ( 2.0M)
4: Ext2 Root 1 262144 @ 181079104 (128.0M)
5: Image Bootstrap 2 4096 @ 181341248 ( 2.0M)
6: Image Kernel 2 4096 @ 181345344 ( 2.0M)
7: Ext2 Root 2 262144 @ 181349440 (128.0M)
8: Swap Linux swap 260096 @ 181611584 (127.0M)
9: Ext2 /var 262144 @ 181871680 (128.0M)
10: MFS MFS application region 1048576 @ 182133824 (512.0M)
11: MFS MFS media region 24777728 @ 156293184 ( 11.8G)
12: MFS Second MFS application region 8192 @ 183182400 ( 4.0M)
13: MFS Second MFS media region 156293120 @ 64 ( 74.5G)
14: MFS New MFS Application 1024 @ 183190592
15: MFS New MFS Media 441942016 @ 183191616 (210.7G)
16: Apple_Free Extra 8816 @ 625133632 ( 4.3M)

Why are you adding sizes of partitions 11 and 13, rather than 12 and 13?
I thought partitions 10 and 11 were related to the original 13GB drive? Then, 12 and 13 add up to 78.5G so that seems to match my vague memory that I used an 80GB drive for the first expansion many years ago. Then, I used the WD EIDE to do a second expansion a couple years ago to get partitions 14 and 15. 

BTW, why is WinMFS creating an "optimized" partition layout? All we did was restore and expand from a 13GB Series1 *.tbk file. Shouldn't it have known it was an S1 image and used non-optimized? I never saw an option anywhere in WinMFS relating to enable/disabling optimized partition--where is that?

Thanks...


----------



## sskraly (Dec 11, 2002)

Still can't figure out how to mount the MFSLive CD to do the copykern. I tried booting from an external CD drive (also attached via USB) and it seems like it is assigning it to sr1 according to the message when I plug it in. Is that possible (maybe "sr" is "scsi removable"?) Maybe MFSLive's Linux doesn't recognize this device name?

Anyway, I'll probably try another computer to do the copykern unless anyone has any ideas...


----------



## unitron (Apr 28, 2006)

sskraly said:


> The original (WD EIDE) Partition table was:
> 
> Partition map (with 512 byte blocks) on '/dev/sdb'
> #: type name length base ( size )
> ...


The original 13GB Quantum should have had a single MFS pair, 10 and 11.

The first expansion should have added 12 and 13.

11 and 13 are the big ones, so I added them in my head to get a rough idea of how much space was available the first time you expanded.

Remember, that first upgrade drive had to hold all 13GB of the original drive, plus whatever 12 and 13 add up to.

At 11.8GB, 11 is most of that original 13GB drive right there, and when you add 13 at 74.5GB that's 86.3GB, and I think even on the slightly bigger than everybody else's Maxtor drives like were used in the single tuner S2s, that's over the limit for an 80GB drive. I've got a TCD24008A Maxtor 80GB drive, I'll take a look at it's pmap.

It might not be entirely impossible that if you originally used the Hinsdale instructions semi-blindly, you put in something while going from that Quantum straight to the current IDE WD that caused it to do the upgrade as adding 2 MFS pairs instead of one, maybe something to do with keeping it under 137GB for an unpatched S1, or maybe something else.

When you click on File, restore, and it brings up a screen in front of the screen to let you tell it what .tbk file to use, it also has a little box for swap size and a checkbox to either check for an S1 layout or to uncheck to avoid an S2 layout.

(I realize the last thing you want to do right now is be patient while I further my education on all of this . )


----------



## unitron (Apr 28, 2006)

sskraly said:


> Still can't figure out how to mount the MFSLive CD to do the copykern. I tried booting from an external CD drive (also attached via USB) and it seems like it is assigning it to sr1 according to the message when I plug it in. Is that possible (maybe "sr" is "scsi removable"?) Maybe MFSLive's Linux doesn't recognize this device name?
> 
> Anyway, I'll probably try another computer to do the copykern unless anyone has any ideas...


Do you have this cd?

http://www.dvrupgrade.com/dvr/stores/1/downloads/BOOTCD/ptvlba48-4.04.iso.zip

Can you stick it in the laptop's cd drive and boot from it?


----------



## sskraly (Dec 11, 2002)

Yes, I booted from that CD and it works fine except that I can't seem to mount the CD drive. The boot messages show the Tivo drive as sdb (it's attached via a USB->IDE adapter), the internal CD as sr0 and I also tried an external CD which comes up as sr1.

However, 

mount -t iso9660 /dev/sr1 /cdrom 

says

"mounting /dev/sr1 on /cdrom failed"

with no further explanation (same error on sr0).


----------



## unitron (Apr 28, 2006)

sskraly said:


> Yes, I booted from that CD and it works fine except that I can't seem to mount the CD drive. The boot messages show the Tivo drive as sdb (it's attached via a USB->IDE adapter), the internal CD as sr0 and I also tried an external CD which comes up as sr1.
> 
> However,
> 
> ...


Have you tried booting with it and then

mount -t iso9660 /dev/hda /cdrom

?


----------



## sskraly (Dec 11, 2002)

It looks like the dvrupgrade.com boot CD doesn't have the drivers to recognize some of these usb-attached devices. Also, I noticed that copykern only has options for hdb - hde, so it requires the Tivo drive to be attached via direct IDE. I moved to a different computer, hooked up to an IDE cable, and was able to run copykern successfully.

So now my WD SATA works fine in the Tivo--ran through Guided Setup and I have full expanded recording capacity available, but of course, no recordings.

If you can figure out any other way to salvage the recordings from my old drive, let me know (either matching the partition layout and dd_rescue, or some other method). 

At least the box is alive again!

Thanks...


----------



## unitron (Apr 28, 2006)

sskraly said:


> It looks like the dvrupgrade.com boot CD doesn't have the drivers to recognize some of these usb-attached devices. Also, I noticed that copykern only has options for hdb - hde, so it requires the Tivo drive to be attached via direct IDE. I moved to a different computer, hooked up to an IDE cable, and was able to run copykern successfully.
> 
> So now my WD SATA works fine in the Tivo--ran through Guided Setup and I have full expanded recording capacity available, but of course, no recordings.
> 
> ...


After a series of various kinds of disasters around here, I finally got lillevig's image restored to a drive, backed up as an MFS Live file, re-restored, this time without the S2 partition layout that it picked up somewhere, patched it with copykern and made both flavors of backup files.

This is the one to restore with the MFS Live cd

http://dl.dropbox.com/u/49887720/13Phil48.bak

and this is the one to restore with WinMFS

Remember to not use the -p option with the restore command on the MFS Live cd and make sure WinMFS is set to not use the "optimized" partition layout.

Either one will boot to Guided Setup.

http://dl.dropbox.com/u/49887720/13Phil48.tbk


----------

