Format a USB flash drive using gpart

Thomas Mueller mueller23 at
Sat Jul 7 21:45:26 UTC 2012

> On Sat, 7 Jul 2012 13:15:10 -0400, Carmel wrote:
> > This is probably a dumb question, but does gpart even work on a USB
> > flash drive? I have not been able to figure out how to do it. I want to
> > erase the entire drive and format it for a FreeBSD UFS2 file system.

> In that case, screw slices and partitions 'n stuff. :-)

>         # newfs /dev/da0

> This is all you need (see "man newfs" and "man tunefs" for
> options you might need to optimize utilization, and check
> best fitting options for /etc/fstab, e. g. noatime if you
> are not going to need it).

> Polytropon
> Magdeburg, Germany

I have used gpart to partition a USB flash drive into FreeBSD boot partition, root partition and swap partition.

I ran newfs on the second (root) partition, even installed FreeBSD built from source, and made the flash drive bootable, both for amd64 and i386.

Does a USB flash drive also work as a giant floppy, no partitions?  Can you make a flash drive bootable when nonpartitioned and formatted that way?


More information about the freebsd-questions mailing list