Sunday, September 08, 2024

revive corrupt sdcard for raspberry pi

According to the section on reviving corrupt SD cards in this page,

https://thelinuxcode.com/format-sd-card-raspberry-pi/

I tried out F3 to check for corruption.


https://medium.com/@drawn_stories/how-to-find-if-your-thumb-drive-sd-card-is-fake-with-f3-linux-tutorial-f0109bef63ea

sudo apt install f3

(I didn't need to use lsblk since I knew the sdcard was /dev/sdc for me.)

(instead of sudo umount, I used GParted to repartition to a single Fat32 partition first, and then unmounted within GParted.)

sudo f3probe --destructive --time-ops /dev/sdc

reported that everything was fine, finished in around 2 minutes.

Then, disconnected and re-connected to mount the drive, and then

f3write /media/myusername/mymountpoint

showed it would take 50 minutes for this 32 GB drive. Again, no errors.Then, 

f3read /media/myusername/mymountpoint

Also no errors. Took around 20-25 minutes. 

Then, tried cloning the working sdcard image again, into this sdcard which had failed last time

gunzip -c my-root-boot.image.gz | dd of=/dev/sdc conv=noerror status=progress

This took a bit over three hours.

31914983424 bytes (32 GB, 30 GiB) copied, 11300.6 s, 2.8 MB/s

(3.13 hours)

Completed successfully.

 



 


No comments:

Post a Comment