From owner-freebsd-questions@FreeBSD.ORG Sun Jun 29 02:11:14 2014 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8227390 for ; Sun, 29 Jun 2014 02:11:14 +0000 (UTC) Received: from mail.cyberleo.net (mtumishi.cyberleo.net [216.226.128.201]) by mx1.freebsd.org (Postfix) with ESMTP id 81CF72C28 for ; Sun, 29 Jun 2014 02:11:14 +0000 (UTC) Received: from [172.16.44.4] (vitani.den.cyberleo.net [216.80.73.130]) by mail.cyberleo.net (Postfix) with ESMTPSA id 7DCAF3075; Sat, 28 Jun 2014 22:11:06 -0400 (EDT) Message-ID: <53AF75B9.6060107@cyberleo.net> Date: Sat, 28 Jun 2014 21:11:05 -0500 From: CyberLeo Kitsana User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: "questions@freebsd.org" , paul beard Subject: Re: what should uname -v be telling me here? References: <44lhsi5ugm.fsf@be-well.ilk.org> <20140627223650.25210a53.freebsd@edvax.de> <44y4wi3v5x.fsf@be-well.ilk.org> In-Reply-To: <44y4wi3v5x.fsf@be-well.ilk.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2014 02:11:14 -0000 On 06/27/2014 04:22 PM, Lowell Gilbert wrote: > paul beard writes: > >> On Fri, Jun 27, 2014 at 1:36 PM, Polytropon wrote: >>> You need to find out where /boot resides (in my case, >>> it's on ad4s1a, which is mounted at /) to identify the boot >>> device (or to be precise, the device the kernel has been read >>> from). >> >> >> I keep thinking this should be something you ought to be able to >> discover without being on console. I realize the BIOS can't be >> interrogated but if I knew that the active kernel was ad3:/boot/kernel >> or ad2:/boot/kernel, it would be useful. Kind of surprised that >> doesn't appear anywhere in dmesg or that it can't be read out of >> somewhere. > > The boot procedure has to load and boot the kernel without having the > kernel available to create the device nomenclature. [Kind of obvious, > if you think about it.] So interrogating the firmware is the only way > the kernel *could* know where it was booted from. That's impossible > in the BIOS world, and even if there were a table indicating it in an > ACPI table, that would only tell you which disk the bootloader came > from, which isn't necessarily where the kernel came from. Another bit of information is available if you peek at what loader(8) told the kernel, via kenv(1). >From a box booting UFS: ----8<---- # kenv ... currdev="disk0s4a:" loaddev="disk0s4a:" kernelname="/boot/10.0p6-GENERIC/kernel" ... ----8<---- And from one booting ZFS: ----8<---- # kenv ... currdev="zfs:paka/root/10.0:" loaddev="zfs:paka/root/10.0:" kernelname="/boot/10.0p6-PAKA/kernel" ... ----8<---- -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net Furry Peace! - http://www.fur.com/peace/