Tuesday, May 31, 2011

replacing dead Tivo hard drive

We had a power glitch and the Tivo HD XL stopped working. After looking online, it seemed likely that the hard drive was dead, so I ordered a new Western Digital 1 Gb WD10EVDS hard drive.

Originally, I hoped to salvage all my wife's shows, but it seems like the hard drive is completely dead. When I hooked it up to my computer at first, somehow it killed my computer. Then I tried using an external sata to esata/usb adapter, but it doesn't show up. When I opened the actual hard drive itself, it looks like the read heads are rubbing on the discs. Definitely dead.

Unfortunately that means I can't use a solution like winmfs and all the shows are lost. Instead, I tried InstantCake, which I downloaded for $40 and burned to CD. I found InstantCake kind of difficult to use, which is the main reason I made this page, in case it can help someone else.

I didn't want to use my laptop because I was worried about formatting the hard drive instead of the new Tivo drive. On my desktop I eventually got it to work after trying a few things (I unplugged my windows hard drive before trying). The CD drive worked for me easily after I checked the BIOS to find out it is the primary master (hda). The hard drive took lots of trial and error:
  • using the eSATA external enclosure - I have tons of SATA ports on my mobo. I plugged into one and then checked in the BIOS to see the channel. For some reason, the HD shows up as an IDE channel in the BIOS - not sure why.  No matter which channel I picked, I kept getting the error "unable to open /dev/hd_ for writing"
  • the same external enclosure also has a USB plug, so I tried that. However, the HD doesn't show up in the BIOS when plugged in by USB, so I wasn't sure which channel to pick.
    • Maybe I misunderstood, but I thought the instructions say to choose PATA when using a USB converter. That gave me the same error no matter which channel I picked.
    • It finally worked when I chose SATA and channel 1 (sda). 
The blank hard drive only took ~1 minute to setup.

When I put everything back together, the Tivo started just fine. I thought the InstantCake instructions said to reset everything so I did that and then had troubles. The Tivo hung at the powering on screen. Eventually I unplugged the coax and ethernet and rebooted and it started up just fine. A little troubling that that was needed, but as long as it works, I'm happy.

After that, I just had to call the cable company to get my cablecard reactivated.

Oh yeah, after setting up the Tivo again, I took the HD back out and used WinMFS to create a backup for next time the HD dies. I had to use my XP laptop - it doesn't seem to work on Windows 7.

pigtailing Aluminum wiring

My wife and I just bought our first house in August 2008. Turns out it was built in the 60s and has all aluminum wiring. The seller agreed to get an electrician to add copper pigtails to all the switches and outlets in the house, but he only ended up fixing about 10 of the ~100 in the house.

I got tons of conflicting information from everyone I talked to about whether the Al wiring is really dangerous or not. Tons of people are of the opinion that it's a lot of hype and if nothing has gone wrong in the last 40 years, why worry now? There really doesn't seem to be much info on the web - most info is based on this one Al wiring website, which I suspected was over-hyping the problem.
But in the end, I decided that if/when we sell the house, I would have to pigtail all the switches/receptacles, so I may as well do it immediately. Seems silly to make the house safer for someone I don't know, and not do it for my own family. So I decided to do the job myself slowly over the first winter.

First I had to decide which option to go with:
  1. rewire the whole house with copper wire - the best solution, but way more of a project than I was looking for
  2. Tyco COPALUM crimps -  2nd best solution, but only licensed electricians can do this and it would run ~$5000. It's really just a glorified crimping tool - no way I was going to pay for that.
  3. purple wirenuts - seems to be the most common "fix" and the one that the electrician who fixed 10 of the outlets in the house chose. But there is some information on the web that the purple wirenuts don't work well.
  4. Alumiconn connectors -these are relatively new and I couldn't find a ton of information on them, but they seem much safer than the purple wirenuts and make a lot of sense to me. This is the solution I decided on.
In the end, I bought 100 of the Alumiconn connectors, which set me back about $300 (~$3 each). While I was at it, I also replaced most of the receptacles and switches in the house so that they all match, so it ended up costing a lot more, but still WAY less than paying for the Tyco COPALUM. I'm pretty happy with the Alumiconn connectors and I would recommend them to others.

The reason I wanted to write this up on the web is that I became convinced that pigtailing the Aluminum wires was a VERY good decision and the house was not safe before. Most of the receptacles/switches seemed totally fine, but I found at least 10 that were very disturbing and obviously had heat damage. It was easiest to tell on the white wires - the last cm or so would be blackened. A few showed obvious bubbling like in the picture below.

How to use matlab to convert a picture to 8 colors (for Threadless.com)

A friend of mine wanted to make a t-shirt design for threadless. But one of the recommendations is that the picture only have 8 colors. It wasn't obvious to us how to do that in a photo editing program, so I tried it in matlab, which turned out to be quite easy if you have the image processing toolbox (for the rgb2ind function).
RGB = imread(filename); % read RGB image file
[IND,map]=rgb2ind(RGB,8,'nodither'); % convert to 8 colors
imwrite(IND,map,filename2); % save new reduced color image file
I tried it with and without the 'nodither' option. Most pictures I tried looked better with the dither. See one example below:
original picture with more than 8 colors
8 colors - dither
8 colors - no dither