Ubuntu – Absolutely can NOT format this sd micro card

formatsd card

Have been reading and trying to format this sd card (no, the switch is unlocked). I have Ubuntu 12.04, the card is in a hub. The name for the card in my file menu is MOT (if that helps at all) there is no info I want to save (would be fine scraping and re-formatting if easier), this is the ONLY item on the card It is not mounted, what else?? I have been reading and performing any number of tasks, TRYING to get this card to work. Now its ba principle thing. I should perhaps just junk the card (its only a 4gb sandisk,,prob about 5-6 bucks anywhere)

Here is my terminal readout:

christine@christine-laptop:~$ sudo umount /dev/sdb
[sudo] password for username: 
umount: /dev/sdb: not mounted
username@username-laptop:~$ sudo mkfs.vfat -n 'Ubuntu' -I /dev/sdb
mkfs.vfat 3.0.12 (29 Oct 2011)
mkfs.vfat: unable to open /dev/sdb: Device or resource busy
username@username-laptop:~$ sudo dmsetup ls
No devices found
username@username-laptop:~$ mkdosfs -F 32 -v /dev/sdb
mkdosfs 3.0.12 (29 Oct 2011)
mkdosfs: unable to open /dev/sdb: Device or resource busy
username@username-laptop:~$ 

This all started because I could not write to the card from my laptop.

I have tried using gpart and superuser and on and on. I cannot even remember everything I have read and tried, nothing works, please, help. Thanks for your time.

PS, This card was originally in my phone for months before I decided to buy and use a jambox, and therefore needed mobile tunes in a bluetooth device. I have been able to figure out how to put the music I wanted on the phone on the installed micro card so the phone and other cards work fine. when the card is IN my phone,,much easier. but still, I would like to format and use this card.

Best Answer

sudo dd if=/dev/zero of=/dev/sdb bs=512 seek=1

This will erase the entire sd card. You could create a partition using fdisk

sudo fdisk /dev/sdb

Options n, p, 1 and ENTER twice and finally save the setup using w and q to quit from fdisk

mkfs.ext4 /dev/sdb1
mount /dev/sdb1 /mnt

And you should be able to play around from /mnt as your mount point

Related Question