Call Search
     

New to Ham Radio?
My Profile

Community
Articles
Forums
News
Reviews
Friends Remembered
Strays
Survey Question

Operating
Contesting
DX Cluster Spots
Propagation

Resources
Calendar
Classifieds
Ham Exams
Ham Links
List Archives
News Articles
Product Reviews
QSL Managers

Site Info
eHam Help (FAQ)
Support the site
The eHam Team
Advertising Info
Vision Statement
About eHam.net

donate to eham
   Home   Help Search  
Pages: [1] 2 Next   Go Down
  Print  
Author Topic: Screwed up my RPi SD card, suggestions?  (Read 3017 times)
N6MST
Member

Posts: 5




Ignore
« on: September 04, 2018, 09:07:49 AM »

I got a brand new 32 gb micro-SD card for my Pi. I use the dd command (in Debian) to write the Raspbian image to my cards but this time I messed it up. After I downloaded the latest Raspian image I ran

Code:
sudo dd if=/dev/sdb of=path/to/Raspianimage

because I wasn't paying enough attention to what I was doing. I downloaded Raspbian again, rewrote the card the proper way, but my Pi won't boot on power-up. The SD card seems fine when I open it on my Debian computer's file system, so I don't know what happened. I reformatted the card to FAT32, wrote Raspbian a third time, and still no boot.

Did I fry my brand new SD card or is there some other way of recovering the thing?

Thanks all!
Logged
N5EG
Member

Posts: 347


WWW

Ignore
« Reply #1 on: September 04, 2018, 11:57:50 AM »

Not likely you damaged the SD card.  Reformatting as FAT32 it should erase and clean it up.

Your command syntax appears to be wrong.

The if (input file) contains the path to plus the filename of the raspbian image that will be read from.
The of (output file) needs to be the SD card device name (not a partition within the SD device) that will be written to.
If your card were sdd for example, then use sdd  (not sdd1 or sdd2...).

This comes straight from the Raspberry Pi website...

$ dd bs=4M if=2018-04-18-raspbian-stretch.img of=/dev/sdX conv=fsync

Assuming that the Raspbian image is in the current working directory, and
sdX is the device name of the SD card on your Linux system used to write the card.
(replace X with the SD card device letter).

If you ran the command as in your original post, you overwrote the raspbian image on
your Linux system, and will need to re-download it from the web first.
You need to unzip the downloaded file before writing it to SD.

-- Tom, N5EG
« Last Edit: September 04, 2018, 12:01:38 PM by N5EG » Logged
N6MST
Member

Posts: 5




Ignore
« Reply #2 on: September 04, 2018, 12:25:05 PM »

If you ran the command as in your original post, you overwrote the raspbian image on your Linux system, and will need to re-download it from the web first. You need to unzip the downloaded file before writing it to SD.

Yeah, that's what I did, I basically copied the contents of /dev/sdb to the Raspbian image. You obviously know that doesn't work, at least not the way I need it to! That's why I downloaded it again and tried rewriting to the SD card, still didn't work. Guess I will have another go at reformatting the card.

Thanks!
Logged
KC0MYW
Member

Posts: 91




Ignore
« Reply #3 on: September 04, 2018, 09:51:31 PM »

At this point, I might consider deleting the image again and then downloading it again (perhaps into a different directory as well) or at least verifying the downloaded image file against the published checksum.
Logged
N6MST
Member

Posts: 5




Ignore
« Reply #4 on: September 05, 2018, 08:38:40 AM »

At this point, I might consider deleting the image again and then downloading it again (perhaps into a different directory as well) or at least verifying the downloaded image file against the published checksum.
Right. I will have to do it a third time.
Logged
G4AON
Member

Posts: 1429




Ignore
« Reply #5 on: September 07, 2018, 02:48:45 AM »

Do you need as large a card as 32GB? I find the smaller size cards and a separate USB memory "stick" handier, as I can keep plenty of backups of the smaller cards without taking up too much space on a backup hard drive, it doesn't take as long to back up either.

73 Dave
Logged
N6MST
Member

Posts: 5




Ignore
« Reply #6 on: September 07, 2018, 10:12:00 AM »

Do you need as large a card as 32GB?
I would prefer a smaller card, I have plenty of 8's floating around! But this is for the QRP contest at Pacificon and the rules specifically state that a 32 gb card is required.
Logged
N3TJO
Member

Posts: 9




Ignore
« Reply #7 on: September 10, 2018, 04:44:47 AM »

dd is a potentially destructive command that has the nickname 'data destroyer'.  There should be more emphasis on having new users use a GUI disk imaging program when starting out.

Tommy N3TJO
Logged
N6MST
Member

Posts: 5




Ignore
« Reply #8 on: September 10, 2018, 06:19:35 AM »

dd is a potentially destructive command that has the nickname 'data destroyer'.  There should be more emphasis on having new users use a GUI disk imaging program when starting out.

Tommy N3TJO
Yeah, maybe so. But there is also value in using the command line. I think having both is good for some, for me I will stick with the command line.
Logged
KJ4HVL
Member

Posts: 143




Ignore
« Reply #9 on: September 11, 2018, 10:44:20 AM »

If you format, and then us DD it is possible that you are missing the bootloader. Try to use an actual imaging software that writes the bootloader as well. Something like noobs should work for that.
Logged
N6MST
Member

Posts: 5




Ignore
« Reply #10 on: September 11, 2018, 01:00:03 PM »

If you format, and then us DD it is possible that you are missing the bootloader.

MicroSD cards come stock with the Raspbian bootloader? Because I've used dd on every SD card I've ever written Raspbian to and have never had them fail, with the exception of this one which was basically a syntax mistake on my part... I mean, wouldn't the bootloader be part of the OS image?
« Last Edit: September 11, 2018, 01:07:57 PM by N6MST » Logged
N3TJO
Member

Posts: 9




Ignore
« Reply #11 on: September 11, 2018, 06:42:22 PM »

The bootloader is part of the image and dd will overwrite any previous formatting and any previous data on the SD card.
Logged
WB4CVZ
Member

Posts: 4




Ignore
« Reply #12 on: September 14, 2018, 03:40:53 PM »

I got a brand new 32 gb micro-SD card for my Pi. I use the dd command (in Debian) to write the Raspbian image to my cards but this time I messed it up. After I downloaded the latest Raspian image I ran

Code:
sudo dd if=/dev/sdb of=path/to/Raspianimage

because I wasn't paying enough attention to what I was doing. I downloaded Raspbian again, rewrote the card the proper way, but my Pi won't boot on power-up. The SD card seems fine when I open it on my Debian computer's file system, so I don't know what happened. I reformatted the card to FAT32, wrote Raspbian a third time, and still no boot.

Did I fry my brand new SD card or is there some other way of recovering the thing?

Thanks all!

The Raspian that you download is not an ISO image, so dd will not work. Here is what you do.

Make sure you download the NOOBS file.

https://www.raspberrypi.org/downloads/

Format the SD card to FAT32 and you may need to mark it as bootable (I don't remember)
Go into the NOOBS directory where you unzipped the Raspian files and COPY the files to the SD card.
Insert the SD card into the PI and power it up.
From there, follow the instructions on the screen.  It will install everything for you. If I remember, it does take a little while.

Hope this helps.
Logged
N6MST
Member

Posts: 5




Ignore
« Reply #13 on: September 15, 2018, 07:50:16 AM »

The Raspian that you download is not an ISO image, so dd will not work.

Yes it will. I do it all the time.
Logged
N6MST
Member

Posts: 5




Ignore
« Reply #14 on: September 15, 2018, 08:46:39 AM »

OK all, thanks for the suggestions. I reformatted the sd card once again, used dd to write Raspbian (yes, the regular .img download) and the thing booted first try. Not sure what the issue was but I went ahead and reformatted using the GUI application in Debian instead of reformatting from the command line. I guess maybe I do need GUI stuff once in a while Wink

Thanks again, off and running!
Logged
Pages: [1] 2 Next   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!