Kernel
Posts: 395
Joined: Sat Mar 03, 2012 12:53 pm

Re: Formatting/Restoring an SD Card?

Thu Mar 15, 2012 9:50 pm

I wrote the Fedora image to an SD card using the installer and Win32DiskImager - which I will post about in their respective topics.

However what is the best way to

a) clear a card for putting on a new image? i.e. debian and

b) format a card so that it returns back to the way it was when I bought it? (i.e. if I decided I wanted to use it in a camera or something)

Windows Disk Management isn't very good as it just leaves you with the 100MB partition and the rest of the card unallocated and won't let you do anything with the unallocated space or remove the 100mb partition (all options are greyed out on unallocated space and on 100MB partition you only have format but you can only format that 100mb partition - you can't extend, merge etc.)

According to: http://russelldavis.org/2012/0.....n-windows/


So if you are going to use an SD card that you have used before you'll want to format it before using it with the raspberry pi. Don't use the windows formatter with your SD card as although it'll sort of work it won't have set all the bits to 1 instead user the panasonic sd card formatter which you can find at http://panasonic.jp/support/gl.....index.html


Following that link actually eventually takes you to: https://www.sdcard.org/downloads/formatter_3/


This software formats all SD memory cards, SDHC memory cards and SDXC memory cards. SD Formatter provides quick and easy access to the full capabilities of your SD, SDHC and SDXC memory cards.

The SD Formatter was created specifically for memory cards using the SD/SDHC/SDXC standards. It is strongly recommended to use the SD Formatter instead of formatting utilities provided with operating systems that format various types of storage media. Using generic formatting utilities may result in less than optimal performance for your memory cards.


However Russell doesn't seem to say whether you should do quick, full (erase) or full (overwrite) - I went with full overwrite.

However before I could do this I had to actually remove the 100mb partition and end up with just one partition/big unallocated space - for this I used http://www.partition-tool.com/.....rsonal.htm


As Partition Magic alternative, EaseUS Partition Master Home Edition is a ALL-IN-ONE partition solution and disk management freeware. It allows you to extend partition (especially for system drive), manage disk space easily, settle low disk space problem on MBR and GUID partition table (GPT) disk under Windows 2000/XP/Vista/Windows 7 SP1/Windows 8 32 bit and 64 bit system.


(You run commands in this program and then it queues them up - you need to press apply for it to actually do them) - I used it to turn everything into unallocated space, made a new partition and then used SD Formatter to format it.

(Gparted only runs as a live cd/usb stick, Partition Magic is discontinued by Symantec - this program was picked as it was freeware and easy to get - recommendations of other alternatives would be welcome)

So is this the way to go about it? or have I just spent a lot of time doing things I didn't need to do?

At the end I got this message: http://i43.tinypic.com/23mq0oz.png

and it looks ok in '(My) Computer' http://i42.tinypic.com/21ceefp.png

This is the card that it was: https://www.amazon.co.uk/gp/product/B000OF2F36

I was using Windows 7 Home Premium SP1 64Bit and an inbuilt card reader on my Toshiba Laptop

delicious-pi
Posts: 20
Joined: Thu Mar 15, 2012 8:49 pm

Re: Formatting/Restoring an SD Card?

Thu Mar 15, 2012 10:06 pm

I was in a similar situation to yours a couple of days ago.

Run the hp disk utility tool and make sure the format is in fat32 and untick the quick format box, returned my card to stock state.

Tool can be found here;

http://www.softpedia.com/get/S.....Tool.shtml

Kernel
Posts: 395
Joined: Sat Mar 03, 2012 12:53 pm

Re: Formatting/Restoring an SD Card?

Thu Mar 15, 2012 10:13 pm

delicious-pi said:


I was in a similar situation to yours a couple of days ago.

Run the hp disk utility tool and make sure the format is in fat32 and untick the quick format box, returned my card to stock state.

Tool can be found here;

http://www.softpedia.com/get/S.....Tool.shtml



ok thanks - just downloaded that too

delicious-pi
Posts: 20
Joined: Thu Mar 15, 2012 8:49 pm

Re: Formatting/Restoring an SD Card?

Thu Mar 15, 2012 10:16 pm

Kernel said:


delicious-pi said:


I was in a similar situation to yours a couple of days ago.

Run the hp disk utility tool and make sure the format is in fat32 and untick the quick format box, returned my card to stock state.

Tool can be found here;

http://www.softpedia.com/get/S.....Tool.shtml


ok thanks - just downloaded that too


Cool, let us know the outcome.

Kernel
Posts: 395
Joined: Sat Mar 03, 2012 12:53 pm

Re: Formatting/Restoring an SD Card?

Thu Mar 15, 2012 10:29 pm

delicious-pi said:

Cool, let us know the outcome.

I think I have had enough for tonight - tomorrow I'll try writing fedora remix again and play around with this tool to wipe it and see what happens

Kernel
Posts: 395
Joined: Sat Mar 03, 2012 12:53 pm

Re: Formatting/Restoring an SD Card?

Fri Mar 16, 2012 12:17 pm

delicious-pi said:

Cool, let us know the outcome.

With SD formatter I started off with:



Then I deleted the partitions from the drive and fomatted it with NTFS (it would only let me do this for 8GB, FAT was limited to 4GB) using EASEUS Partition Manager

Then I started SD Formatter and chose options - FAT32, full (overwrite) and adjustment off - and once it was complete (it took some time) I got this message:



and looking in windows explorer showed me:



Using the HP Disk utility I started with the same card also formatted with fedora remix in the same way:



It looks like this:



I unticked quick format and got (forgot to do it when making 1st screenshot):



Pressing start gave me:



I clicked Yes which led to:



Still going.....



When it was done it said:





and this is what I get in Windows Explorer:



So it would appear that using the HP utility is better as you don't have to mess about with the partitions

However in regards to http://russelldavis.org/2012/0.....n-windows/


The other gotcha you should be aware of is that SD cards are formatted and written to in a slightly "weird" way. An unformatted/blank SD card is actually full of 1's and when you write to it it just flips the appropriate bits to 0. An sd card can read at the bit level but only writes at a block level so you'll end up with areas that can't be used for writing any more as they need to reverse a bit back from a 1 to a 0 to perform the write and deleting/erasing the file won't actually free up all that space as it spans several blocks. So if you are going to use an SD card that you have used before you'll want to format it before using it with the raspberry pi. Don't use the windows formatter with your SD card as although it'll sort of work it won't have set all the bits to 1 instead user the panasonic sd card formatter which you can find at http://panasonic.jp/support/gl.....index.html


I'm not sure if the HP utility formats in the way the author is suggesting would be the best way (via SD Formatter)

Krebsy
Posts: 10
Joined: Thu Sep 20, 2012 2:55 pm

Re: Formatting/Restoring an SD Card?

Wed Oct 03, 2012 12:50 pm

I was tearing my hair out over this earlier as sdformatter wouldn't return the card back to stock state.

The quickest and easiest way I found to do the formatting? I shoved the card into my digital slr (which stated 55mb) and then low level formatted it in there. 30s later it was showing the full 3.96gb...

K.

markb357
Posts: 1
Joined: Sat Aug 30, 2014 10:01 pm

Re: Formatting/Restoring an SD Card?

Sat Aug 30, 2014 10:13 pm

I had to use Windows 7

Code: Select all

diskpart 
tool as described in the first part of these instructions on overclock to clear off the MBR from the card, then remove and reinsert it, before SDFormatter would recognize the full size again.

This was after having the bright idea of using Win32DiskImager to copy my existing 8GB Pi image over to a new 128GB SD card* then trying to mess about with it to avoid having to go through the whole NOOBS process again.
* easier than trying to get hdparm to work with my existing external USB drive

fruitoftheloom
Posts: 23079
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Formatting/Restoring an SD Card?

Sun Aug 31, 2014 4:33 am

markb357 wrote:I had to use Windows 7

Code: Select all

diskpart 
tool as described in the first part of these instructions on overclock to clear off the MBR from the card, then remove and reinsert it, before SDFormatter would recognize the full size again.

This was after having the bright idea of using Win32DiskImager to copy my existing 8GB Pi image over to a new 128GB SD card* then trying to mess about with it to avoid having to go through the whole NOOBS process again.
* easier than trying to get hdparm to work with my existing external USB drive
Response to a nigh on 2 year old thread !
SD Formatter needs to be set with size adjustment ON and it will format full size, there are severel 'newer' posts explaining this :D
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

Return to “General discussion”