Skip to content

simple sd card test

wiedehopf edited this page Oct 3, 2024 · 6 revisions

Paste this on the console:

time for i in {1..5}; do
  sudo dd if=/dev/urandom of=/run/testFile bs=1M count=50 status=none
  cp /run/testFile /tmp
  sync
  sudo tee /proc/sys/vm/drop_caches <<< "3" > /dev/null
  diff -s /run/testFile /tmp/testFile
done

It should say that the files are identical 5 times. If the files differ your sd-card or much less likely your RPi is bad.

Clone this wiki locally