Page 1 of 1

How to format your pendrive (Fat32)

Posted: Thu May 13, 2021 8:24 pm
by Truuks99
First we will find out the name of the pendrive/external storage via terminal by passing the command:

# gpart show

My drive is da0.
Now we will erase the format table of the drive as root (or sudo).

# gpart destroy -F /dev/da0

Once this is done we will create a new partition table on the device. We’ll use the MBR partition table
format because FAT32 needs this.

# gpart create -s mbr /dev/da0

When it's done, we will add the file system type to the drive

# gpart add -t fat32 /dev/da0

We will now fill the drive with the fat32 file system blocks.
# newfs_msdos -L FILES -F 32 /dev/da0s1

Done!!