Wednesday, March 10, 2010

Fix Bad Sectors on ipod hard drive

These are the symptoms:
I get a barely used iPod classic (120 Gbs). I call it “barely used” because it had been taken out of the box and plugged into a computer, but never had it been used before. So I plugged it into my computer and tried to sync it with my stuff. Every time I tried, it would fill up to about 700 songs, then fail on me to the point that itunes froze and I had to disconnect it from the computer. It also made funny noises when it got to that spot. The same would happen if I tried to fill it up with regular files on disc mode. It got to around 3Gbs then fail on me. The funny thing is that after disconnecting and reconnecting it would accept a couple more files, the fail again. I tried everything. I updated itunes, uninstalled it, and messed with the registry. I reset the ipod, rolled back to previous versions--I did a soft reset, a hard reset, a restore. I messed with the utilities, and even did a hard drive test on that white screen you can get to when resetting the ipod.

It was obvious to me that there were corrupt sectors on the hard drive. I did not know just how bad it was, but I decided to keep going. Even though the ipod was pretty much new, the warranty had expired at least a year ago. I was not about to let this go. I am going to describe exactly what I did. I am not saying that this is the best way, or the only way to go about—and trust me, if I had the money I would just buy a new one. So here is a detailed account of what I did. Perhaps, it will help someone out there with a similar problem.

The first thing that is important to note, is that the error was localized at about 3Gbs of information. This was good, because it was close to the beginning of the disc. If it had been on the TOC or another crucial area, I would have been completely done for. Before I continue, I have to make a short stop and mention something. Yes, I did the chkdsk on Windows 7, and I tried to run a few utilities that supposedly flag bad sectors on the ipod. I also tried to partition the ipod. The problem is that ipod was designed as an mp3 player and not as an external hard drive. If you somehow manage to partition your ipod, you will have problems later on when you try to use it. Also, Windows has a hard time reading and modifying the ipod, since it was pretty much created with an itunes interface in mind. So here is what I did. I created two text files (with notepad). One was about 1500 kbs (this is the big file), and the other one was 6kb (this is the small file). I copied these files, each on a different folder. I think I must have created 3000 instances of each file. After doing a restore on the ipod to erase everything, I created a folder on the ipod called “Haystack” (the name is irrelevant). Inside Haystack I started placing the files.





First I did the big ones. Every three thousand files, I created a new folder. I went from Haystack01 all the way to Haystack07 with these 1500kbs files. I did this, until I reached the point with the bad sector. You can tell you are there because the files start uploading really slow, and start marking errors. This is when you switch to the 6kb files. I would create a new folder and start uploading the 6kb files. This takes a while (see creation dates on folders).



Usually the first 20 files go through, then it stops, then it times out. It marks some strange error—source cannot be read, or something like that. Every time it marks an error, tell Windows to skip the files, create a new folder and start again. This took me several folders and lots of files. These files get corrupted, they start showing up in weird characters. Just ignore it. After doing this for a few more folders (each folder containing thousands of these tiny files), you will start noticing that the files start uploading fast and crisp again. Most probably, we’ve gone past the bad sector. This is what happened to me. After passing the bad sector, I kept uploading, the big files again, to give it a “buffer zone”, so as to not have to read these files. You lose some capacity doing this, sure, but when you have a 120 gbs ipod, a few gbs is not really significant.

I tried to sync, and sure enough, I was able to sync all my songs and videos, and had some space left over. That’s it! As long as you don’t ask the ipod to read those text files for anything, you will be fine. The ipod does not need to access these bad sectors, and the rest of the drive works perfectly.
Things to consider: Do not delete these files. These files are necessary because they are occupying the bad sector space. If you delete them, you will just go back to having the ipod trying to write on the bad sectors and quitting on you. Also, DO NOT defragment the drive. Defragmenting is basically reassigning the files to different places on the disc. You want the information to stay put. Therefore, if you defragment your drive, you will destroy all your hard work.



Well, I hope this works for you. It worked for me, and it was the only thing that worked for me. Comments are welcomed.

9 comments:

A said...

Hey, thanks for the write up, my 80gb classic is acting the same way. But when I hit the bad sector, everything transfer at 50-100 kb/s, and then it just stalls on all folders/files, no matter the size. It ten says "Error 0x80070057: The Parameter is oncorrect" and I can only 'try again' or cancel. Now I'm stuck here. Any ideas?

Unknown said...

Just to add to my last comment(forgot to login :P ), I started to transfer the files one by one, the 6kb ones. They take about 10-15 minutes to transfer, unless they time out and require me to skip it. Its about 100 bytes/sec, yikes...

Unknown said...

Yes, it usually is a slow process. (look at the times on my haystack folders). But, in the end, it does write and move to a sector that is not damaged. That is, assuming that it is only a small sector that is damaged on your ipod. Best of luck, and let me know how it turned out.

Unknown said...

Well, its day 3 of this, and its really getting nowhere. If anything, its getting harder and harder to actually send any files, its going at 10-30 bytes per second tops, and often after a few hours, the iPod just disappears from the drive list, or an error appears in which I cannot skip, I can only cancel the transfer. I think I will try until Tuesday, then I will give up and see if I can get it repaired. Currently transferring 621kb of files, ETA is 3 hours....

JL said...

I´ve got a 80gb classic and trying to use this as a last resource. Question: some of these Haystack folders we've transferred are allocated in bad sectors, but some of them are not. Would it be possible to delete some of those that are not in bad sectors to free up space without ruining the process?

PJ said...
This comment has been removed by the author.
Candus Robert said...

Thanks alot :)


Best Computer College in Faisalabad
Computer College in Faisalabad
Computer College Faisalabad

Inside Discovery News said...

Inside Discovery News

Jason Bielenda said...

Just to make things easier when creating the files. I just grabbed a 1600kb file from my documents and copied it to a folder called large on my desktop. Then grabbed a 6kb file off from my documents and copied it to a folder named small on my desktop. I renamed the 1600kb file to Large.txt. Then I renamed the 6kb file to Small.txt. Didn't matter what kind of file it was. My large file was a Visio file and the small one was a Word file.

After I managed to rename the files and had them in individual folders on the desktop, I ran this command from CLI (Command Prompt)

Small Files
c:\users\default\desktop\small>for /L %f in (1,1,3000) do copy Small.txt %fSmall.txt

Large Files
c:\users\default\desktop\large>for /L %f in (1,1,3000) do copy Large.txt %fLarge.txt

This created 3000 copies of each the Small.txt and Large.txt in the respective folders.

Thought this might help. There was no way I was copying one file 3000 times.

Jason