{"id":83,"date":"2014-04-15T15:42:00","date_gmt":"2014-04-15T13:42:00","guid":{"rendered":"http:\/\/www.ncodenicer.com\/?p=83"},"modified":"2026-05-10T20:28:48","modified_gmt":"2026-05-10T18:28:48","slug":"formatting-usb-drive-with-fat32-using-freebsd","status":"publish","type":"post","link":"https:\/\/www.codenicer.com\/?p=83","title":{"rendered":"Formatting USB drive with FAT32 using FreeBSD"},"content":{"rendered":"\n<p>Assuming your usb drive is <code>\/dev\/da0<\/code><\/p>\n\n\n\n<p>Using <code>fdisk<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Zero disk beginning with<br><code>dd if=\/dev\/zero of=\/dev\/da0 bs=2m count=1<\/code><\/li>\n\n\n\n<li>Change first partition type to 12 (FAT32)<br><code>fdisk -i \/dev\/da0<\/code><\/li>\n\n\n\n<li>Initialize fat32 file system<br><code>newfs_msdos -F32 \/dev\/da0s1<\/code><\/li>\n<\/ul>\n\n\n\n<p>Using <code>gpart<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>List existing partitions<br><code>gpart show da0<\/code><\/li>\n\n\n\n<li>Delete existing partitions<br><code>gpart delete -i 1 da0<\/code><br>1 being partition index, you might need to repeat this depending on output from <code>gpart show<\/code><\/li>\n\n\n\n<li>destroy label after deleting all partitions (if you get complaints use <code>gpart destroy -F<\/code> to force destruction)<br><strong><code>gpart destroy da0<\/code><\/strong><\/li>\n\n\n\n<li>create new mbr spanning entire disk<br><code>gpart create -s mbr da0<\/code><\/li>\n\n\n\n<li>create new fat32 partition spanning entire disk<br><code>gpart add -t fat32 da0<\/code><\/li>\n\n\n\n<li>Initialize fat32 file system<br><code>newfs_msdos -F32 \/dev\/da0s1<\/code><\/li>\n<\/ul>\n\n\n\n<p><strong>However<\/strong> if you want GNOME to automount usb drive you shouldn&#8217;t follow instructions above \ud83d\ude42 Instead do this:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Destroy disk labels with<br><code>gpart destroy da0<\/code><br>or zero disk beginning with (might not work in case of GPT)<br><code>dd if=\/dev\/zero of=\/dev\/da0 bs=2m count=1<\/code><\/li>\n\n\n\n<li>Initialize fat32 file system on entire disk without using partition table<br><code>newfs_msdos -F32 \/dev\/da0<\/code><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Assuming your usb drive is \/dev\/da0 Using fdisk: Using gpart: However if you want GNOME to automount usb drive you shouldn&#8217;t follow instructions above \ud83d\ude42 Instead do this:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[62,6,43],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-fat32","tag-freebsd","tag-gnome"],"_links":{"self":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=83"}],"version-history":[{"count":1,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":84,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions\/84"}],"wp:attachment":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}