Sign in with
Sign up | Sign in
Your question
Closed

Fixing Damaged Sectors without Reformating or using Disk Utility

Last response: in Mac Os X
Share
May 5, 2011 1:48:13 PM

I have a middle aged 12" iBook G4.

It has a 60gb HD which apparently has some damage.

Disk repair fails.

I can hear it doing a seek/fail now and then and the system hangs up for a little while.

It is still functional but I think it is getting worse over the last year.

I'd replace the HD but it is nearly impossible to get to. Though a larger HD would be nice.

I can't use Disk Utility to backup the drive, as it fails.

I used another program who's name escapes me, and it fails as well.

Any suggestions?

If I did go down the road of replacing the hard drive, I would want to copy the data from the old hard drive to the new, using an external HDD enclosure which I have and works with damaged hard drives, but would Disk Utility copy from a damaged source?
May 5, 2011 3:59:21 PM

I have had (multiple) success(s) with ddrescue with failing unmountable drives like this. It is free open source software from GNU. "It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors." (it will take a lot of time, but will save your data!)

I would suggest that you download a (x)ubuntu livecd, and write the harddrive image to an external harddrive.

http://www.gnu.org/software/ddrescue/ddrescue.html
https://help.ubuntu.com/community/DataRecovery#Software...
http://tinyapps.org/docs/imaging_a_corrupt_drive.html
^has good examples of usage

last ppc xubuntu images are available here: http://cdimage.ubuntu.com/xubuntu/ports/releases/10.04/...
Burn to a disc and boot to the linux :) 
May 8, 2011 10:52:13 AM

skittle said:
I have had (multiple) success(s) with ddrescue with failing unmountable drives like this. It is free open source software from GNU. "It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors." (it will take a lot of time, but will save your data!)

I would suggest that you download a (x)ubuntu livecd, and write the harddrive image to an external harddrive.

http://www.gnu.org/software/ddrescue/ddrescue.html
https://help.ubuntu.com/community/DataRecovery#Software...
http://tinyapps.org/docs/imaging_a_corrupt_drive.html
^has good examples of usage

last ppc xubuntu images are available here: http://cdimage.ubuntu.com/xubuntu/ports/releases/10.04/...
Burn to a disc and boot to the linux :) 



These sound like good ways of backing up the drive, but then there remains the problem of the drive itself. I loathe to replace it because it is so hard to take apart an iBook.

After backing up the drive, is there software that would scan the drive, mark the bad sectors as bad, and then I could restore the data and live happily ever after?
Related resources
May 8, 2011 11:11:35 AM

sadena said:
These sound like good ways of backing up the drive, but then there remains the problem of the drive itself. I loathe to replace it because it is so hard to take apart an iBook.

After backing up the drive, is there software that would scan the drive, mark the bad sectors as bad, and then I could restore the data and live happily ever after?


if you don't like using your latop then you could fully reformat the disk, and then put the image back on, however it is failing for a reason... read this: http://en.wikipedia.org/wiki/S.M.A.R.T. the upshot is that if it has been getting worse for the last year then even following a re-format it will continue to get worse, all hdds will fail, this one will fail soon and once it has gone, it has gone, there's no 'its only just failed so I stopped using it, can I get my data back' its gone.

All the attributes in pink/red are troublesome, see if you can find some software to read the smart attributes.
May 8, 2011 3:41:52 PM

13thmonkey said:
if you don't like using your latop then you could fully reformat the disk, and then put the image back on, however it is failing for a reason... read this: http://en.wikipedia.org/wiki/S.M.A.R.T. the upshot is that if it has been getting worse for the last year then even following a re-format it will continue to get worse, all hdds will fail, this one will fail soon and once it has gone, it has gone, there's no 'its only just failed so I stopped using it, can I get my data back' its gone.

All the attributes in pink/red are troublesome, see if you can find some software to read the smart attributes.


I checked the S.M.A.R.T. attributes, and everything comes back green / pass. So the drive is not failing, it just has some bad sectors.

Can you recommend software that can check the drive for bad sectors and mark them without reformatting? As I said, Disk Utility fails.
May 8, 2011 5:25:56 PM

This is all carried out at the hdd firmware/hardware level. If it has been marked as bad, then the hdd had reassigned it. The problem is that it only re-assigns it once it knows it is bad, i.e. when it has caused data loss. it can't do it before it has lost the data, because it doesn't look bad until it has lost it.

If the PC is picking up bad sectors, then this is bad data, that might be caused by a HDD error, or may be caused by an OS error, my money is generally on a HDD error.

Do you have a re-assigned indicator in your smart diagnostics? Can you copy/paste the text into a repy?
May 8, 2011 5:35:29 PM

No, my SMART software just does a full check and gives a positive or a negative. If it found a problem it would elucidate.

The symptom is that I the system will hang, and I can place my ear to the laptop and hear it repeatedly trying to read the same sector.
May 8, 2011 5:42:53 PM

i'd replace the hdd, i'm not sure what mac programs are out there but can you try and find one that shows the smart data attribute by attribute. Technically until more than a certain number of sectors have been re-assigned the drive is 'good' hence looking at the raw data is helpful.
May 8, 2011 6:01:13 PM

Basically I'm looking for the MAC equivalent of the old PC Scandisk program. Is that such a tall order?
May 8, 2011 6:44:43 PM

try asking a mcgenius? at a mac shop?
May 8, 2011 7:22:30 PM

sadena said:
Basically I'm looking for the MAC equivalent of the old PC Scandisk program. Is that such a tall order?

Not a good idea. Your disk is failing. You need to replace it. Even if you mapped out all bad sectors now, next week a few more would have gone bad. And then one day soon the disk will fail completely. Either replace the disk or junk the computer; it's not going to get better.
May 8, 2011 7:30:45 PM

Ijack said:
Not a good idea. Your disk is failing. You need to replace it. Even if you mapped out all bad sectors now, next week a few more would have gone bad. And then one day soon the disk will fail completely. Either replace the disk or junk the computer; it's not going to get better.


I'm not too worried about the complete failure of the hard drive. Everything is synced with my desktop PC, which in turn is backed up. Just the bother of restoring all my email might be a headache. Otherwise I'd reformat the drive tonight.

But the real trouble is replacing the hard drive. I'd buy a huge one, but the process of taking apart an iBook to replace the hard drive is a 42 step process, and another 42 to put it back together. The odds of me screwing up the process, despite being a highly talented PC Technician, are high. So I think I'll attempt that only when it does fail.

Know how many steps there are in replacing the hard drive on a Dell D600? 4! I could have it out and in in under a minute.
May 8, 2011 7:44:16 PM

I think just put your mind to it, and do it. document each step, or find an online guide, it can't be that difficult, just set aside the time and choose to do it.
May 8, 2011 7:54:01 PM

13thmonkey said:
I think just put your mind to it, and do it. document each step, or find an online guide, it can't be that difficult, just set aside the time and choose to do it.

I've got the ifixit guide. It says breathe deeply so many times it is daunting. Half the steps are just getting the casing off!

I really think I'm going to keep replacing the hard drive as a third option, for when it seriously begins to fail.
For second option, if I get bored I'll reformat and rebuild the OS on a fresh format.
For the first option, I am still going to be searching for the Mac OS X equivalent of Windows Scandisk.
Anonymous
May 8, 2011 9:24:49 PM

Boot into Single user mode and run fsck from a command prompt.
May 8, 2011 9:56:34 PM

How do I boot into Single user mode? Do you mean off the install disk?
May 9, 2011 1:16:45 AM

OK, I boot into single user mode, and run FSCK

First it refuses to check because the disk is journaled.
So I run FSCK -F to force it.

It checks for a while, then returns this:


disk0s3: I/O error
invalid sibling link
(4, 7657)
Volume Check Failed.


Which is similar to what Disk Utility does on Verify Disk (or Repair Disk when I boot from the CD)
May 9, 2011 3:03:39 PM

Yes, lovely link, but it tells me nothing as to what to make of the output I received. Nor does the man page.

disk0s3: I/O error
invalid sibling link
(4, 7657)
Volume Check Failed.
May 9, 2011 5:04:18 PM

Basically disc utility is a front end to fsck.

regarding your error, its fairly straight forward and not cryptic.
disk0s3: I/O error
This is an I/O error, a bad read. Possibly due to hardware or failing disc. If fsck is unable to fix it then you are pretty much SOL. There are some payware solutions like discwarrior, however i have never used this so I cannot speak to their ability.

IMO its probably better worth your time (and money) to replace the drive, even if its a PITA to swap out.
May 9, 2011 6:31:35 PM

"invalid sibling link" sounds like a formatting error to me. Something on the volume not pointing to the right place. In fact googling the phrase came up with many software solutions. Perhaps my hard drive isn't failing at all. I'll try a few and report back.
May 9, 2011 6:42:30 PM

sadena said:
I'm not too worried about the complete failure of the hard drive. Everything is synced with my desktop PC, which in turn is backed up. Just the bother of restoring all my email might be a headache. Otherwise I'd reformat the drive tonight.

But the real trouble is replacing the hard drive. I'd buy a huge one, but the process of taking apart an iBook to replace the hard drive is a 42 step process, and another 42 to put it back together. The odds of me screwing up the process, despite being a highly talented PC Technician, are high. So I think I'll attempt that only when it does fail.

Know how many steps there are in replacing the hard drive on a Dell D600? 4! I could have it out and in in under a minute.



The D series Latitudes were designed to be modular as possible. iBooks are designed to essentially remain closed for the life of the computer. I've taken apart a few before and it is true pain. The problem is that your hard drive (given the age of the computer) is probably saying it will kick the bucket soon. Even if you can rescue it in the short term or have a formatting error that's relatively easily fixed, you've already used up most of the likely service life of the drive. Sooner or later it will die like any part. A replacement (however annoying it may be) would definitely solve your issues long term and likely give you a more responsive system.

If you keep track of your screws and make notes along the way, an iBook can be pulled apart and put back together in under two hours safely. Just make sure not to damage the plastic clips inside by yanking it open. Pry it carefully and you'll be fine. Hope this helps.
May 9, 2011 7:18:10 PM

fsck fsck-ed me!

I ran fsck_hfs -r to try to rebuild the catalog. It failed, at the sector right before the one where fsck -f fails. (4, 7656) vs (4,7657)

Now I can't boot my laptop! I get the white screen, I get the bing, I get the apple and the swirly, then after a while it goes blank and dead. I think it actually turns itself off.

I can boot into single user mode, and then tried booting the system, only to have the same thing happen, this time in text. It tries to check the disk while booting up, fails while checking the catalog file (which I'm guessing is half rebuilt or something) and then goes blank and dead.

Any suggestions as to how I can get this thing atleast limping along so I can back up my email?
May 9, 2011 8:19:13 PM

The wierdest thing happened. I was flipping through my CD brinder to get my Tiger disk out to try backing up the hard drive (though I know it will fail as will SuperDuper), and I found something quite extraordinary.

A CDR with Disk Warrior written on it. I have no recollection of where this came from. When I booted it up, I knew for certain that I had never used it. It's version 3.0.3. Is there such a thing as a CD Fairy?

We'll see what it can do.
May 9, 2011 9:05:17 PM

Disk Warrior fixed everything. It found a ton of errors, fixed them. I then booted into single user mode and ran fsck -f just to check and it passed with flying colors.

Worth every penny. In my case, not a single one.

I did order a new larger hard drive because I still believe there are bad sectors, but now at least I will be able to clone the drive. 60gb to 160gb, now I'll be able to sync my complete MP3 collection from my desktop to my laptop.

So the answer was Disk Warrior.

In case you are interested, here's the report:
Spoiler

• All errors in the directory structure such as tree depth, header node, map nodes, node size, node counts, node
links, indexes and more have been repaired.
• 7 files had to be recovered. The files may have been lost or thrown away. You must inspect the files to determine
the extent of any damage. You must also determine whether the files should be discarded.
• 1 iNode file had a link count that was repaired.
• 1627 link files had a creation date that was repaired.
• 10 link files no longer point(s) to an original file and therefore cannot be repaired.
• 1 file had a directory entry with an incorrect flag that was repaired.
• 1 file had an ID that was repaired.
• 17 files had a directory entry with an incorrect text encoding value that was repaired.
• 1 file had an incorrect actual size that was repaired.
• 1 file had an incorrect BSD Type that was repaired.
• 1 file had an incorrect key that was repaired.
• 18 missing folders had to be recreated.
• 37 folders had an incorrect item count that was repaired.
• 13 folders had a directory entry with an incorrect custom icon flag that was repaired.
• The Root creation date was repaired.
• 1 file/folder had to be moved to the "Rescued Items" folder.
• Incorrect values in the Volume Information were repaired.
May 10, 2011 12:31:07 PM

If you are so much expert to edit the bad sectors you can use Raw Data Editor tool from Drive Toolbox which will allow you to edit your bad sectors and fix them its complicated but fruitful..Cheers
May 14, 2011 5:29:21 AM

Very interesting read. I had similar problems when I accidentally dropped my macbook while abroad. My warrantee had ran out and I was absolutely terrified. However repeated fsck's did eventually fix the problem. It's good to hear that this worked out for you. I'll know to have a look at DiskWarrior should I, knock on wood, run into more serious problems!
May 14, 2011 8:42:55 AM

Although disk warrior is ok and you have to pay for it, i Recommend Hdat2 or ViVard which do the same thing except free and work the exact same. They are both on Hirens and UBCD.
May 28, 2011 1:14:59 AM

I understand that this will work as a free alternative as long as you have another drive at least as big as your original one (I'm not an expert):

Make sure you have at least 1 backup of your hard drive.

Make a second backup using CarbonCopyCloner (donation ware). Do a file-level clone, which will defragment the files when writing them onto the target disk and not transfer any corrupted files. This will still be a bootable clone as long as you choose to clone the entire drive.

Write zeros onto the original drive using Disk Utility (part of the Mac OS). This will map out any bad sectors.

Restore your original drive with your clean, bootable clone using CarbonCopyCloner again.

Short of trashing your defective drive (highly recommended), this seems like one way to go.



February 22, 2013 11:51:33 AM

This topic has been closed by WyomingKnott
!