From owner-freebsd-questions@FreeBSD.ORG Fri Sep 3 15:41:14 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7F2A1065895 for ; Fri, 3 Sep 2010 15:41:14 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 58DD48FC22 for ; Fri, 3 Sep 2010 15:41:13 +0000 (UTC) Received: by fxm4 with SMTP id 4so1368262fxm.13 for ; Fri, 03 Sep 2010 08:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=AEp//7DwwMSXfUSeKqjHO70f9lfvc4JLtDHzt2jPIes=; b=mm3adefMxwQ/w6vIk0fXfSHEBo4NAtTWXdJzvI6J3FF//G7XEoCldbv7XFSYHFORnT 1CVsbnGXnHds/Nfjd9dWRZVf9qE+TdfY/FZt7sDF2cvjnzEEq8bIwggJO1av6Of2R/xl qa+KyGJF8oQ7HDZoUwxIIMDYh2hh7c9rdyQL0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=W8ztWrdr9m/1W3x501txoCAd+tqjvrAzB+s5NZ1DDOCAI2wHHqb/X6ynegqaK1h4sC 5JKCzFSInJh/rLrfLrv22d9P4VQr06UTomaOLqQ46HMNdey+Sd6GZaPL0bO4eqFMPVo1 e24SzoEl3UGQjuxIJbQpi8FDdGMzI9+vVYBUw= MIME-Version: 1.0 Received: by 10.223.116.6 with SMTP id k6mr28880faq.49.1283528473178; Fri, 03 Sep 2010 08:41:13 -0700 (PDT) Received: by 10.223.120.147 with HTTP; Fri, 3 Sep 2010 08:41:13 -0700 (PDT) In-Reply-To: <201009031504.o83F4Hdt097382@x.it.okstate.edu> References: <201009031504.o83F4Hdt097382@x.it.okstate.edu> Date: Fri, 3 Sep 2010 10:41:13 -0500 Message-ID: From: Adam Vande More To: Martin McCormick Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Boot Drive Nomenclature and How to Figure it out X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2010 15:41:15 -0000 On Fri, Sep 3, 2010 at 10:04 AM, Martin McCormick wrote: > Thank you. I have never heard of gpart before so I gave > it a try and that helps very much if the drive is already > formatted. Most of these drives I plan to encounter will be > formatted so this basically solves the problem but it raises a > new question. If one does > > gpart list as suggested and the disk is formatted, one gets > exactly the information necessary. I believe it is even the > first line of output. It doesn't get better than that. If the > disk is not corrected formatted such as might happen with > corruption or maybe a new drive, gpart list executes silently > and prints nothing on the output. > > As I said, you answered my question so many thanks. The > new question might best be put: > > Okay, if nothing is there, where did gpart look to see nothing? > I believe gpart checks the geom sector which the last one of a particular geom class. The sector is written anytime the geom device is added or updated. This applies only to geom devices which are hardcoded. For example, /dev/ad0 and /dev/ad0p1 would both be seperate geom classes and have their own meta-data sector. FWIW, the only suitable hard disk devices I know of are: /dev/ad{0-9} /dev/ada{0-9} /dev/da{0-9} If you're writing a test, I would probably grep dmesg for the presence of one of them. The first device appearance is probably a prime candidate for installation target. -- Adam Vande More