0

I'm in a similar situation to the one d3vid was in. I'm trying to reformat my SD card because I believe that's what's making it so hard for my computer to recognize it. Gnome Disk Utility recognizes the SD card but every time I try to format the card it returns a new error. I ran ls -la /dev/sd* before and after inserting the card and there was no difference between the outputs. It's like some parts of the computer can recognize the card and others can't...

When I tried to format it as FAT without overwriting the contents disk utility gave the error Error creating file system: Command-line 'mkfs.vfat -I -n "RASP" "/dev/mmcblk0"' exited with non-zero exit status 1: stdout: 'mkfs.fat 3.0.28 (2015-05-16) ' stderr: 'mkfs.vfat: failed whilst writing reserved sector ' (udisks-error-quark, 0)

When I tried overwriting the contents first it gave: Error erasing device: Error writing 1048576 bytes to /dev/mmcblk0: Input/output error (udisks-error-quark, 0)

lsblk showed the disk. sudo blkid did not. How can I wipe or format it?

1
  • I think you need to run ls -la /dev/mmcblk* instead of ls -la /dev/sd* ?
    – mchid
    Jun 3, 2016 at 16:36

1 Answer 1

0

You should be using device mmcblk0p1 (partition 1) on the device to format. By now, you probably have wiped out the partition table, so first thing, use a disk utility to put a new partition table on it with one partition. Then you can mount that partition (not the whole device) and format it.


The mkfs.vfat -I command does not make a partition, it just forces the creation of the filesystem as specified on the whole device. Without the -I, you'd get the error (paraphrasing): "you really don't want to do this". Now the error you get about writing a reserved sector may be a complaint about putting a filesystem over the partition table (sector 0?). I could do this on an old card I had, but maybe your card is smarter and rejects such actions.

While such actions as writing to the device instead of a partition on the device should be allowed, It looks like in your case, you have found something which prevents it. OK, so just do things the expected way and put a partition table on the device, make a partiton, and format it FAT.

1
  • The command should have worked to create a single partition on the device instead as the op used the -I flag
    – mchid
    Jun 3, 2016 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .