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


Nov 24, 2016

some person possibly found bad blocks on a SD card using "badblocks -n -v /dev/mmcblk0" command
( -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

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.