From owner-freebsd-questions@FreeBSD.ORG Sun Jul 8 11:42:08 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94B01106566C for ; Sun, 8 Jul 2012 11:42:08 +0000 (UTC) (envelope-from carmel_ny@hotmail.com) Received: from blu0-omc4-s11.blu0.hotmail.com (blu0-omc4-s11.blu0.hotmail.com [65.55.111.150]) by mx1.freebsd.org (Postfix) with ESMTP id 47B7F8FC12 for ; Sun, 8 Jul 2012 11:42:08 +0000 (UTC) Received: from BLU0-SMTP103 ([65.55.111.136]) by blu0-omc4-s11.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 8 Jul 2012 04:42:02 -0700 X-Originating-IP: [76.182.104.150] X-Originating-Email: [carmel_ny@hotmail.com] Message-ID: Received: from scorpio.seibercom.net ([76.182.104.150]) by BLU0-SMTP103.blu0.hotmail.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 8 Jul 2012 04:42:01 -0700 Received: from scorpio (localhost [127.0.0.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: carmel_ny@scorpio.seibercom.net) by scorpio.seibercom.net (Postfix) with ESMTPSA id 3WVSSm2N85z2CG67 for ; Sun, 8 Jul 2012 07:42:00 -0400 (EDT) Date: Sun, 8 Jul 2012 07:41:59 -0400 From: Carmel To: FreeBSD In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd8.3) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUAAABYRlwJCw4FAgAIBwKprDkBAQFQLR0BAgCir7VRttp8AAACAUlEQVQ4jZWUTYvbMBCGTVl8V2hX6Gg5G5FbWQdBj0lEfE7BhN4cyzi5Wt1E5L70roWy6N92xok/skkP+5IYrMcz78xIduDWpNM3vFzuA/jX5EY1AI6KHFwW/CzFuQAwqUBbV12p+CzIh6Awq7sg33pn5D64SQXAexffeuQlA/L35RrkaB551OjGfP/cAO8mCNaDcgvfky5ijoD0pAXlCQCnljiAjsJD9Ax05Ko5sZxbnLQcmM+dZg5IjREfZrWIHK0JuwU68pAGwHvfRxBundRzTxxz3r9dNUikPsEihjz2Dc4kjp1hKsJGuot4EDxaxzMoC7XqhxhOSfZrTS6gSX1JVdjp+o1PvWfekXgw3WL0g70nDEwA0H0HQsEZc8sTmFMTkWUfYWC/vdR1zQy3xLQgLwzu90QnlnFLjeiGWBjwhb4Sa42IqOg2qqS4O1/zhKokFUb1Q8Rj4Eb69WVflXEehJ35DgChVTE5n50eaGyMLOfH8AOodoSM4PVYAQgQdBulOa+knklYks3vAuQ+uX492lTl+A+e8qBV2AKoXalVKFfyuUp0pUp1ARaUHh82lv9MN+Ig7CZtgE6FNYvjlywT2VP2dMgOG46gTIWcqdfvuwyXNz0oMJNd/N5lh1YNiJt19ADTUo3VuFSNeQwVqRSrGjSCp53fk2g+Mvfk/gfoPxHeUS8MH9vRAAAAAElFTkSuQmCC MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 08 Jul 2012 11:42:01.0959 (UTC) FILETIME=[B0B31F70:01CD5CFE] Subject: Re: Format a USB flash drive using gpart X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: FreeBSD List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 11:42:08 -0000 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