Monday, January 19, 2009

How to Fix a Crashed Ipod

Here is how I fixed our 2gig Ipod Nano after there was no hope and even the Apple Technician said there was nothing he could do. The disk seemed corrupted and crashed. Itunes was not able to restore.

  1. Used Linux to write 0s onto the ipod disk.
    dd if=/dev/zero of=/dev/sda
  2. Downloaded Firmware1.1.5 for ipod nano and wrote it onto ipod disk. Here's how to update ipod firmware.
    dd if=Firmware1.1.5 of=/dev/sda
  3. Switch to (by typing) "init 1" to observe drive connecting/reconnecting.
  4. Tried "parted" (gparted) but couldn’t make disk label (zero length partition)
  5. On ipod, went into diagnostic mode (on restart immediately hold Rew + Select) and did Check Flashware. It hung at 0%, but used parted to write disk label while in that state. No luck, but I believe putting the ipod into this state before restarting was the trick that made it writeable again.
  6. Restarted ipod (hold Menu + Select), all the while trying to retry the mklabel command in parted. No luck.
  7. Restarted and forced into disk mode (Noticed that the sync icon is not there anymore in the upper left corner of ipod screen...which is good cause it’s no longer locked and in use...it can be written to.)
  8. When in disk mode with that sync icon off, was able to mklabel and a fat32 primary partition on the full size of the disk.
  9. Go into Windows. In task manager (Ctrl+Shft+Esc) Stop any iPodService.exe and itunes/apple processes. Make sure there is no sync icon showing on the ipod. If there is, reboot the ipod and force into disk mode (on restart immediately hold Play + Select).
  10. Use HP USB Format Tool to format the disk in fat32, giving a volume label of "ipod". It will not be able to format if iPodService.exe is running because the ipod is locked-the sync icon is on.
  11. Now can view empty drive in windows without any errors.
  12. Launched itunes to restore. It kept wanting to restore over and over again. So tried 2006-06-28 Ipod Updater instead. It worked! And after waiting (definitely do not disconnect now-be patient), I could watch the ipod reboot with an apple logo and install progress bar.
  13. Uninstalled the ipod updater and iTunes.
  14. Clear out the "C:\Documents and Settings\username\Local Settings\Temp" folder. Itunes uses stuff in there that could have become corrupt.
  15. Ejected the ipod and/or stop the plugin device. Make sure the ipod says "Ok to Disconnect" before you do.
  16. Restart computer.
  17. Installed fresh itunes. Do not ever click upgrade software again or restore on the ipod. Keep the older, working firmware.
Read More »

How a Computer Works


Electricity + Transistors + 1's & 0's + Compiler = How a computer Works.


Electricity

It all starts with electricity. We have metals -- which are conductive, and woods/ceramics -- which are non-conductive (or insulators). In the late 1940s, scientists figured out how to create semi-conductors which are needed to make a "transistor". Semi-conductors are crystals (non-conductive) grown with impurities such as phosphorus (conductive). By forcing crystals of germanium or silicon to grow with impurities such as boron or phosphorus, the crystals gain entirely different electrical conductive properties. By sandwiching this material between two conductive plates (the emitter and the collector), a transistor is made.

Transistors

The transistor is built to pass electrical current through it and maintain a state. A transistor object allows for current to enter on one side and travel to a "fork in the road" so to speak. If the current is high enough to travel up (> 5 Volts) the collector gate is opened and it is interpreted as ON. Otherwise, if it is less than 5 Volts, it does not open the collector gate and the transistor is interpreted as OFF. If it's ON, then we scientists define that as a "1" bit. If it's OFF, that's a "0" bit.

1's & 0's

Representing Numbers with 1's & 0's:
In order for the computer to communicate to us, it has to be able to represent things. The most basic thing it needs to represent is our math system of digits. Otherwise it can't distinguish between a "3" and a "43". Up above, we mentioned the "1" bit and the "0" bit. Those are the only possible states of a single transistor. It can only either be ON or OFF, a 1 or a 0. Therefore, each transistor can either represent the digit 0 or the digit 1. That's pretty limiting. How do we represent the number "5" if we only have a 0 and 1 to work with?

The answer is, we combine this transistor (which can only have 0 or 1) with another transistor (which can also have 0 or 1). By combining these, we can now represent 4 total combinations of values: 0-0, 0-1, 1-0, 1-1. Think of the first combination as the number 0, the second as the number 1, the third as the number 2, and the fourth as the number 3. Thus, with two transistors you can represent up to the number 3. Ok, that helped a little. How do we represent larger numbers?

The answer again is, we add more transistors together (side by side) and then you can represent more combinations. If you think about it now, you can see that we can represent any number out there by combining these transistors. It might take a lot of them, but that's no problem for our latest technology. We can have millions of them in an inch of space.

The Language Part:
Ok, we've discussed how numbers are represented. To represent letters and text on a screen, a computer program needs to interpret numbers (each stored by transistor states described above) as a letter. For example, the number "83", stored by 7 transistors as the combination "1010011", is interpreted as the letter "S".

Compiler

Assembly language is a low-level way of typing commands that a computer understands. It deals with commands like "PUT 0,F0" which tells the computer to switch bit 15 from 1 to a 0. Given that command to turn one bit ON or OFF, you can see that you can turn a bunch of bits to some combination of 1's & 0's. If a series of bits are switched and left alone, this is called "Saving" something into memory. If you saved the number "3", stored by 2 transistors as the combination "11" somewhere, then anytime you want to recall it you can go to the place you saved it and get it.

Compilers allow programmers to write commands that make more sense than "PUT 0,F0". Maybe you typed the following: "In Excel, do the math operation: 5 minus 5". A compiler that understands that higher level language can do the dirty work of figuring out the equivalent low-level series of commands in assembly language (i.e. the numerous lines like "PUT 0,F0"). The coder doesn't have to know about memory locations in the computer he/she is trying to talk to because the compiler turns it into the machine's assembly language. Coders are lazy. If something needs to be repeated they write a program that will do it automatically next time. Some coders wrote the compilers we use so we don't have to translate English to computer talk each time. It does it for us. Remember, once it's in assembly language, the assembly language is interpretted by the computer processor itself, and the transistor is switched. A high-level computer language, like Java, allows coders to write code like "In Excel, do the math operation: 5 minus 5". This in turn is compiled. The compiler puts it into Assembly Language. And the computer processor interprets the Assembly Language and does the bit (1 or 0) shifting.


Summary:

You know it all. The only mind-boggling part is that this is done a super-grand scale. But when trying to understand computers always remember to see the simplest, most basic example before trying to understand it all. For instance, how does the monitor display what you type? Don't think in terms of "pictures" displayed or "words." But instead imagine that your monitor were blown up the size of a house and you could see a single dot/spec in the letter "t" (say the top most dot). Call that a "pixel". And imagine if in that pixel was a bulb with 8 bulbs inside of it. Just like your car brakelights and turn signal, these different-colored bulbs can display the pixel in one of 8 colors. If you can turn just 1 pixel ON and OFF (controlled by a transistor), imagine the possibilities with millions of them controlled by a computer. All you have to do is save off somewhere how to turn one ON. Then save off somewhere how to turn on all the pixels required for "t". Then, if you want to print "t", it goes and calls it. The effect trickles down and it happens. It's not magic. It's some simple principles applied on a grander (yet micro) scale.

Read More »