Writing to, and backing up SD Card (Using Windows, Alternative Software)


43 posts   Page 1 of 2   1, 2
by itsonlyme » Sun Apr 15, 2012 8:44 am
Yesterday while attempting to write the new Debian image to an SD card (under Windows 7), ready for my Pi's arrival on Monday, I was unable to get "Win32Diskimager" to recognise the card. It had done so previously without problem. Initial thoughts were that the card had gone bad, but then I found that the card could be seen by other software. Computer reboot did not solve the problem.

Looking for clues I found "DiskImage_1_6" which I downloaded and found it wrote the new image to the card without problem. I also saw that DiskImage is able to write the image from your card to another disk. This I did after using GParted to adjust the original partitions. This will be useful later if I need to rewrite or backup a card under Windows.

The only issue I noticed was that DiskImage does not have the facility to verify that an image has been written correctly.

The download link for "DiskImage_1_6" is http://www.roadkil.net/program.....sk%20Image
Posts: 120
Joined: Sun Feb 12, 2012 12:43 pm
by Tass » Sun Apr 15, 2012 9:36 am
Thanks itsonlyme - looks nice.  It'll be especially useful in creating backups of an SD card once I've got my RaspPi OS into a state I'm happy with, including all the drivers, etc.

I had the same issue as you, where Win32DiskImager would intermittenly see the card (I'd say 1 in 20?).  I found that the existing content of the card sometimes played a part in it working.

I tried out DD for Windows and while it's a little more manual, I've found it worked every time.  I've put togther a post on my blog here that should hopefully provided a step by step guide to creating your SD Card.  There are instructions on how to first completely clear the card, then apply any of the images, with the expected results

http://myraspberrypiexperience.....ndows.html
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by mahjongg » Sun Apr 15, 2012 5:21 pm
My guess is that Win32DiskImager cannot handle non windows (i.e. Linux) partitions, and doesn't try to remove these before trying to put an image onto the SD-card. Which may lead to problems with the program, or an invalid card image. I would recommend using a Live linux CD (or DVD) with GPparted (partition editor) to remove any and all partitions on the card before running Win32DiskImager.
User avatar
Forum Moderator
Forum Moderator
Posts: 4962
Joined: Sun Mar 11, 2012 12:19 am
by markb » Mon Apr 16, 2012 6:24 am
I suspect you are correct - I have the same problem trying to upgrade a card with the new Debian image.
User avatar
Posts: 124
Joined: Thu Nov 17, 2011 8:09 am
by jamesh » Mon Apr 16, 2012 9:48 am
mahjongg said:


My guess is that Win32DiskImager cannot handle non windows (i.e. Linux) partitions, and doesn't try to remove these before trying to put an image onto the SD-card. Which may lead to problems with the program, or an invalid card image. I would recommend using a Live linux CD (or DVD) with GPparted (partition editor) to remove any and all partitions on the card before running Win32DiskImager.


Not quite sure why that would be. AFAIK, it just dumps the image file over the SD card, whatever is already on it. I've certainly never had problems in that respect.

You could do a format of the whole card prior to doing the imaging.
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11576
Joined: Sat Jul 30, 2011 7:41 pm
by markb » Mon Apr 16, 2012 10:15 am
JamesH said:


Not quite sure why that would be. AFAIK, it just dumps the image file over the SD card, whatever is already on it. I've certainly never had problems in that respect.

You could do a format of the whole card prior to doing the imaging.

Not from windows, it can only see a 75MB partition.

User avatar
Posts: 124
Joined: Thu Nov 17, 2011 8:09 am
by Tass » Mon Apr 16, 2012 10:18 am
I had the same problem - couldn't format it from inside Windows and couldn't write to it using Wind32DiskImager.  I tried using DD and even with that, I couldn't write the image without deleting the partitions first.

The link in my post above has steps to remove the partitions using diskpart.  It's a fairly simple process - just look at the disks & partitions carefully to make sure you delete the right ones :)
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by Bad Wolf » Mon Apr 16, 2012 12:02 pm
To delete partitions on SD cards using windows

Click Control panel > Administive Tools > Computer Management > Storage >
 Disk Management

Select Disk corresponding to SD card

Right click on Partition you wish to delete and select Delete Volume
 
Simples!
 
 
To a person with a hammer, everything looks like a nail.
Posts: 70
Joined: Wed Jan 25, 2012 11:18 pm
by ukscone » Mon Apr 16, 2012 12:12 pm
If you've ever used the sd card before and you are going to be writing the disk image under windows i'd recommend using the panasonic sd card formatter just to get everything back to a known state and make sure the whole card is recognised.

https://www.sdcard.org/downloads/formatter_3/
User avatar
Forum Moderator
Forum Moderator
Posts: 2765
Joined: Fri Jul 29, 2011 2:51 pm
by Dinosaur » Mon Apr 16, 2012 12:18 pm
Or put the card in a digital camera and format it.
Posts: 10
Joined: Fri Feb 24, 2012 9:28 am
by Gert van Loo » Mon Apr 16, 2012 12:27 pm
Just as a note: the SD-card slot in my laptop does not work at all with any of the tools. I have to use an external USB <=> SD converter.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1988
Joined: Tue Aug 02, 2011 7:27 am
by Chris.Rowland » Mon Apr 16, 2012 12:27 pm
I tried using Win32DiskImager last night and it seems fine, it overwrites whatever is there.

Format in Windows said it was only doing 75 mb but it might actually do the lot.

There's a low level formatter for SD cards:

https://www.sdcard.org/downloads/formatter_3/

It seems to be able to format anything you give it, this definitely gets the full disk back.

Ext2Read is a program that will examine a Linux formatted disk in Windows:

http://sourceforge.net/project...../ext2read/

There are a number of others.

All available using Google.
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm
by Tass » Mon Apr 16, 2012 12:27 pm
Bad Wolf said:

To delete partitions on SD cards using windows

Click Control panel > Administive Tools > Computer Management > Storage >
 Disk Management

Select Disk corresponding to SD card

Right click on Partition you wish to delete and select Delete Volume
 
Simples!
 
 


Not always so simples...

It wouldn't let me delete the boot partition that way for some reason - the only way I could do it was through DD.

@ukscone, great link - clean, simple process

@Dinosaur - good idea, back to basics!
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by Guest » Tue Apr 17, 2012 3:28 am
Could we see a screen image of what a SD card should look like after a successful  image write.
by ukscone » Tue Apr 17, 2012 4:14 am
Gert said:


Just as a note: the SD-card slot in my laptop does not work at all with any of the tools. I have to use an external USB <=> SD converter.


hp laptop and/or ricoh builtin reader/writer?
User avatar
Forum Moderator
Forum Moderator
Posts: 2765
Joined: Fri Jul 29, 2011 2:51 pm
by Tass » Tue Apr 17, 2012 7:21 am
@woolfe9761 take a look at the link in the 2nd post, I have screenshots of the outcomes of all the images.
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by chaddy501 » Tue Apr 24, 2012 5:08 pm
im an absolute beginner looking to find out how to get my sd card ready  to go in the board can someone give me a link to software and anything else needed to get me on my way. please remember i am an absolute beginner so as simple as possible please :)
Posts: 5
Joined: Tue Apr 24, 2012 3:56 pm
by Tass » Tue Apr 24, 2012 5:40 pm
chaddy501 said:


im an absolute beginner looking to find out how to get my sd card ready  to go in the board can someone give me a link to software and anything else needed to get me on my way. please remember i am an absolute beginner so as simple as possible please :)



You haven't mentioned your current OS, but if you're using Windows you could try one of these two:

http://myraspberrypiexperience.....-card.html

http://myraspberrypiexperience.....ndows.html

The first one uses a windows application you can download.  The second one, if you're feeling a little more adventurous, used the command line.  If you get stuck let us know.

Just one note - they probably refer to outdated links to the images - just make sure you get the latest image
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by paulemm » Wed Apr 25, 2012 3:05 am
EErr, I've got the same problem and my OS is XP SP3 and both the above dont claim to work for XP. Words like "... might have issues" scare me and my pension rigid.

Any solid news for XP users would be VERY welcome.

PM
Posts: 16
Joined: Wed Apr 25, 2012 12:06 am
by chaddy501 » Wed Apr 25, 2012 6:07 pm
tass, hate to say it but still realy confused downloaded that win32 on  windows xp but im stuck from there :) any advice
Posts: 5
Joined: Tue Apr 24, 2012 3:56 pm
by Tass » Wed Apr 25, 2012 7:42 pm
paulemm said:


EErr, I've got the same problem and my OS is XP SP3 and both the above dont claim to work for XP. Words like "… might have issues" scare me and my pension rigid.

Any solid news for XP users would be VERY welcome.

PM


I don't have a Win XP machine myself so can't confirm if if will work, but my guess is that the DD option would be an option for you then?

@chaddy501 I think you might have the same issue.  DD for Windows is little more complex, but should get you there in the end.

PM me if you guys are still stuck with DD using the link above.
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by poing » Wed Apr 25, 2012 8:09 pm
Tass said:


Bad Wolf said:

To delete partitions on SD cards using windows

Click Control panel > Administive Tools > Computer Management > Storage >
 Disk Management

Select Disk corresponding to SD card

Right click on Partition you wish to delete and select Delete Volume
 
Simples!
 
 


Not always so simples...

It wouldn't let me delete the boot partition that way for some reason - the only way I could do it was through DD.

@ukscone, great link - clean, simple process

@Dinosaur - good idea, back to basics!


I had the same issue the other day when I wanted to use a microSD card for Windows again after I had used it in an Android phone. The *very quick* solution was to put it in my Nikon D80 DSLR and press 'format' :D
Posts: 1099
Joined: Thu Mar 08, 2012 3:32 pm
by Dendennis » Wed Apr 25, 2012 9:35 pm
The way to delete the 'boot' partition from an sd card through a windows machine

is with Diskpart,

careful be sure to select the right options or you could

really mess up your system.

windows command prompt -> type "Diskpart"

you will be put into the diskpart utility.

then type "list disk", you'll see disk 0 xxxxMb, Disk 1 xxxxGB disk 2 7.2Mb etc

then type select disk x where x is the number of your sdcard

(i.e. "select disk 2" for the 7.2Mb disk/card)

then type "list partition", this will list all partitions on the selected drive/card

type "select partition x" x being the number of the partition you want

type "delete partition" to delete the selected partition.

then select and delete the remaining partitions.
Posts: 8
Joined: Thu Dec 01, 2011 2:26 am
by Tass » Wed Apr 25, 2012 9:54 pm
Someone pointed out to me elsewhere that you can use 'clean' rather than manually deleting the partitions individually, but that has even more chance of deleting the wrong partitions then :)

It would be:

diskpart

list disk

select disk 1 (where disk 1 was listed as the SD card)

clean

Careful now! :)
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by paulemm » Wed Apr 25, 2012 10:45 pm
Just reporting back that:

1) Win32DiskImager works just fine on my Win XP SP3 netbook and wrote something that took about 3 mins at 10 MB/Sec to a 4GB card. I guess it's OK but I cant read it from Windows. This leads me to my next question:

2) Is there any way to read the disk from windows XP to verify it, as Win32DiskImager does not seem to have a "Verify" function. I suppose I could try copying it back as an image file to another folder with Win32DiskImager. Should that work OK?

I just want to be as ready as I can for the day my Pi gets here and having a good OS on the SD card seems pretty important at present ...

Thanks again

PM
Posts: 16
Joined: Wed Apr 25, 2012 12:06 am