I try to make sd card with raspbian software, but on my windows PC from work i don't have enough permissions to do it. Unfortunately it formatted into multiple partitions. Now i can see only one in Mac Disk Utility with 300 MB (sd card have 64GB). Somebody has idea how to fix it back to get full space?
-
Does this answer your question? Can't reformat SD card (Yosemite) heck, the question contains some solutions. @yardi– ankiCommented Jan 25, 2020 at 23:15
-
Using disk utility didn't work for me so I did using terminal and here is the best solution worked for me easeus.com/mac-file-recovery/format-sd-card-mac.html#3– Nooruddin LakhaniCommented Jan 24 at 6:49
3 Answers
This will erase all data* that currently exists on the SD card:
- Remove your SD card.
- Open Disk Utility.
- In the menu bar, click [View] > [Show All Devices].
- Insert your SD card, ensuring the write-lock switch is in the unlocked position (towards the side of the card which has the gold contacts). You should see your SD card appear in the sidebar in Disk Utility as something like "Apple SDXC Reader Media". Click this item.
- Click [Erase] in the top bar.
- Enter a name of your choosing.
- For the format, choose "MS-DOS (FAT)".
- For the scheme, choose "Master Boot Record".
- Click [Security Options...], move the slider to "Fastest", then click "OK".
- Click [Erase].
* As Ralph Bolton points out in the comments, this doesn't make the data completely unrecoverable; data recovery tools can easily get the erased data back. I just wanted to put a warning at the start that formatting effectively deletes everything, so before formatting, at least make sure you have a backup of any data that you still want. If you don't want the data to be recoverable, then you should set the [Security Options...] slider to something other than "Fastest".
-
1Just to be super-clear: "Fastest" mode doesn't actually erase the data on the device, it just removes the pointers to the data. This is enough for personal use, but if you're giving the device to someone else, select at least one notch up from "fastest" so that the underlying data is actually erased as well. Commented Jan 4, 2022 at 9:29
-
This is the key part for me to format a Linux partitioned/formatted SD card -
In the menu bar, click [View] > [Show All Devices].
– ibicCommented Feb 10, 2022 at 4:31
Sometimes window partitions on drives can be tricky and difficult for a Mac to erase, like the windows protected boot partition. Same goes for linux. That being said, if you really want to "Clean and reset" your SD card you could zero it using the dd utility in terminal.
- Open up the terminal app in Mac OS.
- Type Diskutil list.
- Find the external drive that you want to erase (it should be labeled
/dev/diskX
with "X" being the number of your drive that you want to erase. Then use the dd command on the DRIVE YOU WANT TO ERASE: Warning, this will completely erase everything!
sudo dd if=/dev/zero of=/dev/diskX bs=1m
Wait for the DD command to show a completion message.
Now reformat the drive in disk utility and full space should be restored.
-
2This is unadvisable for simply re-formatting a disk, since it overwrites the entire disk. As such, it is extremely slow and also significantly reduces the lifetime of flash media such as SD cards. It is akin to using the second fastest option in the Disk Utility "Security options" when erasing (one pass of zeroes). Zeroing the first 17KiB of the disk will suffice to wipe the partition table, so e.g. appending
count=1
to thisdd
command suffices and is almost instant. macOS will then prompt you to "initialise" the drive. Commented Jan 26, 2020 at 13:44 -
2If you really want to use the terminal, there is
diskutil eraseDisk
, e.g.diskutil eraseDisk FAT32 "My Disk" MBR diskX
performs the same task outlined in my answer. Commented Jan 26, 2020 at 13:45
Disk Utility refused to create more than one partition for me. I finally figured out how to do this for my camera that can only recognize up to 64GB.
IMPORTANT: disk4
may not be the right disk on your system! Make sure to use the command diskutil list
to get the correct identifier for your SD card or you may break your other disks doing this!
This is the command I used in terminal:
sudo diskutil partitionDisk disk4 2 FAT32 CameraData 64G FAT32 UnusedExtra R
That command partitions the SD card located at "disk4" into 2 partitions, with the first being 64GB of Fat32 named "CameraData", and the second partition using up the remainder ("R") of the space and being named "UnusedExtra".