Imaging an SSD with Bad Sectors
-
- KVRAF
- 3150 posts since 22 Dec, 2004
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.
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.
- KVRian
- 1263 posts since 6 Jun, 2016
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.
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.
- KVRAF
- 2390 posts since 10 Jul, 2006 from Tampa
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
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.
-
- KVRAF
- Topic Starter
- 3150 posts since 22 Dec, 2004
Thanks for the advice. Yep, ddrescue is a great program.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.
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.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
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/
- KVRAF
- 2390 posts since 10 Jul, 2006 from Tampa
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
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.
-
- KVRist
- 237 posts since 17 Jun, 2002
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..
-
- KVRAF
- Topic Starter
- 3150 posts since 22 Dec, 2004
I forgot about dism. Thanks for the reminder.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
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.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..
- KVRAF
- 16795 posts since 8 Mar, 2005 from Utrecht, Holland
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.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.
We are the KVR collective. Resistance is futile. You will be assimilated. 
My MusicCalc is served over https!!
My MusicCalc is served over https!!
- KVRian
- 560 posts since 3 Jan, 2021
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.
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.
-
- KVRAF
- Topic Starter
- 3150 posts since 22 Dec, 2004
Thanks again for all the advice. Everything seems to be working ok after using dd to write the image to the new drive.