MacOS – How I put OSX on a disk with badblocks, while avoiding them

hard drivemacos

My MacMini hdd, some months ago, stopped booting.

Upon inspection, seemly a tiny amount of sectors got corrupted, but in system-related areas, and OSX went bonkers and destroyed half of my data while trying to fix itself, and made the disk entirely unusable.

While the HDD has only 13 sectors "pending", and 0 permanent bad blocks, and 0 reallocated, I couldn't figure how to use it.

I ended grabbing another HDD I had, that has 300+ actually broken blocks, and used that one as my new boot HDD…

And it worked! Except it is obviously in a much worse shape than the original, I've been using it for months, but I am started to get worried it might die suddenly (although so far I don't got even a corrupted data issue!)

I learned that on Linux you can use a command caled "badblocks" to find all… badblocks. And then use mkfs to create the file systems avoiding such bad blocks.

But "badblocks" is slow, and destructive, so before attempting using a Linux tool on OSX HDD, I wanted to know if there is a OSX tool for that: write data on the entire HDD (triggering SMART to reallocate, or decide that some sector was okay after all, for the entire HDD), and then put it back to be used as my main OSX disk (And use the worringly bad one as backup).

And please, don't tell me to buy an HDD, I just can't afford one, if I could, I would not be "wasting" time doing HDD gymnastics like this.

Best Answer

don't tell me to buy an HDD

Buy a new HDD.

Here's why.

First, a bit of history.

ALL disk drives have bad sectors. Way back in the 1980s drives were simple mechanical devices that came with a bad sector list. Today, the bad sectors are mapped in the drive's firmware. The drive has slightly more storage than advertized and the controller just replaces a bad sector with a spare one. As more sectors read as bad they are also replaced. End result is a drive that appears perfect to the end user.

Your drive has exposed bad sectors, which means the controller has run out of spare sectors to use. This is a serious problem that will not get better. If the cause of the bad sectors was a head crash, the now-damaged head will be slowly scratching up the rest of the drive.

So, your choices are:

  • get a new drive now, enjoy years of trouble-free service.

  • don't get a new drive now, have several months of bad performance, data loss, and general unreliability. Get new drive when the current one fails completely.

Laptop-size drives that fit a Mac Mini are available on Amazon for $75 (1Tb Western Digital Black 7200rpm) down to $20 (120Gb chinese whitelabel). Or an SSD for about twice as much per gigabyte.

Depending on your Mini's series replacement difficulty ranges from "tedious" to "challenging". The original ones require 2 big putty knives in addition to the normal screwdrivers, the newer (short, wide, all-aluminium) need a special tool.