From owner-freebsd-stable@FreeBSD.ORG Fri Aug 26 20:47:34 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D5D316A41F for ; Fri, 26 Aug 2005 20:47:34 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0A1343D46 for ; Fri, 26 Aug 2005 20:47:33 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j7QKlVE6017582; Fri, 26 Aug 2005 13:47:31 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7QKlVbN017581; Fri, 26 Aug 2005 13:47:31 -0700 Date: Fri, 26 Aug 2005 13:47:31 -0700 From: Brooks Davis To: Jan Pechanec Message-ID: <20050826204731.GA14701@odin.ac.hmc.edu> References: <20050826223000.O51719@axxem.hide.subzone.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <20050826223000.O51719@axxem.hide.subzone.cz> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=HTML_MESSAGE autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-stable@freebsd.org Subject: Re: how to find out the boot device 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: Fri, 26 Aug 2005 20:47:34 -0000 --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 26, 2005 at 10:41:47PM +0200, Jan Pechanec wrote: >=20 > hello guys, >=20 > during the rc.d phase, I need to find out in a shell script from=20 > which disk the system has booted up. >=20 > - I cannot use kern.rootdev because my root fs is a memory disk > - I cannot use kern.disks because the first disk there doesn't=20 > necessarily mean the boot disk (eg. my home box says 'cd0 ad0' for that) > =09 > - I could use 'atacontrol list' or 'camcontrol devlist' because I=20 > always boot from the 1st disk, but if I have both types of disks then I h= ave=20 > 1st ATA disk and 1st SCSI disk and again unable to recognize which one is= =20 > the one I need. >=20 > any ideas, please? Use glabel and label the disk or file systems during deployment. Then you'll have /dev/label/ or /dev/ufs/