Format a USB flash drive using gpart

Wojciech Puchar wojtek at
Sun Jul 8 07:49:37 UTC 2012

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

making swap partition on USB pendrive is at least stupid. if you won't 
swap at all - wasted space.
If you will it would be so slow and wear USB pendrive so quickly that you 
certainly don't want this.

bsdlabel -w device

bsdabel -e  device and make "a" partition start from 0 to end, 4.2BSD

newfs it

bsdlabel -B

and put everything in one partition.

make heavy use of tmpfs, make sure noatime is put in fstab to limit writes 
to pendrive.

More information about the freebsd-questions mailing list