Date: Sun, 8 Jul 2012 07:41:59 -0400 From: Carmel <carmel_ny@hotmail.com> To: FreeBSD <freebsd-questions@freebsd.org> Subject: Re: Format a USB flash drive using gpart Message-ID: <BLU0-SMTP10303882837C7BA6EAE3BDE93EC0@phx.gbl> In-Reply-To: <alpine.BSF.2.00.1207072029150.45162@wonkity.com> References: <BLU0-SMTP96EE9BFC96D3D905EA7D7493ED0@phx.gbl> <alpine.BSF.2.00.1207072029150.45162@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 7 Jul 2012 20:36:36 -0600 (MDT) Warren Block articulated: > On Sat, 7 Jul 2012, 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. > > Yes, gpart will work with pretty much any storage device. > > If you want the drive to be bootable, it needs boot blocks. This is > easier with GPT than MBR. For an 8G drive: > > # gpart create -s gpt da0 > # gpart add -t freebsd-boot -s 512k da0 > # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0 > # gpart add -t freebsd-ufs -b 1M -s 7G da0 > # gpart add -t freebsd-swap da0 > # newfs -U /dev/da0p2 Thanks Warren, you win the prize for the most detailed answer. Polytropon gave me the easiest answer if I just want to use the drive as a simple storage device; however, if at some point I actually want to go beyond that your answer is what I would require. Interestingly enough, I searched through the man pages and FreeBSD help but never came across anything that specifically addressed flash drive. Perhaps I was just not looking hard enough. Perhaps, and I know that this will offend some purists, but a nice GUI that would do what your instructions detail above would be helpful. There is no way that I am going to remember all of those instructions in six months time. Just my 2¢. -- Carmel ✌ carmel_ny@hotmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLU0-SMTP10303882837C7BA6EAE3BDE93EC0>