Hello,
I have my Raspberry Pi with a corrupted SD card. I need to remove all partitions and reformat the card and install the OS from the scratch. What OS can I use to do this? I tried Windows and Mac and I could not delete the partitions via these OSs.
Please help!
Thanks!
Alex.
[moderator, just use Balena Etcher works fine on a Mac or Windows PC to install Raspbian, and there is no need for fromatting]
-
- Posts: 3
- Joined: Wed Apr 05, 2017 7:39 pm
Re: Re-formatting the SD card
Is it really necessary to delete the partitions? I have never been in this particular situation, but it seems to me that if you just go ahead and format, the formatting would wipe out all the partitions - then you could just set up new ones.
Ron
Ron
Re: Re-formatting the SD card
Try formating the card with a digital camera or camcorder.
ghans
ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Re: Re-formatting the SD card
If you don't need noobs, simply put the new OS on the card without formatting it first.
https://www.raspberrypi.org/downloads/raspbian/
and follow the instructions (which work on Windows, Mac, or Linux - probably easiest on Linux as the tools are standard).
There is never any need to delete partitions or format the card as the direct install simply overwrites everything.
https://www.raspberrypi.org/downloads/raspbian/
and follow the instructions (which work on Windows, Mac, or Linux - probably easiest on Linux as the tools are standard).
There is never any need to delete partitions or format the card as the direct install simply overwrites everything.
Re: Re-formatting the SD card
I like the digital camera method and that has worked well for me, however there is quite a nice guide on using a tool in windows here
http://www.raspberrypi-spy.co.uk/2015/0 ... formatter/
http://www.raspberrypi-spy.co.uk/2015/0 ... formatter/
-
- Posts: 3
- Joined: Wed Apr 05, 2017 7:39 pm
Re: Re-formatting the SD card
Thank you very much everyone!
I tried using my camera and it is still showing the folders/files
I am thinking the card is corrupted at this point.
I tried using my camera and it is still showing the folders/files

I am thinking the card is corrupted at this point.
Re: Re-formatting the SD card
I think your sd is readonly becouse corrupted
Re: Re-formatting the SD card
Did you download and run the SDFormatter program linked in the previous post by @Forrrge?
-
- Posts: 3
- Joined: Wed Apr 05, 2017 7:39 pm
Re: Re-formatting the SD card
Let me try that @memilanuk
Re: Re-formatting the SD card
If it's merely the case that the filesystems are jumbled and you want to start over, I highly recommend Etcher, as it's a one-step operation: you point it at the card (it'll probably detect it on its own) and the OS image you want to use, and it does the rest, formatting and setting up the proper partitions and installing the OS (I've used it from macOS, though it's available for Windows and Linux as well).
If the card itself is corrupt, you would be much better off if you draw a big red "X" on that card and set it aside or throw it out, and start over with a new card. When the underlying mechanisms in the card itself go bad, there's no good way to fix that, and you risk losing your data later if you continue to rely on it.
And yes, it can be hard to tell those two failure modes apart. Choose carefully.
If the card itself is corrupt, you would be much better off if you draw a big red "X" on that card and set it aside or throw it out, and start over with a new card. When the underlying mechanisms in the card itself go bad, there's no good way to fix that, and you risk losing your data later if you continue to rely on it.
And yes, it can be hard to tell those two failure modes apart. Choose carefully.
Re: Re-formatting the SD card
While the steps in this post is not necessary to install a new image, as the above post said, you could directly write a new image to overwhite the old one. I'm posting for saying it's possible to reformat with Linux. (maybe MacOS also? I dont know)
To erase the card:
sudo dd if=/dev/zero of=/dev/mmcblk0 bs=16M
This would completely erase the card, however usually we could just erase the very beginning part of the card, so that those left content have no index to look up, just like being erased. To do so we could add a count=4 option to the command line, to erase the first 64MB.
Then we make a partition:
sudo fdisk /dev/mmcblk0
press n
enter enter enter until it says done
press w, enter
Lastly, create a file system:
sudo mkfs.ext4 /dev/mmcblk0p1
Done with a freash new card.
To erase the card:
sudo dd if=/dev/zero of=/dev/mmcblk0 bs=16M
This would completely erase the card, however usually we could just erase the very beginning part of the card, so that those left content have no index to look up, just like being erased. To do so we could add a count=4 option to the command line, to erase the first 64MB.
Then we make a partition:
sudo fdisk /dev/mmcblk0
press n
enter enter enter until it says done
press w, enter
Lastly, create a file system:
sudo mkfs.ext4 /dev/mmcblk0p1
Done with a freash new card.
Re: Re-formatting the SD card
You can use a live version of a Linux distribution. Linux Mint is my choice. You boot Linux from a USB stick and use Linux tools such as Gparted. I have a small USB stick, 8 GB, with Gparted set up ready to fix disk problems for the other operating systems you mentioned.
-
- Posts: 5
- Joined: Wed Jul 04, 2018 1:50 pm
Re: Re-formatting the SD card
Hate to dredge up this OLD post, but I find myself reflashing my card as I work through something at the moment.
One thing I've noticed is once I have raspbian on the card, my mac refuses to see the card in the build-in sd card reader slot.
However, on an old DELL 10v I have running Ubuntu, I'm able to reformat and then I can use etcher on my mac.
What is the approved/proper way to reformat these cards, from a mac, once you've chosen raspbian?
One thing I've noticed is once I have raspbian on the card, my mac refuses to see the card in the build-in sd card reader slot.
However, on an old DELL 10v I have running Ubuntu, I'm able to reformat and then I can use etcher on my mac.
What is the approved/proper way to reformat these cards, from a mac, once you've chosen raspbian?
- DougieLawson
- Posts: 42213
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Re-formatting the SD card
Stick it in a camera, a tablet or a phone and get one of those devices to reformat.
Stick it in a Linux system (like a Raspberry Pi booted from another SDCard) in a USB reader and use fdisk / parted / gparted / cp / dd / mke2fs / mkfs.fat / mkdosfs (pick your poison) to do whatever's needed.
Stick it in a Linux system (like a Raspberry Pi booted from another SDCard) in a USB reader and use fdisk / parted / gparted / cp / dd / mke2fs / mkfs.fat / mkdosfs (pick your poison) to do whatever's needed.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Re-formatting the SD card
Does it need formatting before etcher ? Does etcher just overwrite everything?eciramella wrote: ↑Thu Nov 01, 2018 2:48 pmHate to dredge up this OLD post, but I find myself reflashing my card as I work through something at the moment.
One thing I've noticed is once I have raspbian on the card, my mac refuses to see the card in the build-in sd card reader slot.
However, on an old DELL 10v I have running Ubuntu, I'm able to reformat and then I can use etcher on my mac.
What is the approved/proper way to reformat these cards, from a mac, once you've chosen raspbian?
Re: Re-formatting the SD card
No it does not need formatting before using Etcher.Etcher is going to blow away whatever formatting was there before.
Slava Ukrayini.
-
- Posts: 5
- Joined: Wed Jul 04, 2018 1:50 pm
Re: Re-formatting the SD card
I wish - reformatting it via my Cannon didn't make etcher see it one bit. I'm really searching for a way to do this without several different computers/devices....DougieLawson wrote: ↑Thu Nov 01, 2018 3:25 pmStick it in a camera, a tablet or a phone and get one of those devices to reformat.
Stick it in a Linux system (like a Raspberry Pi booted from another SDCard) in a USB reader and use fdisk / parted / gparted / cp / dd / mke2fs / mkfs.fat / mkdosfs (pick your poison) to do whatever's needed.
-
- Posts: 5
- Joined: Wed Jul 04, 2018 1:50 pm
Re: Re-formatting the SD card
Etcher is weird; there is no need to use it.
Just use "unzip", like this:
# unzip -cq /path/to/raspbian_image.zip > /dev/sdX
where /dev/sdX is the device file for the SD card.
The point of this post is that while there may be some cause for using Etcher (or Win32DiskImager or whatever) the *first* time you set up a Pi - once you are "in the game", it is much easier to use another Pi (or any other available Linux machine) to do the unzipping of the image file to make a new bootable SD card.
P.S. Instead of "-cq", I guess you can also use "-p" - which means the same thing. I have never tried this.
Just use "unzip", like this:
# unzip -cq /path/to/raspbian_image.zip > /dev/sdX
where /dev/sdX is the device file for the SD card.
The point of this post is that while there may be some cause for using Etcher (or Win32DiskImager or whatever) the *first* time you set up a Pi - once you are "in the game", it is much easier to use another Pi (or any other available Linux machine) to do the unzipping of the image file to make a new bootable SD card.
P.S. Instead of "-cq", I guess you can also use "-p" - which means the same thing. I have never tried this.
"L'enfer, c'est les autres"
G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:
Epmu Sn!
J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!
G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:
Epmu Sn!
J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!
Re: Re-formatting the SD card
I found my windows laptop was similar with Win32diskmanager, putting it in a usb adaptor instead of the SD card slot fixed it.eciramella wrote: ↑Thu Nov 01, 2018 5:56 pmEtcher simply does not recognize there is a card in the slot....
Re: Re-formatting the SD card
Sounds to me like the problem is not with Etcher or whatever.
If the operating system does not recognize and SD card plugged into whatever card reader then of course the likes of Etcher cannot see it either.
If the operating system does not recognize and SD card plugged into whatever card reader then of course the likes of Etcher cannot see it either.
Slava Ukrayini.
Re: Re-formatting the SD card
Not really.
The implication is that once he formats it (on some other machine - not the Mac), then (and only then) the Mac recognizes it. So, the OS sees it - but not until after the card has been formatted. When all is said and done, this is probably a Mac problem. In its infinite wisdom, OSX is probably refusing to recognize something it "doesn't like".
I know it is unfashionable to say this, but this is the sort of situation where NOOBS (Actually, PINN) would be a good idea. PINN is well setup to handle frequent OS "refreshes" (And does it on the Pi itself, eliminating dependencies on other computers and/or OSes).
Quote:
However, on an old DELL 10v I have running Ubuntu, I'm able to reformat and then I can use etcher on my mac.
"L'enfer, c'est les autres"
G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:
Epmu Sn!
J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!
G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:
Epmu Sn!
J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!
Re: Re-formatting the SD card
Does it show up in disk manager at all?eciramella wrote: ↑Thu Nov 01, 2018 2:48 pmHate to dredge up this OLD post, but I find myself reflashing my card as I work through something at the moment.
One thing I've noticed is once I have raspbian on the card, my mac refuses to see the card in the build-in sd card reader slot.
However, on an old DELL 10v I have running Ubuntu, I'm able to reformat and then I can use etcher on my mac.
What is the approved/proper way to reformat these cards, from a mac, once you've chosen raspbian?
I sometimes see faulty drives show as a controller with no disk partitions here and then use the secure erase option at the lowest secure setting (one move right) to check every sector on the drive / card.
Re: Re-formatting the SD card
n67,
Excellent.
Bottom line for me is that is an OS cannot see a block storage device as a block storage device, no matter what formatting it may or may not have on it, then there is something wrong.
So you disagree with what I said.Not really.
Ah, but now you agree with what I said....this is probably a Mac problem
Excellent.
Bottom line for me is that is an OS cannot see a block storage device as a block storage device, no matter what formatting it may or may not have on it, then there is something wrong.
Slava Ukrayini.
- HawaiianPi
- Posts: 7309
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: Re-formatting the SD card
Have you tried a USB card reader?eciramella wrote: ↑Thu Nov 01, 2018 2:48 pm... my mac refuses to see the card in the build-in sd card reader slot.
I've found the built-in slots on some computers don't always behave as expected.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?