Formatting an SD Card to VFAT on Linux

Brand-new SD cards sometimes need to be formatted to VFAT to work properly on Linux.

sudo fdisk /dev/mmcblk0
> t
select "b" for FAT32
> w

This will convert the first partition to FAT32 and write the new partition table to the SD card.

Make sure to select the top-level disk with fdisk, and not one partition, such as /dev/mmcblk0p1.

To reformat, run this.

sudo mkfs.vfat /dev/mmcblk0p1

The disk is now ready to be used.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s