# Hard Drive failing - /var/hack disappeared - Can't mount



## hedlit (Mar 1, 2003)

I have a Philips Series 1 HDR 112 upgraded with network card and a 160GB drive. The last time I had to open the box was 5 years ago when I put in the 160GB hard drive. I previously had upgraded to a 40GB hard drive back in 2001.

I would get a new unit and move on with my life except for one thing. I have a lifetime subscription.

The picture and audio of the Live TV buffer have been freezing up very recently. I reboot Tivo and it locks up within an hour. That's a sure sign to me that the hard drive is failing.

After I first noticed it, I tried to use TyTool to get all my shows off of it, but I couldn't connect. So I tried to connect to TivoWebPlus. Also failed.

I telnetted into the machine and found that /var/hack was missing. I presume Tivo had rebooted itself and did some kind of emergency software repair or something.

I pulled the hard drive and plugged it into my PC, just as I vaguely remembered how to do from years and years ago. I followed the Steve Jenkins Newbie guide (xxxx://tivo.stevejenkins.com/network_cd.html), and I pulled out my old CD with the Linux install and MFS Tools and booted.

Following his instructions (because honestly I can't remember this stuff from memory from 5 years ago), I tried to mount partitions 4, 7 and 9.

mkdir /mnt4 [ENTER]
mkdir /mnt7 [ENTER]
mkdir /mnt9 [ENTER]

That went fine. The directories were created. Then I did:

mount /dev/hdc4 /mnt4 [ENTER]
mount /dev/hdc7 /mnt7 [ENTER]
mount /dev/hdc9 /mnt9 [ENTER]

After every mount command, when I hit enter, this was the result:

/dev/hdc4: Success
mount: you must specify the filesystem type

/dev/hdc7: Success
mount: you must specify the filesystem type

/dev/hdc9: Success
mount: you must specify the filesystem type

Following along in the guide, Steve mentions this as a possible error, but says that it will only happen with either partition 4 or partition 7, but not all three. attempting the next step, typing the df command yields this result:

Filesystem 1k-blocks Used Available Use% Mounted on
/def/ram0 15863 9795 6068 62% /

No mention of my CDROM drive and no mention of any of the mounting points I was trying to create.

I did the shift-pgup thing and found some relevant data on my hard drive, if that helps in diagnosing what I'm doing wrong.

hdc: WDC WD1600AAJB-00WRA0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hdc: 268435455 sectors (137439 MB) w/8192KiB Cache, CHS=266305/16/63
Partition check:
hdc:

Any help? I'd like to put TivoFTP back in place on my old hard drive so I can retrieve several weeks worth of TV shows off the drive using TyTool before I lay the old drive to rest and try to put my 5-year old Backup Image (which I have on a CD) onto the new drive (which should be arriving by Thursday or Friday).


----------



## sbourgeo (Nov 10, 2000)

I haven't used the Jenkins bootcd in ages, but is byteswapping enabled with the Linux cdrom you used? That is required to mount an S1 ext2 file system on a PC. The TiVo disk is the secondary master (hdc), so you should be good to go there (the old boot cdroms didn't enable byteswapping for the primary master (hda)).

Do you see anything when you type "pdisk -l /dev/hdc" or "fdisk -l /dev/hdc"?


----------



## hedlit (Mar 1, 2003)

sbourgeo said:


> I haven't used the Jenkins bootcd in ages, but is byteswapping enabled with the Linux cdrom you used? That is required to mount an S1 ext2 file system on a PC. The TiVo disk is the secondary master (hdc), so you should be good to go there (the old boot cdroms didn't enable byteswapping for the primary master (hda)).
> 
> Do you see anything when you type "pdisk -l /dev/hdc" or "fdisk -l /dev/hdc"?


There are two ways to enable byteswapping: swap or dmaswap. With both commands at the boot prompt, I end up with:

VFS: Cannot open root device "" or 03:02
please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 03:02

If it needs byteswapping, then my response at the boot prompt should be:

dmaswap root=??

Where ?? is whatever I should put there. I'm out of my depth, though. What do I put there?

As for pdisk -l /dev/hdc, I get:
pdisk: No valid block 1 on '/dev/hdc'

And for fdisk -l /dev/hdc, I get:
Disk /dev/hdc: 16 heads, 63 sectors, 4161 cylinders
Units = cylinders of 1088 * 512 bytes

Device Boot - Start - End - Blocks - Id - System
<nothing more>

Of course, that's without byteswapping enabled, since I clearly don't know how to get through the boot up with byteswapping enabled.


----------



## unitron (Apr 28, 2006)

If you're going to try to mount partitions, you might want the MFS Live cd, perhaps the v1.3b instead of the current v1.4

and I think you have to do 

-t ext2

or something like that (it's been a while)

MFS Live can handle byte swapping and kernals patched for greater than 137GB drives.

You could try WinMFS and click mfsinfo to find out from which 3 partition set you're booting.

Then use fix bootpage to shift to the other set in hopes the previous software is intact.

If you're booting from 2,3,4, choose option 2 to change to 5,6,7

If already on 5,6,7, choose option 1 to change over to 2,3,4


----------



## sbourgeo (Nov 10, 2000)

hedlit said:


> As for pdisk -l /dev/hdc, I get:
> pdisk: No valid block 1 on '/dev/hdc'
> 
> And for fdisk -l /dev/hdc, I get:
> ...


Yeah, you won't get anything out of "pdisk -l" if byteswap isn't enabled.

I tried burning a Jenkins boot CD from this image (http://tivo.stevejenkins.com/downloads/jenkins.iso) and booting with a drive from a HDR312. The default option at the boot menu has byteswapping enabled and I was able to mount both of the root file systems and the var file system with no issues:

pdisk -l /dev/hdc:


```
Partition map (with 512 byte blocks) on '/dev/hdc'
 #:                type name                     length   base     ( size )
 1: Apple_partition_map Apple                        63 @ 1       
 2:               Image Bootstrap 1                4096 @ 64       (  2.0M)
 3:               Image Kernel 1                   4096 @ 4160     (  2.0M)
 4:                Ext2 Root 1                   262144 @ 8256     (128.0M)
 5:               Image Bootstrap 2                4096 @ 270400   (  2.0M)
 6:               Image Kernel 2                   4096 @ 274496   (  2.0M)
 7:                Ext2 Root 2                   262144 @ 278592   (128.0M)
 8:                Swap Linux swap               131072 @ 540736   ( 64.0M)
 9:                Ext2 /var                     262144 @ 671808   (128.0M)
10:                 MFS MFS application region  1048576 @ 933952   (512.0M)
11:                 MFS MFS media region       56650816 @ 1982528  ( 27.0G)
```
I was also able to mount all three ext2 file systems with the following commands:


```
mount /dev/hdc4 /mnt/c
mount /dev/hdc7 /mnt/d
mount /dev/hdc9 /mnt/e
```
If this doesn't work, I'm guessing that your disk might be beyond repair.


----------



## hedlit (Mar 1, 2003)

And so we learn the lesson [AGAIN!] that things on the internet change. Turns out the boot disk I had from 2008 which I created when I upgraded my hard drive following Steve Jenkins instructions is not the same as the ISO image on his website TODAY. His current instructions are for his current ISO, not for the ISO from 5 years ago (duh!).

I made a new disk, followed his instructions, and everything mounted. WIN!

Until...

I put the drive back into the Tivo, connected via Telnet, and manually launched TivoFTPd. It failed to launch and I got a "Segmentation fault" error.

I didn't have time to fool with it. I had to be somewhere. So I left and came home several hours later. I turned on my TV and discovered that Tivo had once again frozen. I unplugged it, plugged it back in, let it reboot, and then went to my pc to connect via Telnet, only to discover that /var/hack is GONE AGAIN.

Thanks for your help, sbourgeo and unitron. But this drive may be dead beyond all hope of redemption.


----------



## unitron (Apr 28, 2006)

I had no idea that Jenkins was even maintaining the site, much less that he'd updated anything.

I learned a lot from his how-to's when I first started messing with TiVos, some of which I might even half-way remember.


----------



## sbourgeo (Nov 10, 2000)

Which tivoftpd did you use, the one from the Jenkins boot CD? You could try grabbing the power pc version from his site and see if that works properly without a seg fault: http://tivo.stevejenkins.com/downloads/tivoftpd.


----------



## hedlit (Mar 1, 2003)

Well, here's something interesting, in case it ever comes up.

I was keen on trying to save all my TV shows, and I've given up on trying to reinstall the various software in /var/hack. But I remembered that all of that software was there in my Tivo.bak file that I had created back in 2008. So I restored it using my MFS_Tools boot CD, also created in 2008.

(I have so many of these old things, who knows what they all do...)

Put the drive back in my Tivo and *BAM* all my programs are gone, my season passes, my To Do list, everything. Gone. Duh. What did I think would happen?

Anyway, I have moved to a new city since 2008, so I ran the setup routine. Had stuff to do. Went away for a few hours. Came back. Tivo is still running. Not crashing. Not freezing up.

I'm beginning to suspect that going almost a month without watching or deleting my shows was the culprit. The drive was too full. With an empty drive, it runs like a dream.

And now I have a new hard drive on the way, so I'll just install it as a 2nd drive and double my space.

Of course, I don't know how to find all my old shows. If anyone knows of a way to try to recover the lost shows? Not that it matters a whole lot. It's just television, after all.


----------

