Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2012 12:15:31 -0800
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Devin Teske <devin.teske@fisglobal.com>
Cc:        'Bruce Cran' <bruce@cran.org.uk>, 'Joe Holden' <lists@rewt.org.uk>, 'FreeBSD Stable Mailing List' <freebsd-stable@freebsd.org>, 'Ian Smith' <smithi@nimnet.asn.au>, 'Alex Samorukov' <ml@os2.kiev.ua>
Subject:   Re: New BSD Installer
Message-ID:  <20120214201531.GA5698@icarus.home.lan>
In-Reply-To: <095a01cceb54$04a38fb0$0deaaf10$@fisglobal.com>
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> <CAN6yY1uVhXMntWaK=P4dPrKY3aLR2fsKMWfS7Ncvpwy-XKM31Q@mail.gmail.com> <095a01cceb54$04a38fb0$0deaaf10$@fisglobal.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120214201531.GA5698>