From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:29:23 2010 Return-Path: Delivered-To: geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DDAC106564A for ; Thu, 27 May 2010 22:29:23 +0000 (UTC) (envelope-from rick@svn.kiwi-computer.com) Received: from svn.kiwi-computer.com (174-20-208-22.mpls.qwest.net [174.20.208.22]) by mx1.freebsd.org (Postfix) with SMTP id 298D18FC14 for ; Thu, 27 May 2010 22:29:22 +0000 (UTC) Received: (qmail 83060 invoked by uid 2000); 27 May 2010 22:02:41 -0000 Date: Thu, 27 May 2010 17:02:41 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20100527220241.GA82995@kay.kiwi-computer.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: geom@freebsd.org Subject: Re: Getting useful diagnostics from geom(8) and friends X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2009@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2010 22:29:23 -0000 On Thu, May 27, 2010 at 02:48:48PM -0700, Garrett Cooper wrote: > Hi again geom folks, > I tried executing the following commands in a script to create a > clean MBR partition and it's not clear to me where I'm messing up with > the process in the first step: > > % gpart add -b 34 -s 128 -t freebsd ad4 # exits with a non-zero code > gpart: 22 geom 'ad4' > > % gpart create -s MBR ad4 > gpart: 22 scheme 'MBR' Don't you want to run "gpart create" before "gpart add"? > % gpart bootcode -p /boot/boot0 -i 1 ad4 > gpart: No such geom: ad4. I noticed weird errors like that before; I've since always use the full dev path, i.e. "/dev/ad4". I believe it was with bootcode that I first saw the problem. I'm not sure what you're doing wrong. Do the following steps work? % gpart create -s MBR /dev/ad4 % gpart bootcode -b /boot/boot0 /dev/ad4 % gpart add -b 34 -s 128 -t freebsd /dev/ad4 % gpart bootcode -p /boot/gptboot -i 1 /dev/ad0 -- Rick C. Petty