Find the name of the SD card. (ex> /dev/sdd in my case. You must enter your own SD card device name.)
sudo fdisk -l
If SD card is already mounted, unmount it.
sudo umount [/dev/sdd]
- Remove partition.
sudo fdisk [/dev/sdd]
You can delete partition by entering d. (Refer to following info.)
m: help. d: delete partition. p: print current partition information. n: make new partition. w: save and exit.
- Format SD card.
sudo mkfs.ext2 [/dev/sdd]
- Mount your SD card.