Error formatting SD card


Can you open the disk in Gparted, then highlight the disk entry by clicking on it- right click and select “Unmount.”
Right click and you should see the “Format To” option accessible, click that and select how you want to format it and proceed.
Please update this thread if the above does not work.

it doesn’t give me the option to unmount it!! only to format

You can unmount from command line:

sudo umount -f /dev/mmcblk0p1

it says : umount: /dev/mmcblk0p1: not mounted.

Ok. Now click on the disk entry in Gparted. Click the - Button to delete the partition.
It should show the entry now as Free Space.
Click on the Free Space entry and then click the + button to add (create) the partition. From there, select to Format and how to format (ext4 or whatever you choose.)

still didn’t work!!

Is it the same error again?
Or something new?

The above steps should work if the disk is Undamaged and has no corruption.

the same error!

Can you umount the USB and then open a terminal and run

badblocks -w -s -o error.log /dev/mmcblk0p1

no I can’t unmount it! it does not give me that option

Above, you said this:

When I said 'can you umount,' I mean only ensure it is not mounted.
Then, in terminal run

badblocks -w -s -o error.log /dev/mmcblk0p1

it says : badblocks: Permission denied while trying to determine device size

Ok, try

sudo badblocks -w -s -o error.log /dev/mmcblk0p1

it’s been loading for a while and now it gives me this:
image

Looks good- that means no bad blocks.

What filesystem or formatting was (or is) currently on that USB stick? NTFS (Used by Windows)?

gparted says it unknown

Well, no bad blocks does not mean the cells are all good.
The only suggestion I can make at this point is to completely zap the drive of all data and try formatting in gparted, again. Be warned: This command is dangerous like rm -rf: it will wipe All Data from the drive it is used on.

sudo dd if=/dev/zero of=/dev/mmcblk0p1 bs=1M count=1

IF that fails, then your USB stick may have a date with the trashcan.

didn’t work still have the same problem, sorry for taking your time.

@Aravisian Title of this thread refers to SD card not USB stick. I dont know if that makes a difference. I would not have thought so, but maybe.

1 Like