From owner-freebsd-stable@FreeBSD.ORG Fri Aug 26 20:41:56 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 2F1E416A420 for ; Fri, 26 Aug 2005 20:41:56 +0000 (GMT) (envelope-from jp@devnull.cz) Received: from mail.mynet.cz (mail.mynet.cz [195.122.208.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8526C43D4C for ; Fri, 26 Aug 2005 20:41:54 +0000 (GMT) (envelope-from jp@devnull.cz) Received: from [192.168.1.29] (r2g242.chello.upc.cz [62.245.70.242]) by mail.mynet.cz (8.12.11/8.12.11) with ESMTP id j7QKidcK055321 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Fri, 26 Aug 2005 22:44:39 +0200 (CEST) (envelope-from jp@devnull.cz) Date: Fri, 26 Aug 2005 22:41:47 +0200 (CEST) From: Jan Pechanec X-X-Sender: jp@axxem.hide.subzone.cz To: freebsd-stable@freebsd.org Message-ID: <20050826223000.O51719@axxem.hide.subzone.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: 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:41:56 -0000 hello guys, during the rc.d phase, I need to find out in a shell script from which disk the system has booted up. - 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 necessarily mean the boot disk (eg. my home box says 'cd0 ad0' for that) - I could use 'atacontrol list' or 'camcontrol devlist' because I always boot from the 1st disk, but if I have both types of disks then I have 1st ATA disk and 1st SCSI disk and again unable to recognize which one is the one I need. any ideas, please? thank you, j. -- Jan Pechanec http://www.devnull.cz