I was trying to move the Pidora (Fedora for Raspberry Pi) image to my sd card using the
dd command, but I realized that I had forgot to put in the
bs=4M argument and had to terminate the program half way.
After I tried to copy again with the right command, I saw that the SD card led won't flash and the computer won't write anything to the sd card, just as the sd card was corrupted.
So I terminated the command again and tried to format it with
fdisk. But with no success. Everything that was trying to access the sd card was freezing.
I tried to fix it with
testdisk, but every time it tries to read/write something from the card, it returns read error.
I tried to write 0 to the sector 0 of the card, but it won't work:
[0x4d@nathalia ~]$ sudo dd if=/dev/zero count=1 of=/dev/mmcblk0 dd: writing to ‘/dev/mmcblk0’: Input/output error 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.00558315 s, 0.0 kB/s
However, writing to the second partition of the card works:
[0x4d@nathalia ~]$ sudo dd if=/dev/zero count=10 of=/dev/mmcblk0p2 10+0 records in 10+0 records out 5120 bytes (5.1 kB) copied, 0.00309397 s, 1.7 MB/s
Is there anyway I can somehow repair the sd card? The information on it is not important. I just need it to work again.