From owner-freebsd-stable@FreeBSD.ORG Tue Feb 14 20:15:34 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58F69106567B for ; Tue, 14 Feb 2012 20:15:34 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta15.emeryville.ca.mail.comcast.net (qmta15.emeryville.ca.mail.comcast.net [76.96.27.228]) by mx1.freebsd.org (Postfix) with ESMTP id 3913A8FC0A for ; Tue, 14 Feb 2012 20:15:33 +0000 (UTC) Received: from omta19.emeryville.ca.mail.comcast.net ([76.96.30.76]) by qmta15.emeryville.ca.mail.comcast.net with comcast id Zvo51i0031eYJf8AFwFZpB; Tue, 14 Feb 2012 20:15:33 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta19.emeryville.ca.mail.comcast.net with comcast id ZwFX1i01J1t3BNj01wFYdX; Tue, 14 Feb 2012 20:15:33 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 9D6AC102C1E; Tue, 14 Feb 2012 12:15:31 -0800 (PST) Date: Tue, 14 Feb 2012 12:15:31 -0800 From: Jeremy Chadwick To: Devin Teske Message-ID: <20120214201531.GA5698@icarus.home.lan> References: <4F355A5B.9080007@rewt.org.uk> <4F35743B.4020302@os2.kiev.ua> <4F37DBA3.7030304@cran.org.uk> <20120213195554.O46120@sola.nimnet.asn.au> <092c01cceb40$2dc8f240$895ad6c0$@fisglobal.com> <095a01cceb54$04a38fb0$0deaaf10$@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <095a01cceb54$04a38fb0$0deaaf10$@fisglobal.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 'Bruce Cran' , 'Joe Holden' , 'FreeBSD Stable Mailing List' , 'Ian Smith' , 'Alex Samorukov' Subject: Re: New BSD Installer X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2012 20:15:34 -0000 On Tue, Feb 14, 2012 at 12:05:31PM -0800, Devin Teske wrote: > Please don't get rid of fdisk or bsdlabel as they are (and forever will be) > required to do things like: > > 1. scripted formatting of a thumb drive Can't this be done with gpart(8)? There are scripts all over the web and on the lists here showing people using it for that purpose. It doesn't require use of GPT either. > 2. automated probing of disk information (fdisk -p) Can't this be accomplished with "gpart list"? Yes I know the man page doesn't appear to have it documented, but it's there. Furthermore, fdisk -p shows silly things like C/H/S nomenclature; do you really use this? Do you have boards which don't support even the most basic 28-bit LBA addressing? > 3. Other tasks that are not suitably handled by curses-based utilities > > ... > > For example, the following command will create a second Windows partition on a > thumb drive without user interaction: > > echo "p 2 0x0c * *" | fdisk -f - /dev/da0 > > If you take away fdisk, how am I supposed to achieve the above? Again: gpart(8). And before you complain: yes, I am in full agreement that introduction of gpart into the fray should have probably been "more public". The syntax of the gpart commands takes some getting used to as well (some things are hardly intuitive, but eventually make sense once you see them in use). I'm happy to use gpart for scripting, while fdisk/bsdlabel are like pulling teeth. That said, like others, I would be thrilled to see fdisk and bsdlabel/disklabel disappear. However, for that to happen, I really expect gpart to be better documented. Hell, all of the GEOM-based g* utilities should be implemented slightly... differently. It's hard to explain what I mean by this. Play with the geom(8) command sometime to see what I mean. "geom list" says to use "geom list list", etc.. Once you delve into the code to see how it all works it then starts making more sense why the utilities behave this way, but it's completely and entirely non-intuitive to anyone not already familiar with it. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |