sudo dd if=/dev/zero of=/dev/sdb bs=4k && sync
sudo fdisk /dev/sdb
Then press lettero
to create a new empty DOS partition table.
- Press letter
n
to add a new partition. You will be prompted for the size of the partition. Making a primary partition when prompted, if you are not sure. - Then press letter
w
to write table to disk and exit.
See what is your new partition with a command lsblk
In my case it is /dev/sdb1
sudo mkfs.vfat /dev/sdb1
sudo eject /dev/sdb