# S2 upgrade gone horribly wrong...help?



## beatenbynuns (Aug 15, 2007)

In what I now regard as an act of lunacy, I tried to upgrade the hard drive in my standalone Series 2 (TCD540040) to a 160 GB Seagate drive. I've actually tried a myriad of things to get it working, including (in order):


Copying the original drive to the new drive using the following methods:
"Hinsdale guide" with MFSTools CD (which, from a little forum searching, I now realize is out-of-date)
MFSLive CD (version 1.3)
Weaknees boot disk
dd_rescue (from a Knoppix disk)

Checking the drive jumpers
Replacing the IDE cable

Each time, when I install the new drive and power up the TiVo, I'm greeted with an endless loop of "Welcome! Powering up...", followed by a reboot (and, of course, wailing and gnashing of teeth by yours truly).

As if that wasn't bad enough, I tried putting the original hard drive back...wanna guess what happened? Yep...another reboot loop...

Has my poor ol' TiVo seen its last "Judge Judy" rerun, or can some of you nice folks help me bring it back to the land of the living (or at least booting)?

Some additional information:

After each copy attempt (except for the dd_rescue attempt), when I ran mfsinfo on the upgraded drive, I got a total of 6 partitions, the first 4 of which matched the original drive. The fifth partition showed a size of zero, and the sixth appeared to contain the remaining drive space. (For what it's worth, the dd_rescue attempt yielded identical results from mfsinfo using the old and new drives.)

I really do appreciate any assistance any of you can offer, and please let me know if I've accidentally omitted any useful details.


----------



## HomeUser (Jan 12, 2003)

Can you post the command that you used?
Did you happen to boot Windows with the original TiVo drive installed?
Can you post the results of cat /proc/partitions on the original drive.

If you have a floppy drive you can use it to xfer the info for posting with your OS
mount /dev/fd0 /mnt/floppy
cat /proc/partitions > /mnt/floppy/TiVoPT.txt
umount /mnt/floppy

I am assuming the drive was working before.


----------



## beatenbynuns (Aug 15, 2007)

HomeUser: Thanks for your quick reply! Answers follow...



HomeUser said:


> Can you post the command that you used?


No problem...just for reference, here's my drive setup:

hda - Original TiVo "A" drive
hdb - Replacement TiVo "A" drive
hdc - CD-ROM (used for boot CDs and such)
hdd - CD-ROM (not used for these procedures)

The commands I used are as follows:


MFSTools and Weaknees boot CD:

```
mfsbackup -f 9999 -so - /dev/hda | mfsrestore -s 127 -r 4 -xzpi - /dev/hdb
```

MFSLive:

```
backup -f 9999 -so - /dev/hda | restore -s 128 -xzpi - /dev/hdb
```

Knoppix:

```
dd_rescue -B 1b -b 2M -A -v /dev/hda /dev/hdb
```




HomeUser said:


> Did you happen to boot Windows with the original TiVo drive installed?


No...although my Windows drive was still in my machine, I disabled it in the BIOS before booting with either TiVo drive attached.



HomeUser said:


> Can you post the results of cat /proc/partitions on the original drive.


But of course...


```
major minor  #blocks  name     rio rmerge rsect ruse wio wmerge wsect wuse running use aveq

  22     0      13292 hdc 81 4222 17472 7920 0 0 0 0 48 228070 10820220
   3     0   40146624 hda 1 3 8 10 0 0 0 0 -3 228340 42264662
   3    64  156290904 hdb 1 3 8 20 0 0 0 0 -3 228300 42264942
```
(Note: I believe the contents of hdb are from the dd_rescue attempt...)



HomeUser said:


> I am assuming the drive was working before.


Basically, yes, although I'd recently been discovering it with a black screen every few days, which was solved by a hard reboot. Since I figured I was living on borrowed time with that drive, I went ahead with the upgrade...looks like my time might've been shorter than I thought!


----------



## ciper (Nov 4, 2004)

Does the kernel log get any new entries while booting? (note- the date will be wrong)
Do you have serial access?


----------



## beatenbynuns (Aug 15, 2007)

ciper said:


> Does the kernel log get any new entries while booting? (note- the date will be wrong)
> Do you have serial access?


Actually, in attempting to check out the kernel log (in the /var directory of the TiVo drive, yes?), I met with another disturbing new discovery: I'm unable to mount either of my drives (old or new). When I do, I get an error message telling me I must specify the filesystem. I've tried telling it vfat and ext3, to no avail, and I've tried it while booting with the Weaknees, MFSTools, and Knoppix CDs (all of which seem to correctly recognize my drives when loading Linux). Is there something I'm missing?

As for serial access, I'm not sure (which I assume means no)...can you elaborate?


----------



## Soapm (May 9, 2007)

Wow, is their stuff on the original drive you just have to keep? Why not Instacake and start from scratch?


----------



## beatenbynuns (Aug 15, 2007)

Soapm said:


> Wow, is their stuff on the original drive you just have to keep? Why not Instacake and start from scratch?


Well, that's certainly my backup plan in the event that the drives aren't salvageable. Since neither drive works, though, I'm starting to fear that more sinister forces might be at work (i.e., power supply or motherboard problem).

I'm not too familiar with Instacake...does it just allow you to put a totally new image on the new drive?


----------



## ciper (Nov 4, 2004)

Hmm, its not an S1 so byte swapping isnt the problem. Isn't partition 4 7 and 9 using ext2? Which CD did you use to try and mount it?


----------



## beatenbynuns (Aug 15, 2007)

ciper said:


> Hmm, its not an S1 so byte swapping isnt the problem. Isn't partition 4 7 and 9 using ext2? Which CD did you use to try and mount it?


Thanks for addressing the byte-swapping issue...I'd seen that mentioned in a few places, but I didn't know when that applied.

I actually tried the mount using all three of the Linux-based CDs (MFSTools, Weaknees, and Knoppix). I'm not sure on the filesystems for the partitions you mention...I tried mounting hda as ext2, as well, but it gave me an error message as well.


----------



## ciper (Nov 4, 2004)

Can you type the command you tried?

mkdir /folder
mount /dev/hda /folder is wrong
mount /dev/hda9 /folder is right


Try a "pdisk -l /dev/hda /dev/hdb"


----------



## HomeUser (Jan 12, 2003)

To mount or see the partitions from Linux you need a modified version of the Linux Apple partition drivers. The PTVUpgrade, WeaKnees and possibly the MFSLive boot CD's have them. then when you show the partitions there should be 12 partitions on the Original drive and 14 of them on the new expanded drive. Then you can mount the var partition and view the log files. 

The backup and restore commands look fine for expanding to a new drive without recordings.

Stick with the MFSLive CD if you can there are several fixes in the MFSTools.


----------



## beatenbynuns (Aug 15, 2007)

ciper said:


> Can you type the command you tried?
> 
> mkdir /folder
> mount /dev/hda /folder is wrong
> mount /dev/hda9 /folder is right


Thanks for the heads-up on mounting the /var partition with hda9...I'd been trying hda and hda1 without success. Unfortunately, I still wasn't able to get anywhere using:


```
mount /dev/hda9 /mnt/tivo
```
(after, of course, making sure that /mnt/tivo existed)



ciper said:


> Try a "pdisk -l /dev/hda /dev/hdb"


Gotcha...here are the results:


```
Partition map (with 512 byte blocks) on '/dev/hda'
 #:                type name                       length   base     ( size )
 1: Apple_partition_map Apple                          63 @ 1       
 2:               Image Bootstrap 1                     1 @ 44161324
 3:               Image Kernel 1                     8192 @ 44161325 (  4.0M)
 4:                Ext2 Root 1                     524288 @ 44169517 (256.0M)
 5:               Image Bootstrap 2                     1 @ 44693805
 6:               Image Kernel 2                     8192 @ 44693806 (  4.0M)
 7:                Ext2 Root 2                     524288 @ 44701998 (256.0M)
 8:                Swap Linux swap                 262144 @ 45226286 (128.0M)
 9:                Ext2 /var                       262144 @ 45488430 (128.0M)
10:                 MFS MFS application region     524288 @ 45750574 (256.0M)
11:                 MFS MFS media region         33494098 @ 46799150 ( 16.0G)
12:                 MFS MFS application region 2   524288 @ 46274862 (256.0M)
13:                 MFS MFS media region 2       44161260 @ 64       ( 21.1G)

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


Partition map (with 512 byte blocks) on '/dev/hdb'
 #:                type name                       length   base     ( size )
 1: Apple_partition_map Apple                          63 @ 1       
 2:               Image Bootstrap 1                     1 @ 44161324
 3:               Image Kernel 1                     8192 @ 44161325 (  4.0M)
 4:                Ext2 Root 1                     524288 @ 44169517 (256.0M)
 5:               Image Bootstrap 2                     1 @ 44693805
 6:               Image Kernel 2                     8192 @ 44693806 (  4.0M)
 7:                Ext2 Root 2                     524288 @ 44701998 (256.0M)
 8:                Swap Linux swap                 262144 @ 45226286 (128.0M)
 9:                Ext2 /var                       262144 @ 45488430 (128.0M)
10:                 MFS MFS application region     524288 @ 45750574 (256.0M)
11:                 MFS MFS media region         33494098 @ 46799150 ( 16.0G)
12:                 MFS MFS application region 2   524288 @ 46274862 (256.0M)
13:                 MFS MFS media region 2       44161260 @ 64       ( 21.1G)

Device block size=512, Number of Blocks=312581808 (149.1G)
DeviceType=0x0, DeviceId=0x0
```
As I may have mentioned, the above is the result of using dd_rescue.



HomeUser said:


> The backup and restore commands look fine for expanding to a new drive without recordings.
> 
> Stick with the MFSLive CD if you can there are several fixes in the MFSTools.


Thanks for the sanity check on the backup and restore commands...I get a little tangled up in all the flags sometimes. Will do on the MFSLive disc, too...I've been mostly using Weaknees to boot, but only 'cause it's rather speedy to come up on my machine.


----------



## ciper (Nov 4, 2004)

What error did mount give you this time?
The partition tables you listed look fine to me. 
Were you on IRC talking to me earlier today?


----------



## HomeUser (Jan 12, 2003)

Suggest that you try the new drive as it is now in the TiVo. Try with jumper set Master Single drive if that does not work try with the jumper set to Cable Select. Then look at the log files in the PC. There is a program called maketivobootable you might play around with it as a last resort.

This sequence of commands should work.
mkdir /mnt/tivo
mount /dev/hda9 /mnt/tivo
Remember Linux is case sensitive.

Different manufactures of drives are picky about how the jumper is set.

As it looks like the software is corrupted you probably will need to restore form a backup image for a Series2 TCD540 TiVo. Search the internet for a download or purchase Instant Cake.


----------



## beatenbynuns (Aug 15, 2007)

ciper said:


> What error did mount give you this time?
> The partition tables you listed look fine to me.
> Were you on IRC talking to me earlier today?


This time, when I tried to mount to /tivo (which I did check to make sure exists) after booting from the MFSLive CD, I got the following error:


```
mount: mounting /dev/hda9 on /tivo failed
```
Helpful, eh? I love cryptic error messages...

In the interest of trying to make progress, I tried something new. I seem to recall some instructions suggesting that the old and new drives be placed on different IDE channels, so I made the following setup changes:

hda - Old TiVo "A" drive
hdb - CD-ROM
hdc - New TiVo "A" drive
hdd - nothing

(This also gave me the advantage of having to check that both drives had their jumpers set to Master, and I didn't have to do any switching when I put the new drive in the TiVo.)

After booting with MFSLive, I tried the following command (basically what I'd posted before, but with the new drive designators):


```
backup -f 9999 -so - /dev/hda | restore -s 128 -xzpi - /dev/hdc
```
The process went along fine and reported that the drive had been expanded by something over 100 hours. Unfortunately, no dice...when I hooked the new drive back up and powered up the TiVo, I was again greeted with a reboot loop. (Thankfully, I'm now so jaded that I no longer screw on the cover, so it was a snap to pull it again.)

As for the IRC thing, I'm not an IRC user, so it must've been a clever impostor (or some poor soul who's also hosed his S2)...


----------



## beatenbynuns (Aug 15, 2007)

HomeUser said:


> Suggest that you try the new drive as it is now in the TiVo. Try with jumper set Master Single drive if that does not work try with the jumper set to Cable Select.


You beat me to it! As you probably saw, I tried it with the jumper set to Master, but I didn't try giving it an IDE channel of its own or the CS option. I'll give those two a shot. Also, in the event that I did unknowingly boot Windows with my drives attached and enabled, I'll try maketivobootable.



HomeUser said:


> As it looks like the software is corrupted you probably will need to restore form a backup image for a Series2 TCD540 TiVo. Search the internet for a download or purchase Instant Cake.


Sounds good...it does indeed sound like I'm near the end of the road on the DIY methods. Instant Cake is starting to sound quite nice (in both senses)...

Thanks to everyone for all your help! I appreciate your time and effort in helping me try to resurrect this thing.


----------



## HomeUser (Jan 12, 2003)

beatenbynuns said:


> You beat me to it! As you probably saw, I tried it with the jumper set to Master, but I didn't try giving it an IDE channel of its own or the CS option. I'll give those two a shot. Also, in the event that I did unknowingly boot Windows with my drives attached and enabled, I'll try maketivobootable.


Probably not just a long shot, current versions of Windows usually you have to do something that causes Windows to access the drive.



beatenbynuns said:


> Sounds good...it does indeed sound like I'm near the end of the road on the DIY methods. Instant Cake is starting to sound quite nice (in both senses)...


 Seems strange that you are not seeing any errors during the backup however.


----------



## beatenbynuns (Aug 15, 2007)

Just as an update, I took HomeUser's advice and tried MakeTiVoBootable on my new drive. Now, rather than rebooting, I just get stuck at a gray screen. This seems like progress, but I'm not sure...thoughts? (It certainly doesn't seem any worse than I was before, anyway...)

One additional detail: I've forgotten whether it happened before or after trying MakeTiVoBootable, but when I ran mfsinfo on my new drive, I noticed that one of my partitions (14, if I remember correctly...I have the output saved on a floppy somewhere) showed a size of 1 MiB, where it had previously showed a size of 0 MiB. This also seemed like a good sign...any insights?


----------



## HomeUser (Jan 12, 2003)

If the TiVo's boot process is getting far enough you might try one of the kick start codes.
http://www.tivocommunity.com/tivo-vb/printthread.php?t=288150&p=3795194

52 or 56 look interesting.


----------



## beatenbynuns (Aug 15, 2007)

HomeUser said:


> If the TiVo's boot process is getting far enough you might try one of the kick start codes.
> http://www.tivocommunity.com/tivo-vb/printthread.php?t=288150&p=3795194
> 
> 52 or 56 look interesting.


Thanks for the tip! Just for grins, I checked it out, but apparently I'm not getting far enough along in the boot process to be able to use it. (That is, the light never turned from green to yellow.) D'oh!

In checking that out, I also noticed that the TiVo's not responding to my remote. I've seen in other posts where this can be a symptom of powering up after disturbing the infamous "Thin White Ribbon Cable", which I don't believe I've done, but it does lead me to ask: Should the remote be able to respond this early in the process, or does it take a while before it should do so? This may help determine the potential "boat anchor" status of my S2...


----------



## beatenbynuns (Aug 15, 2007)

Just to close the loop on this, I went ahead and took the suggestion to get a copy of InstantCake, and I gotta say, it lives up to its name. Within 20 minutes tops, my troubled little TiVo was once again humming away! I'm definitely recommending IC to any of my friends who have TiVo trouble.

Also, I'd like to thank you all again for your time and effort in helping me. I really do appreciate it!


----------



## ciper (Nov 4, 2004)

Instantcake is great and all but a proper backup would have accomplished the same thing and cost 0$.


----------

