4

I'm trying to format a MicroSD where I've write Retropie. I'm using an adapter.

I've tried fdisk, gparted, the disk manager and the command shred in Lubuntu.

In Window$ I've tried SD Card Formatter.

All the processes go away and complete without errors but at the end nothing changed.

What should I do?

EDIT: I've tried everything, I think it's grid-locked

zar
  • 81

3 Answers3

1

Personally, I would wipe the disk first and then format it.

To wipe a disk I would use the command

sudo dd if=/dev/zero of=/dev/sdX* bs=1M status=progress

*replace sdX with the target drive location. To get a list of drives and their partitions run lsblk. Ensure that you list just the drive code eg mmblk0/sda and not a partition on that device eg mmblk0p1/sda1

This will overwrite every bit on the disk with 0s however it may take some time. But at the end, there will be nothing on it.

Once the drive has been wiped you should be able to format it as you wish. I would generally use the mkfs command as suggested in Lorenzo's answer. However, if I were to use a graphical tool I would recommend gparted

The 'if' is the part to be copied to the disk and the 'of' is the location to which it is to be written to, the status part means that it will show the progress of the operation as it goes along.

1

I suspect that the SD card is damaged, maybe in a read-only state called 'grid-locked'. It is a first stage of failing. But there are things to check before you give up on the card.

You can continue testing/checking it according to the following link,

Can't format my usb drive. I have already tried with mkdosfs and gparted - Analysis of the problem

sudodus
  • 47,684
0

First run lsblk. Then enter your SD card and run the same command again: the difference between the two outputs will represent your /dev/sdx device.

Once you have recognised the device, run

mkfs -t <type> /dev/sdx

where type can be vfat, ext2, ext3, ext4.

Zanna
  • 72,312