Create a fat partition on a flash free space

Hi,

I have usb flash:
Code:
# gpart show da0
=>       0  15730688  da0  BSD  (7.5G)
         0   1221504    1  freebsd-ufs  (596M)
   1221504   2097152    2  freebsd-ufs  (1.0G)
   3318656  12412032       - free -  (5.9G)

I want to create a fat partition with 4G size on the free partition. I enter this commad:
Code:
# gpart add -t fat32 -s 4G da0

It has error
Code:
gpart: Invalid argument


How should I do this?
 
Your partitioning is off. You used a bsdlabel(8) for a so-called "dangerously dedicated" layout.. When you use BSD labels you should have created an MBR slice first, then create the BSD labels inside the slice. A bsdlabel(8) only supports UFS, ZFS and swap. The only way to fix this is to re-partition it correctly (destroying the existing partitions). Partition it with MBR or GPT.
 
Back
Top