Oct 08 2006

HD repairs

Published by at 3:09 am under iPod 1G,iPod 2G,iPod 3G,iPod 4G,iPod mini

bad folder dead iPod

If these icons turn up on your iPod then there's a change you have a damaged hard drive, but before you rush off and get a replacement take the time to run a few tests, the solution may be quite simple. The following approaches range from bloody obvious to nerdy-uber-geek and are arranged in order of difficulty; the easy ones are first. Start at the top and keep going until you've fixed your hard drive or you loose your nerve.

As stated elsewhere on this site, I am an amateur. My iPod hard drive repair knowledge is drawn from the following sites and personal experience. It may be a load of rubbish, feel free to tell me so.

Reference sites:
mac geekery – partitioning the iPod

mac OS X hints – how to recover from a partitioned iPod
bsodmike.com – upgrade your iPod
mac geekery – fix your dead ipod for free
Apple – iPod support
pdisk for the Mac OS
(my apologies to the PC users, I have a Mac so this is very Mac-centric).

The Five Rs
Apple have a trouble shooting guide they call the five Rs. This stands for reset, retry, restart, reinstall, and restore. The Apple website walks you through each of these step-by-step, if you're having trouble this is a good place to start.

Disk Mode
If you're still having trouble after trying the five Rs check to see if your iPod will go into Disk Mode. This will generally happen automatically when you connect the iPod to a computer; the iPod screen should display the "Do not disconnect" message. If it doesn't you can attempt to force the iPod into Disk Mode by following these instructions from Apple.

If the iPod will enter Disk Mode then attempt to reinstall or restore the iPod software by following Apple's instructions; if that is unsuccessful continue with the next step.

If the iPod wont enter Disk Mode then leave your iPod to charge for at least half an hour and try again. If you still can't enter Disk Mode skip ahead to the "Remove the hard drive" Section.

Erase the hard drive
Some web-sites (including this one form Apple) will tell you to "never erase your iPod's hard drive"
but this is really a misnomer. It is perfectly safe to erase your iPod's drive (off course you will loose any songs or other data you have stored on it).

With a Mac you can do this with the "Disk Utility" application. Put the iPod in Disk Mode, quit iTunes, and launch Disk Utility.

Select the iPod in the Disk Utility side bar. You may see two references to the iPod, if so the top one will refer to the hard drive, and the bottom one to a partition on the hard drive, you should select the top one (it will probably have "Apple iPod Media" in the title).

Click on the "Partition" tab. Select "1 Partition" from the "Volume Scheme" pop-up menu. Select "Free Space" from the "Format" pop-up menu. Click "Partition", Read the warning, then click "Partition" again.

When the partition process has finished disconnect the iPod from the computer. The iPod should restart, display the folder icon, and then shut down.

Re-connect the iPod to the computer and launch iTunes. You should be greeted by a message suggesting that the iPod is corrupt and you may need to restore it, click on the "Restore" button and follow the prompts.

If you're still having problems after going through the restore process then it's time to open up your iPod.

Remove the hard drive
So you hoped it wouldn't come to this. Yes, getting inside an iPod can be a daunting task but with the right tools and a bit of advice it's a snap (in a good way).

The right tool is a guitar pick, the cheaper the better. Here's one stuck in the side of a nano (cheap is good because they usually have a sharp edge).

opening a nano with a guitar pick opening a nano with a guitar pick

I find a thickness of between .6mm and 1mm works best. For details on opening an iPod check out the great guides at iFixit.

Once inside the iPod, disconnect the hard drive from the HD cable and disconnect the HD cable from the motherboard.

In many cases a hard drive error is the result of a loose connector. To check if this is your problem, re-assemble the iPod making sure all connections are firmly seated. Restart the iPod and if necessary attempt a software restore. If the iPod functions normally then you probably had a loose connector.

Test the iPod / hard drive
The next step is to test whether the fault is with your hard drive or some other part of the iPod.

To do this you will need another iPod drive that you know is working. You could take this from any working iPod (but obviously not the nano or the shuffle).

Connect the known working drive to your iPod, if it came from a different iPod model then you may need to restore the iPod software to get it to work.

If your iPod doesn't work with a known working drive installed then obviously it has problems a new drive isn't going to fix. If this is the case you may want to try your iPod's drive in a working iPod to see if it is still functional.

If your iPod works with the new drive then your original drive obviously has issues. If you can get the iPod into Disk Mode then proceed to the next step. If you can't then this is really the end of the line …well almost…

There is one more approach you can take, it's detailed on this web-site. Basically it involves slapping your iPod. It's not generally the best approach when it comes to hard drive repair and you're likely to do more harm than good, but at this point what do you have to loose? Get slappin'.

Change the hard drive partition map
Put on your propeller hat, we're headed for geek land.

If your iPod will go into Disk Mode but you have difficulty accessing it with iTunes or Disk Utility then there may be bad blocks on the drive.

The symptoms for this include:
– can't see iPod with iTunes or Disk Utility
– iTunes or Disk Utility become unresponsive
– iTunes crashes or becomes unresponsive when copying songs to the iPod
– iPod crashes or becomes unresponsive when playing songs

Short of getting a new hard drive your only option here is to try and avoid the bad blocks.

(If you’re attempting this with a latter model iPod take note of Gordon’s helpful comments)

First up you have to make a guess as to where the bad blocks may be. If your iPod is dysfunctional even when empty then any bad blocks will probably be within the first 32 MB of the drive (this is where the iPod software resides). If your iPod starts misbehaving only after you have copied a certain number of songs onto it then the total size of these files will determine the location of the bad blocks. The following steps will assume that the bad blocks are within the first 32 MB of the drive but you can alter them to suit your situation.

Before we proceed let's have a warning: if you make a mistake with this you could ERASE YOUR COMPUTERS MAIN HARD DRIVE – make sure you're backed up.

OK, lets proceed.
If iTunes is running quit it (force quit if necessary).

Launch the "Terminal" application (located in Applications > Utilities). A window will open with something like this in it:

Last login: Sun Nov  5 14:53:26 on console
Welcome to Darwin!
MacBook:~ scottmitchell$

Obviously the details will be different for you.

Set the user to root
– at the $ prompt type: sudo -s
– you should get asked for a password, type your administrator password

Find the iPods disk number
– at the $ prompt type: disktool -l
– (that's a lower case L)
– you should get a list of partitions similar to those shown below:

***Disk Appeared ('disk1s2',Mountpoint = '', fsType = '', volName = '')
***Disk Appeared ('disk1s3',Mountpoint = '', fsType = '', volName = '')
***Disk Appeared ('disk1s1',Mountpoint = '', fsType = '', volName = '')
***Disk Appeared ('disk1',Mountpoint = '', fsType = '', volName = '')
***Disk Appeared ('disk0',Mountpoint = '', fsType = '', volName = '')
***Disk Appeared ('disk0s1',Mountpoint = '', fsType = '', volName = '')
***Disk Appeared ('disk0s2',Mountpoint = '/', fsType = 'hfs', volName = 'Macintosh HD')

– disk0 is usually your computers main drive (as it is above)
– in this example the iPod is at disk1 and has three partitions s1, s2, and s3
– your iPod may be at disk2 or disk3 or etc. so for this example I will use the term diskx, whenever you see diskx you will need to substitute it with your iPod's
own address (disk1, disk2, disk3, etc.)

Unmount the iPod using Terminal
– at the $ prompt type: disktool -u diskx
– you should get this response:

diskx device will be unmounted …
***Notifications Complete for type 1
***Responding yes to unmount – diskxs3
***Disk Unmounted('diskxs3')
***Disk Unmounted('diskx')

Backup your iPod's firmware. You need to do this so that you can copy it back at the end of the partition process.
– at the $ prompt type: dd if=/dev/diskxs2 of=~/iPodfirmware
– you should get this response
(or something similar):

65536+0 records in
65536+0 records out
33554432 bytes transferred in 10.426390 secs (3218221 bytes/sec)

– this makes a copy of the iPod firmware in your home directory

Run pdisk
– at the $ prompt type: pdisk
– you should get this response:

Top level command (? for help):

– type: e
– this puts you in edit mode, you should get this response:

Name of device:

– type: /dev/diskx
– (remember to replace the x with your iPod's drive number)
– you should get this response:

Edit /dev/diskx –
Command (? for help):

Check your iPod's current partition table
– type: p
– you should get this response
(or something similar):

Partition map (with 512 byte blocks) on '/dev/disk1'
#:                type name            length   base     ( size )
1: Apple_partition_map partition map       62 @ 1      
2:          Apple_MDFW firmware         65536 @ 63       ( 32.0M)
3:           Apple_HFS disk          38996912 @ 65600    ( 18.6G)

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

Initialize the iPod
– type: i
– make sure you got the drive number correct or you could be saying good-bye to your main drive. You should get this response:

map already exists
do you want to reinit? [n/y]:

– type: y
– you will get this response (or something similar):

A physical block is 512 bytes:

– press return (this will keep the default value)
– you will get this response (or something similar):

A logical block is 512 bytes: 

– again, press return
– you will get this response (or something similar):

size of 'device' is 39062520 blocks (512 byte blocks):

– again, press return
– you will get this response (or something similar):

new size of 'device' is 39062520 blocks (512 byte blocks)
Command (? for help):

Check the new partition table
– type: p
– you should get this response
(or something similar):

Partition map (with 512 byte blocks) on '/dev/diskx'
#:                type name     length   base     ( size )
1: Apple_partition_map Apple        63 @ 1      
2:          Apple_Free Extra  39062456 @ 64       ( 18.6G)

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

The next step is to make the first partition (the one containing the partition map) big enough so that it includes all of the bad blocks. As can be seen above the first partition normally only takes up 63 blocks (about 32 KB). To bypass the original firmware location we need it to take up at least 65600 blocks.

– type: s
– you should get this response
:

New size:

– type: 65600
– this will place the original firmware blocks within the 1st partition, if your problem is further into the disk then you will need to use a bigger number.

Check the new partition table
– type: p
– you should get this response
(or something similar):

Partition map (with 512 byte blocks) on '/dev/disk1'
#:                type name     length   base     ( size )
1: Apple_partition_map Apple     65600 @ 1        ( 32.0M)
2:          Apple_Free Extra  38996919 @ 65601    ( 18.6G)

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

Create a new firmware partition
– type: C
– (that needs to be a capital C)
– you should get this response
:

First block:

– type: 2p
– you should get this response
:

Length in blocks:

– type: 65536
– you should get this response
:

Name of partition:

– type: firmware
– you should get this response:

Type of partition:

– type: Apple_MDFW

Create a new data partition
– type: C

– (that needs to be a capital C)

– you should get this response
:

First block:

– type: 3p
– you should get this response:

Length in blocks:

– type: 3p
– you should get this response
:

Name of partition:

– type: disk
– you should get this response:

Type of partition:

– type: Apple_HFS

Check the new partition table
– type: p
– you should get this response
(or something similar):

Partition map (with 512 byte blocks) on '/dev/diskx'
#:                type name       length   base     ( size )
1: Apple_partition_map Apple       65600 @ 1        ( 32.0M)
2:          Apple_MDFW firmware    65536 @ 65601    ( 32.0M)
3:           Apple_HFS disk     38931383 @ 131137   ( 18.6G)

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

Write the new partition map
– type: w
– you should get this response
:

Writing the map destroys what was there before. Is that okay? [n/y]:

– type: y
– you should get this response
:

The partition table has been altered!

Quit pdisk
– type: q
– type: q
– (yes twice)
– you should be back at the $ prompt

Copy the firmware back onto the iPod.
– at the $ prompt type: dd if=~/iPodfirmware of=/dev/diskxs2
– you should get this response
(or something similar):

65536+0 records in
65536+0 records out
33554432 bytes transferred in 32.891343 secs (1020160 bytes/sec)

Initialize the iPod data partition
– at the $ prompt type: newfs_hfs -w -v ipod /dev/diskxs3
– you should get this response
(or something similar):

Initialized /dev/rdisk1s3 as a 19 GB HFS Plus volume

And your voyage in the Terminal is now complete, it's time to see if that had any effect. Quit Terminal.

Unplug the iPod from the computer. If your iPod doesn't start up to a standard iPod menu then the procedure probably hasn't been a success; plug the iPod back into the computer and see if iTunes will recognise it. If the only option you get from iTunes is 'Restore' then your iPod doesn't have the correct firmware in the correct place. If your iPod does start up but still has issues you may like to try increasing the number of blocks in the first partition.

If the partition process has been successful and you now have a working iPod then keep in mind that if you ever use iTunes to 'Restore' your iPod all the hard drive partitions will default back to their original values and you will be back were you started from. It should however be safe to use the iTunes 'Update' function because this does not delete data from your iPod (and therefore it probably doesn't mess with the partition blocks).

Note, the iPod may loose its link to the firmware partition if you disconnect the internal battery. If  this happens it will boot to the folder icon. Connecting the iPod to a computer seems to fix this issue.

10 responses so far

10 Responses to “HD repairs”

  1. Matton 01 Sep 2009 at 1:26 am

    I have a 20 GB 3rd gen iPod.

    It thinks that its hard drive has a capacity of 80 MB — that’s megabytes. I’ve opened the iPod and looked, it’s a 20 GB hd. But I can’t convince the iPod of that. I tried the above — editing the size of the device, when asked — but no luck. Any ideas?

    Thanks, Matt

  2. Scotton 02 Sep 2009 at 9:39 am

    Hi Mat,

    that sounds very odd.
    What happens when if you open Disk Utility and look at the iPod from there? How big does it say the drive is?
    What’s the largest single partition that Disk Utility allows you to make?

    Scott

  3. Matton 03 Sep 2009 at 1:17 am

    Partition map (with 512 byte blocks) on ‘/dev/disk1’
    #: type name length base ( size )
    1: Apple_partition_map Apple 63 @ 1
    2: Apple_MDFW firmware 65536 @ 64 ( 32.0M)
    3: Apple_HFS disk 38996920 @ 65600 ( 18.6G)

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

    Command (? for help): w
    Writing the map destroys what was there before. Is that okay? [n/y]: y
    The partition table has been altered!

    Command (? for help): q
    Top level command (? for help): q
    matt-trebelhorns-ibook-g4:~ root# dd if=~/iPodfirmware of=/dev/disk1s2
    65536+0 records in
    65536+0 records out
    33554432 bytes transferred in 36.073982 secs (930156 bytes/sec)
    matt-trebelhorns-ibook-g4:~ root# newfs_hfs -w -v ipod /dev/disk1s3
    Initialized /dev/rdisk1s3 as a 46 MB HFS Plus volume

    Disk Utility sees it as a 77.9 MB disk.

    I tried changing the size of the first partition to something larger than 77.9 MB — I used a size of 200000, or 97 MB — and I got a partition table that looked like this:

    Partition map (with 512 byte blocks) on ‘/dev/disk1’
    #: type name length base ( size )
    1: Apple_partition_map Apple 200000 @ 1 ( 97.7M)
    2: Apple_MDFW firmware 65536 @ 200001 ( 32.0M)
    3: Apple_HFS disk 38796983 @ 265537 ( 18.5G)

    but couldn’t copy the firmware to #2 or initialize #3.

    In the iPod’s “about” interface, it thinks it is an 18.5 GB ipod, with 45.0 MB of space remaining.

    In iTunes, it shows up as having a capacity of 45.9MB, with 1.5 MB used (for “other”) and 44.4 MB available.

    Other than the fact that I manually entered the 20 GB size (numbers matching those in your instructions) it really appears to think that it’s an 80 MB drive.

    I can play music back from the iPod, but not very much!

    It’s got me confused, that’s for sure.
    Thanks,
    Matt

  4. Matton 03 Sep 2009 at 1:44 am

    The above may be unclear — with the 97.7 MB first partition, nothing worked, so I went back to the partition map described at the top of the previous comment.

    I have tried another HD in this iPod, and it worked fine — a 40GB out of a 4G iPod. It was just a quick test, but the iPod recognized it as being a 40 GB drive.

    Matt

  5. Scotton 03 Sep 2009 at 10:08 am

    Matt,

    strange, the first partition map you posted should be right.
    You mention that Disk Utility sees the iPod as 77.9 MB. Does Disk Utility let you partition the drive? If so, what is the largest single partition it will let you put on the iPod?

    Scott

  6. Matton 04 Sep 2009 at 2:06 am

    Disk Utility will let me format the iPod with a single partition of 77.91 MB.
    Matt

  7. Scotton 04 Sep 2009 at 8:52 am

    Maybe it has something to do with jumpers.

    ATA hard drives have jumper settings for limiting drive capacity, this usually limits drive size to under 32 GB although if drives are smaller than 32 GB size can be limited to 2.1 GB – but this is still not the sizes your seeing.

    What’s the drive make and model number?

  8. Matton 05 Sep 2009 at 12:37 am

    It’s a Toshiba MK2004GAL
    Matt

  9. Scotton 10 Sep 2009 at 11:56 am

    I don’t think Toshiba have any software tools for their hard drives but you could try a disk utility from IBM or Maxtor – I’ve heard they work with other manufacturers drives. You may need a Windows PC though, they don’t seem to have Mac versions of their software.

  10. Sidoineon 31 Jul 2017 at 4:45 pm

    In case people are wondering, this worked in 2017 with a 7G iPod Classic (120Go) !

Trackback URI | Comments RSS

Leave a Reply

« iPod nano | Downloads »