From owner-freebsd-questions@FreeBSD.ORG Fri Sep 3 14:33:22 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 C46301065747 for ; Fri, 3 Sep 2010 14:33:22 +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 554448FC19 for ; Fri, 3 Sep 2010 14:33:22 +0000 (UTC) Received: by fxm4 with SMTP id 4so1290688fxm.13 for ; Fri, 03 Sep 2010 07:33:21 -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=MmFOxNv8fglnFawk5m9OU8R1raa54ahIUCGwfWhhfGI=; b=Fo2y1YdTKCud9VrPKk/3kLI4D14DJ33U6bY64YVZWSUYHrBPY/kDl3GXgjUfNSvjLT aNoIBpIXt+GXHWLlD3lRt8Pevevw7dxfmfosMSqMhFWiDDi0tumjo4qYEnzIe3yFeNxp 9Abtg6RM3j6ABGyxz2Pi0Zl4S0032T16PBtY8= 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=TK2yKNMbyQIJhBU6XWfbY6zjUSZMSzw4BSvJf18J35TauAzlrRMCvAp7qsmyCDyRFs RmoXXSEuaQvkeT1hl0oRC0z9O3JlArtqU3mpJpDOtK9gz8aQiO+0neesz+tWJZyC63Rj CVcIL2no6pnrHGtH4bWm+t9Fe+oRvtiMzoHWQ= MIME-Version: 1.0 Received: by 10.223.121.136 with SMTP id h8mr820635far.17.1283524401309; Fri, 03 Sep 2010 07:33:21 -0700 (PDT) Received: by 10.223.120.147 with HTTP; Fri, 3 Sep 2010 07:33:21 -0700 (PDT) In-Reply-To: <201009031410.o83EAfOB020540@dc.cis.okstate.edu> References: <201009031410.o83EAfOB020540@dc.cis.okstate.edu> Date: Fri, 3 Sep 2010 09:33:21 -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 14:33:23 -0000 On Fri, Sep 3, 2010 at 9:10 AM, Martin McCormick wrote: > I have been writing a script to build a system from a > mfsboot startup and it is going well but I want to revisit part > of the script that I don't think I did a very good job with. > > Is there an automatic way to tell which of the devices > shown in /dev is a likely system drive? This is before anything > is mounted. > > We can usually figure it out ourselves, but is there a > way for a script to figure out automatically which character > device could be the one we are going to put the OS on and use as > our boot drive? > > I know this sounds really obvious and you can tell > scripts not to use /dev/acdx as they are CDROM devices, but > system drives can actually take many different names depending > on whether they are RAIDs SCSI IDE, etc. > > Any good suggestions are appreciated. > Would doing something like: gpart list help? -- Adam Vande More