the mkfs message is quite normal (depending on circumstance), it probably just means something else is using the device and mkfs doesn't like that. It is not a hardware issue
(not to mention, using mkfs like this is wrong anyhow[*] . you don't want a filesystem on that card, not like this; you want your image which makes a bootloader, kernel image, three partitions with three filesystems, ...)
in modern linux environment that is catering to end users ( Ubuntu et al. ) you sometimes have to fight the system, i.e. you put in a card and stuff gets automounted for you.
and that's bad since you don't want it to be mounted at all.
mounting is what makes the device busy and then you can't format, and if you dd an image onto it, the mounted filesystem will just write data back and thus corrupt the image you just wrote
so you have to make sure the device is not in use first before dumping an image on it
[*] When you connect the Kobo to USB, you get a /dev/sdx device which is the FAT partition only. If you want to force a factory reset, you could mkfs.vfat that device. That's probably where this command is coming from.
However when dealing with the SD card directly, you'll see what Kobo is hiding from you, i.e. partitions and all that. The device that holds a FAT filesystem would then be /dev/sdx3, not /dev/sdx (if it's the internal card; for external card slot, it would be /dev/sdx1)
----
Roughly:
Code:
Attempt to make the device un-used if mounted:
# grep /dev/sdx /proc/mounts
# umount /dev/sdx*
Wipe the old stuff:
# wipefs -a /dev/sdx[0-9]*
# wipefs -a /dev/sdx
Put the image:
# dd bs=1M status=progress if=kobo.sdcard.img of=/dev/sdx
# sync
Unplug.
Optional verification step:
# cmp kobo.sdcard.img /dev/sdx && echo OK
should say OK or EOF on kobo.sdcard.img