Formatting a USB stick or external drive into MS-DOS FAT32
file system.
We will be using gpart utility as well as newfs_msdos
Follow these steps, run as root.
1 2 3 4 |
|
Line 1: We will first clear the partition info using dd
command,
make sure you use the right device name: /dev/da0
in my case.
Line 2: Create an MBR
(Master Boot Record) on that device.
Line 3: Add a new mbr partition, we use !11
type for mbr (with proper escaping for BASH),
when I used the mbr type gpart
didn’t recognize it.
Line 4: Constructs a new MS-DOS FAT file system of type 32.