SD card, should i run badblocks on it or just copy OS on it and fsck?

postcd

Weaksauce
Joined
Nov 24, 2016
Messages
96
Hello,

some person possibly found bad blocks on a SD card using "badblocks -n -v /dev/mmcblk0" command https://help.endian.com/hc/en-us/articles/218146758-Verify-if-the-micro-SD-card-is-corrupt
( -n Use non-destructive read-write mode.) I do not know yet if that non-destructive write means it will preserve and not overwrite my data, but anyway i am wondering if this is anyhow beneficial to be ran (like potential bad block is set kind of "offline uncorrectable"), if it can prevent hypothetic issue of data not correctly written to the SD when i will use dd command to fill the SD card. Or if it will only wear the drive.

Or maybe use dcfldd utility to checksum the copied data https://github.com/resurrecting-open-source-projects/dcfldd/issues/8

The target is to make sure that .img file with the OS was copied 1:1 - this will be system drive. I think that the fsck is done automatically, so i do not need to care about it or i should run it once data was copied? Thank you
 
If your image is close to the size of the sd card, writing it and verifying the write is probably sufficient. If the file is much smaller than the sd card, it's worth doing something else. If you're going to write an image after testing, may as well let badblocks run in destructive mode.
 
Back
Top