Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

One method of skipping bad sectors on an iPod's drive System
I purchesed a 3G iPod (15GB) second-hand for $65, not a bad deal eh? Well, the iPod worked fine until I saw I could not add music past the 10.96GB remaining space mark. I though it was just a formatting error at first, so I wrote zero's and restored, but still the same wall, 10.96GB of drive space I couldn't use. I then looked into that maybe the hard drive was damaged. So I tried partitioning around it using this hint for that, and no cigar. I was so worked up that I decided to try one last resort ... drive therapy.

What is drive therapy you ask? It is when you write (from 1 byte to 10 KB "smaller being better") at time to the disk until the disk starts writing past the bad sector. How in the heck does this work? I have no clue!; but I know it works.

To perform the drive therapy, here's what I did; you can modify this to fit your needs:
  1. Make a new folder on your iPod.

  2. Open TextEdit and start a new document.

  3. Type numbers, i.e. 0 or 1, and save the document to the desktop every 10 lines. Copy and paste helps fill it quickly. Do a Get Info on the document, and stop adding lines when the file size is 4KB. If your iPod hangs in the next step, you may need a smaller file. Just divide each file size by two every four hangs, i.e. 4KB, 2KB, 1KB, 500B, 250B, ect.

  4. Copy the text file to the folder you made earlier and open that folder. Then option-drag your text file to copy it again within that folder.. When you do this from 1 to 1000 times, you may experiance some lag in copying, or a copy window will appear -- this is good. This means that you are making some progress.

    If your iPod hangs, reset it, and then unplug and replug it. You may also want to have Disk Utility running to repair the drive every time you reset. Then continue step four, copying over and over. You may have to copy this small file 500 times (or more depending on the size of your damaged sector). When you belive you have passed the bad sector, try copying a large (100MB to 1GB) file to your iPod. If it copies well, then you're good to go. If not, then repeat step four until it does.

  5. Once you are 100% sure you have passed the bad sector, then do not delete those text files! They are a sort of placeholder for that bad area. You can move the folder, but do not delete it.
That's it; enjoy the extra room. And if you encounter another bad sector along the way, just repeat the process.

It may be time consuming, but now I have access to the other 10GB of my iPod. I am not sure that this will work for everyone, but if it can work for me, maybe this is the solution to bad hard drives that come in the 3G iPods. If you have any questions or you don't understand any part of this hint, just leave a comment and I will gladly answer you question.

[robg adds: I don't see how a restore (which does a reformat along the way) wouldn't fix this problem, but apparently it didn't. So consider this a somewhat off-the-wall last-ditch method to save a damaged hard drive. YMMV.]
    •    
  • Currently 2.29 / 5
  You rated: 1 / 5 (7 votes cast)
 
[33,573 views]  

One method of skipping bad sectors on an iPod's drive | 18 comments | Create New Account
Click here to return to the 'One method of skipping bad sectors on an iPod's drive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One method of skipping bad sectors on an iPod's drive
Authored by: Pedro Estarque on Mar 09, '06 07:50:29AM

There are softwares for isolating bad blocks.
Norton used to do this back in OS 8



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: sjk on Mar 09, '06 10:36:53AM

I've used Media Scanner from Intech's SpeedTools Utilities (the OEM version included with an OWC FireWire drive) to check for bad blocks. It helped me convince Apple to replace a drive with too many errors to repair. I've never tested it on an iPod drive but I don't see any reason it wouldn't work.



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: mike666 on Mar 09, '06 10:39:44AM
Intech Software's SpeedTools has an excellent utility for mapping out bad blocks. The price is steep but that and the other utlities in the package make it a must-have powertool. Some HD vendors bundle an OEM version.

[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: bryanus on Jun 17, '06 07:01:58PM

I tried Media Scanner v1.1 (now at v2.1) and it found a bad block, but when I tried to reassign it, Media Scanner quit immediately. Repeated this a couple times to no avail. Running Disk utility to write Zeros also just hangs when it reaches a bad block.



[ Reply to This | # ]
Fixed by paritioning iPod hard drive!
Authored by: bryanus on Jun 18, '06 12:25:44PM
As a follow up, I gave up on trying to use this method and found a couple links online regarding formatting the iPod into multiple partitions:

http://www.macgeekery.com/node/6
http://www.bsodmike.com/?page_id=13

Using a combination of info from both of these, I was able to render the first 6GBs of my 20GB iPod as allocated for the firmware, and the remaining for music. Took me about 3 hours to figure out how to do this, but once I got the hang of it, it was fairly straightforward and i was able to repeat the procedure several times. At first i used a 4 GB partition for the firmware, but hit some more bad blocks around 5 GBs, so moving it to 6 seems to have solved the trick. I now have a perfectly usable 12+GB ipod and so far have filled it to only 200MBs remaining and no copying/hanging problems. Thanks and Good luck!

[ Reply to This | # ]
Bad blocks can be caused by hardware problems and may not be formatted out
Authored by: S Barman on Mar 09, '06 08:05:00AM

Rob: The reason why a format of the hard disk would not work is that if the disk's bad block is because of a physical defect, formatting will not fix the problem. This is a hardware issue that can only be fixed by changing the drive.

I have a 4G (U2) iPod and have not seen problems. But a friend who has a 3G iPod has had several bad blocks show up on his drive. It may be the age or quality of the drive. It can also be that the drive was bumped during use and the head became too close or even tapped the disk. If the head came too close, it could have also overwritten the servo information, which also makes the blocks useless and not able to format.

The bottom line... it's a hardware thing!

Good luck!



[ Reply to This | # ]
Bad blocks can be caused by hardware problems and may not be formatted out
Authored by: alblue on Mar 09, '06 09:44:46AM

Bad blocks are caused by hardware faults, but that doesn't mean that they're only fixable by hardware means. All hard drives have bad blocks; most operating systems work around bad blocks by having a list of known-bad-blocks that they don't attempt to write on. When you do a low-level format of a disk (e.g. using the 'zero all blocks' of Apple's format) it should hit on every block and discover which the bad ones are (and then mark it as such, and move on).

A format (like a QuickFormat on Windows) doesn't actually touch every byte on disk. It just clears out the indexes that are used to present directories; sort of like having a notepad with a list of scribbled page numbers on the first page; rubbing out numbers on the first page doesn't make the rest of the data disappear, but you also don't find that some of your pages are torn or missing, either).

You might have been able to fix this in Apple's disk utility by formatting with another filesystem (e.g. ext2/Unix) and doing a zero-byte-erase. Then, you do the format with HFS+ (or FAT) and it should have figured out which the bad blocks are by then.

Incidentally, this is why security services never recycle disks, even after they've been formatted/wiped. There's a slim possibility that there may have been data that's written to a 'bad block' and has skipped any wiping attempts, even though some of the information might be recoverable. They all get shredded and destroyed physically ...

The alternative is to place a strategic file over the bad block location, and then not move the block. However, some defrag utilities work by copying files from one place to another, so a defrag will cause this process to fail. But by the sounds of things, the iPod doesn't have track of where the bad blocks are (though I'm surprised that when mounted on the Mac, it doesn't figure it out).

Sometimes, bad block lists become full, and then you start to see these problems. Because there's no more space to store a list of bad blocks, bad blocks will start appearing. That's usually a good time to think about buying a new one anyway ...

BTW a lot of hard drives have logic built in to remap bad blocks, even if the OS doesn't. Probably not on embedded systems like the iPod though.



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: reynhout on Mar 09, '06 11:19:29AM

Just for the record, typing "0s and 1s" (or even numbers at all) can't be important.

The on-disk representation of the file will be functionally similar even if you use MP3 data. In this case, you want to use something that the iPod won't try to do anything special with (so not an MP3), but a 1MB gzip file is just as good as anything else.

Also, does anyone know if Apple makes any attempt to defrag or otherwise manage the filesystem layout on iPods? If so, this hint might break when that management occurs.

In 80s, when disks were less reliable, good ones (SCSI) would store a bad-block map in the first few sectors of a drive. So the disk itself would know which blocks to avoid and the master device wouldn't even have to think about it. I don't know if that's true in newer EIDE drives, and I don't know what how the iPod addresses its drive...but apparently not that way. :-)

Good old fashioned "mess with it til it works" work here.



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: kaih on Mar 09, '06 01:13:16PM

OK, as one poster said, the contents of the file don't matter one bit.

Now, to clear up a misunderstanding about modern drives - all modern hard drives (ATA, SATA, SCSI etc) have a list of bad blocks stored in their firmware. No, you can't access this list. Every drive made has bad sectors. Every drive made has spare capacity so it can automatically remap bad sectors.

What happens is when a drive sees a bad sector, it tries to silently remap that sector to somewhere nearby, in an area reserved for this purpose. This happens without you being told anything. I personally think that the SMART status should indicate that this is happening...

Once you are seeing bad sectors at the higher level, that means that the drive has run out of spare sectors to remap these bad sectors and you're really in trouble. The drive will go pear-shaped in the near future. No, really, it will.

Having said all that, there is a service mode for iPods, which can be found at the following page:
http://www.methodshop.com/mp3/ipodsupport/diagnosticmode/index.shtml

When in diagnostic mode, you can do a hard drive scan, and re-initialise the hard drive - this also has the side-effect of remapping what bad sectors it can

---
k:.



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: tbo on Mar 09, '06 01:59:34PM

Sorry, but that's not quite right. The drive does maintain a set of "spare" sectors as you said, but the remapping process is more complicated. If a sector fails to read, it does not immediately get remapped. Rather, it is added to the Current_Pending_Sector list, and the read fails. The drive leaves the sector as-is in the hope that some future attempt to read it will succeed, thus avoiding data loss. If the sector was remapped on a failed read, it would mean definitely losing data. If a later read attempt succeeds, the sector is generally removed from the Current_Pending_Sector list and is considered "good" again.

Only if a write fails to a sector in the Current_Pending_Sector list does a sector get remapped (most drives don't verify writes to "good" sectors by default for performance reasons, so the only chance to catch a failed write is when the sector is in the Current_Pending_Sector list). In this case, the drive can try again, this time writing to a spare sector, without losing the data to be written. Now the bad sector gets remapped. The drive's Current_Pending_Sector count will decrease, and the Reallocated_Event_Count will increase by a corresponding amount.

In fact, things can be even more complicated than this, as some drives don't like to remap individual sectors (for performance reasons), and will try to remap larger chunks or do other fancy things.

Anyway, the point is that forcing the OS to write some junk data to sectors in the Current_Pending_Sector list will usually force them to be remapped. Even if they're not remapped, they at least won't accidentally get used for your important data*.

* Again, there are subtleties. The OS sometimes moves active files to different parts of the disk (see Apple dev docs on "hot files"), and this could in principle re-expose the bad sectors if they weren't actually remapped. In practice, this is very unlikely, as there shouldn't be many requests for this junk data (and so it will never be "hot").

You can use smartmontools to see all sorts of really detailed information on your drive, including the Current_Pending_Sector count and the Reallocated_Event_Count. If a drive has dozens of Current_Pending_Sectors and Reallocated_Event_Counts, I usually take it as a sign that the drive is getting older, and should be backed up frequently if it contains important data. For a music-only iPod, however, I wouldn't worry about it.



[ Reply to This | # ]
Seems a time-consuming method to me
Authored by: makeinu on Mar 10, '06 05:12:16AM

A friend of mine had a bad sector problem with his 3G iPod, caused from dropping it off the back of a treadmill too many times, that was causing it to periodically stop playing. He could still fill the thing all the way to capacity, but certain songs would just cut out in the middle, and the iPod would just go silent.

I used TechTool Pro to troubleshoot it, and it reported that there were multiple bad sectors on the drive. So, after i zeroed out the drive, I ran the iPod updater, and all was good. And the whole process took negligible effort from me, and not but an half an hour of computer time, unattended.

Every Mac user should have a copy of a utility like TechTool Pro or Disk Warrior, for just such an occasion like this, because sometimes the built-in utilities like the Unix scripts and Disk Utility, and the drives own SMART monitors, are not enough. Sure, they aren't free, but they are powerful, reliable, and a hell of a lot cheaper than trying to replace lost data and a new hard drive.



[ Reply to This | # ]
Seems a time-consuming method to me
Authored by: djrenekk on Mar 18, '06 12:55:22PM

As I said, this method "might work". It worked for me and it is true that the file type does not matter. It is just easier to use text because you can control more on how big the file is.

Hope someone found this useful though.



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: bryanus on Jun 17, '06 07:13:00PM

I have a coupl questions about this method of discovering bad blocks on an iPod hd.

1) Why does the file have to be so small? I started with a 4KB file like you said, but it's taking _forever_ to find the first bad block (which I suspect is about 4GBs in).

So I switched to a .zip file of about 5MBs and have been duplicating that file. Initially one--by-one, but now I am duping it in about 10 file increments.

2) Say I get stuck during a copy. I then disconnect and reset the iPod and try again. How will I be able to get around this bad block if I can't copy to it in the first place?



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: bryanus on Jun 17, '06 07:29:27PM

OK, so I hit a bad block with my larger .zip file. I got hung, disconnected, ran disk utility, and then proceeded to dupe the smaller 4kb file. I am strating to see more instances of the dialog box appear during the copying. Now what? Keep going?



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: PanicRoom on Jun 18, '06 01:59:27PM

I know this is just circumventing the original hint, but I thought it might be helpful to mention to some users:

I had constant problems with a 4G 40GB iPod. After following all the tips here and elsewhere or the net, and spending hours partitioning, re-partitioning (and re-partitioning again!), the damn thing still wouldn't work. There were several problems with the drive (occuring every 3GB or so) and this made the iPod effectively useless. After resigning myself to buying a new iPod, I spoke with a friend who is an Apple tech, and who told me:

DON'T FORGET Apple has a two year extended warranty program in place for iPod's with bad batteries. I didn't think this would apply to me (since my battery was fine), but he stressed that there only needs to be a claim that the battery is defective. I was three weeks off two years, so I paid the 69 Euros (yeah, there's always a catch), told him "my iPod battery is stuffed", and Apple replaced my defective iPod with a brand new model.



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: meric on Apr 07, '08 05:08:40PM

Thank you so much! This really worked when nothing else did (on Windows too).



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: ArcadeMario on Jul 06, '10 07:52:41PM

I know I'm replying to a very old thread, but I must give a great big "Thank You" to user djrenekk for this information. It saved my ipod. I also want to provide some help for Windows users who may stumble upon this thread while searching for help with this bad sector problem.

My ipod had lots of bad sector errors. I tried everything, including low level formatting the ipod, performing scans, etc.. I still kept getting errors when attempting to sync with iTunes. Using the information here, I was able to block out the bad sectors, and I am now using nearly all space on my 30GB ipod.

I'm a Windows user, and I automated this entire process. I found that whenever a bad sector was reached, I just had to eject the ipod, and the ipod would reboot itself and then reconnect to Windows. So, I used a utility called DevEject to automatically eject the ipod. I created a Perl script to generate a large batch file that attempts the copies as described by user djrenekk. If the copy succeeds, the file's name is remembered so that I can later delete it and recover the space. If the copy fails, the ipod is ejected, and when it reconnects the script continues with the next file. Here's a sample of the code for one file:

:START4601
echo FILE: 4601
copy DummyFile_10M.txt G:\00_DO_NOT_DELETE_THESE\BadSectorPlaceholder_4601.txt > nul
if ERRORLEVEL 1 GOTO :EJECT4601
echo SUCCESS: FILE NUMBER 4601
echo del G:\00_DO_NOT_DELETE_THESE\BadSectorPlaceholder_4601.txt >> GoodFilesToRemove.bat
:: upon success, go to next file
GOTO :START4602
:EJECT4601
echo G:\00_DO_NOT_DELETE_THESE\BadSectorPlaceholder_4601.txt >> FilesFailingCopy.txt
deveject.exe -EjectName:"USB Mass Storage Device" > nul
:REDO4601
:: detect when the ipod is connected again to the PC
sleep 5
dir G:\00_DO_NOT_DELETE_THESE\ > nul 2>nul
if ERRORLEVEL 1 GOTO :REDO4601

When the ipod was finally full, I just ran the GoodFilesToRemove.bat script to delete all good files from the ipod. What's left is all of the files that block the bad sectors. I ended up with about 25 files blocking bad sectors all over the ipod's hard drive. I think my file numbers went into the 6000 range. Can you imagine doing this one by one for each file? It would have taken forever. I'd be happy to share the code with any Windows user who needs it.



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: ArcadeMario on Jul 09, '10 12:03:27PM

I created a single Windows command script to perform the entire task of copying files as I describe in my message above. You can download it here:

http://www.dalessio.ws/Misc/detect_ipod_bad_sectors.zip

Please read the top portion for information and configuration. This is not for computer newbies; it is expected that you have at least a minimal amount of knowledge of batch scripts to modify it. I will help you if you need it, but please don't ask me newbie questions like "how do I run a script?", or "how do I edit a file?".

Good luck.

Mario



[ Reply to This | # ]