mattmezza
Posts: 5
Joined: Mon Dec 31, 2012 1:50 pm
Location: Pozzilli, Italy

SD card broken after dd???

Wed Jan 16, 2013 10:08 pm

Hi everybody,

i flashed raspbian on my kingston 8GB SD using dd on my macbook pro: all worked fine!
Then I decided to flash openelec but I messed up with block size parameter and then I ctrl+c dd bash leaving the sd card in a state where I can't modify.
I tried everything to reset my sd card: dd with if=/dev/zero, inizialize from disk utility, format via Windows with diskpart...
Is my SD broken or can I fix it?
Now it shows two partition: System -> about 113Mb in which I can recognize some openelec files, disk1s2 to which I cannot access.
When I try to initialize from Utility Disk it gives me a Unable to write last block error.
Hope I can fix it.

Thanks everybody.
Matteo

Mobius
Posts: 238
Joined: Thu Aug 30, 2012 1:07 am
Location: San Angelo, Texas USA

Re: SD card broken after dd???

Thu Jan 17, 2013 12:27 am

Try running the free version of EaseUS Partition Master. It should allow you to easily delete partitions, format them, etc.

Dilligaf
Posts: 283
Joined: Wed May 23, 2012 6:48 pm

Re: SD card broken after dd???

Thu Jan 17, 2013 1:17 am

Go here http://www.alexpage.de/usb-image-tool/download/ and download the empty bootsector image and write it to the card

mattmezza
Posts: 5
Joined: Mon Dec 31, 2012 1:50 pm
Location: Pozzilli, Italy

usb image tool result

Thu Jan 17, 2013 10:52 am

tried usb image tool and no result

error code 23 CRC error

the fat partition with openelec files is still on the card. When I try to format (from explorer) it says that partition it's write protected

Same error using disk managment

It is possible my sd it's broken?
Matteo

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: SD card broken after dd???

Thu Jan 17, 2013 10:55 am

move the write protect tab
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mattmezza
Posts: 5
Joined: Mon Dec 31, 2012 1:50 pm
Location: Pozzilli, Italy

Re: SD card broken after dd???

Thu Jan 17, 2013 11:00 am

RaTTuS wrote:move the write protect tab
already tried that but no result!
Same issue.
Matteo

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: SD card broken after dd???

Thu Jan 17, 2013 11:03 am

but I messed up with block size parameter and then I ctrl+c dd b
may have nadgered something low level :(
if a reflash of raspbian cannot work then it may be dead
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mattmezza
Posts: 5
Joined: Mon Dec 31, 2012 1:50 pm
Location: Pozzilli, Italy

Re: SD card broken after dd???

Thu Jan 17, 2013 11:14 am

RaTTuS wrote:may have nadgered something low level :(
if a reflash of raspbian cannot work then it may be dead
I think so too. :?
Now I learned that dd is powerful and dangerous !!! :D
I'm going to do one last attempt to bring it back to life and then I'm going to declare it dead, prepare funeral and go buyin another one! :)

Anyways thank you all for support.
Matteo

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: SD card broken after dd???

Thu Jan 17, 2013 12:42 pm

All dd does is ask the kernel to write data to the device. Ctrl+C interrupts dd, not the kernel, so the card will still see a valid sequence of writes, just fewer of them than originally intended.

Unplugging a card while it is being written could conceivably cause damage, but if the card is broken after merely interrupting dd then I believe it must have been faulty already.

Out of interest, what block size did you mistakenly use? If it was very small or not a multiple of the flash block size then it would make extra work. But still, the card should not be damaged unless it is of very poor quality.

mattmezza
Posts: 5
Joined: Mon Dec 31, 2012 1:50 pm
Location: Pozzilli, Italy

Re: SD card broken after dd???

Thu Jan 17, 2013 1:42 pm

I was using a BS=8m but I thought that it was too large so I decided to stop dd with ctrl+c. Then the card came into this state and now, when I try to use dd with it, it seems that nothing happens and after 5 or 6 hours dd is still running.
The card is a Kingston class 4 with 8GB of capacity.
I tried to reset card by doing dd if=/dev/zero of=/dev/disk1 bs=512 count=512 to reset mbr but nothing changed... then tried to dd if=/dev/zero of=/dev/disk1 bs=4m but another ttime nothing has changed. Now i'm in this state where it'impossible to change nothing.
What can I do? :)
Matteo

thepibob
Posts: 1
Joined: Mon Jan 28, 2019 5:51 am

Re: SD card broken after dd???

Mon Jan 28, 2019 5:56 am

I guess it won't help the author of this post now but maybe other guys hitting this thread. What worked for me (on mac) is using diskutil to fix the issue. Assuming your SD Card is disk2 try

Code: Select all

diskutil eraseDisk FAT32 <name> /dev/disk2

ejolson
Posts: 5373
Joined: Tue Mar 18, 2014 11:47 am

Re: SD card broken after dd???

Mon Jan 28, 2019 7:50 pm

mattmezza wrote:
Thu Jan 17, 2013 1:42 pm
I was using a BS=8m but I thought that it was too large so I decided to stop dd with ctrl+c. Then the card came into this state and now, when I try to use dd with it, it seems that nothing happens and after 5 or 6 hours dd is still running.
The card is a Kingston class 4 with 8GB of capacity.
I tried to reset card by doing dd if=/dev/zero of=/dev/disk1 bs=512 count=512 to reset mbr but nothing changed... then tried to dd if=/dev/zero of=/dev/disk1 bs=4m but another ttime nothing has changed. Now i'm in this state where it'impossible to change nothing.
What can I do? :)
I generally use bs=1M but 4M should also work fine.

Kingston class 4 cards are quite generic and not well suited for the Raspberry Pi even if not broken. A common recommendation at present is a non-counterfeit 16 or 32GB SanDisk A1 class SD card. Lots of trouble will be spared by using a good card and the A1 application class rating is particular good for Raspberry Pi.

Return to “Beginners”