Imaging an SSD with Bad Sectors

Configure and optimize you computer for Audio.
Post Reply New Topic
RELATED
PRODUCTS

Post

My operating system SSD has bad sectors. The drive is still functional, but SMART says failure is imminent. Traditional backup programs could not make an image of the drive due to I/O errors.

I was able to use ddrescue (https://www.gnu.org/software/ddrescue/) to image the drive. Over 99.99% of the data was saved.

To avoid having to reinstall the OS and many programs, I'd like to write this image to a new drive. Because I made the image while the drive was functional, it seems like it might work. Does anyone have experience with this scenario? Is using this image a recipe for trouble/performance issues down the line? I'm guessing it depends on what is stored in the bad sectors.

Any advice would be appreciated.

Post

As long as you have the disk image backed up, you can try to image a new disk with it and see what happens. If it fails, you'll still have your original image.
Theoretically though, it should work, since ddresuce has error handling for reading bad sectors. It will try to recover the maximum amount data, and gracefully continue where it can't.

Post

What @lunardigs suggests is basically the best you can hope for, so you might as well try it.

When you say the clone copied "99.99%" of the data, was that provided by ddrescue, or are you just estimating? And were you able to see what wasn't copied?

Obviously, if it was something in the OS directory, you *might* have a problem (but if you're running Windows, you can have it try to "restore" itself). But if you have a drive with "Recovery" and other partitions (such as those made by Dell and HP), it may not even matter if they weren't cloned accurately.

Steve
Here's some of my stuff: https://soundcloud.com/shadowsoflife. If you hear something you like, I'm looking for collaborators.

Post

lunardigs wrote: Tue Feb 11, 2025 3:19 am As long as you have the disk image backed up, you can try to image a new disk with it and see what happens. If it fails, you'll still have your original image.
Theoretically though, it should work, since ddresuce has error handling for reading bad sectors. It will try to recover the maximum amount data, and gracefully continue where it can't.
Thanks for the advice. Yep, ddrescue is a great program.
planetearth wrote: Tue Feb 11, 2025 5:07 am When you say the clone copied "99.99%" of the data, was that provided by ddrescue, or are you just estimating? And were you able to see what wasn't copied?

Obviously, if it was something in the OS directory, you *might* have a problem (but if you're running Windows, you can have it try to "restore" itself). But if you have a drive with "Recovery" and other partitions (such as those made by Dell and HP), it may not even matter if they weren't cloned accurately.

Steve
The 99.99% came from ddrescue. It is possible to determine the bad sectors using the map created by ddrescue, but I haven't done that.

Seems like whatever is bad is not critical to the OS. I ran sfc and nothing needed to be repaired.

The new drive should be here on Saturday. So I'll give it a go and report back. I plan on using this guide: https://www.technibble.com/guide-using- ... over-data/

Post

Even if SFC /SCANNOW doesn't find anything, you might also want to run this:
DISM.exe /Online /Cleanup-image /Restorehealth

It finds other issues SFC doesn't necessarily look for.

Steve
Here's some of my stuff: https://soundcloud.com/shadowsoflife. If you hear something you like, I'm looking for collaborators.

Post

I would install Windows and all the programs again to get a brand spankin' new system. And I bet it wouldn't take much longer than all the time you've spent on doing repairs etc..

Post

planetearth wrote: Tue Feb 11, 2025 9:30 pm Even if SFC /SCANNOW doesn't find anything, you might also want to run this:
DISM.exe /Online /Cleanup-image /Restorehealth

It finds other issues SFC doesn't necessarily look for.

Steve
I forgot about dism. Thanks for the reminder.
sempondr wrote: Tue Feb 11, 2025 9:50 pm I would install Windows and all the programs again to get a brand spankin' new system. And I bet it wouldn't take much longer than all the time you've spent on doing repairs etc..
If restoring the image to a new drive doesn't work, I'll have to do that. Although, I probably won't install all the programs. I've accumulated too many over the years.

Post

Genetic_Junk wrote: Tue Feb 11, 2025 10:13 pm I probably won't install all the programs. I've accumulated too many over the years.
That's actually a good reason to start from scratch again. You only need your Documents folder (and other 'real' data) although I've lost that as well (more than once) but can't say I really miss anything.
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

Restoring such an image doesn't require anything special.

Taking such an image needs special software because bad sectors must not be skipped, they need to be replaced (usually with binary zeros). But once you have the image you splatter it onto the replacement disk the same way you would a normal image.

After connecting such a restored disk to a computer you run fsck (or equivalent) and hope for the best.

The "99.9%" statement is not very useful. 0.1% of a big disk is actually a lot of data missing. But either way you don't know whether the missing sectors are in files, file metadata (such as directories) or general metadata (such as superblocks and allocation tables). It's a game or bad or good luck. Try not to have bad luck.

Post

Thanks again for all the advice. Everything seems to be working ok after using dd to write the image to the new drive.

Post

Nice!

Post Reply

Return to “Computer Setup and System Configuration”