From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 16:25:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1ED4E16A4CE for ; Tue, 17 Aug 2004 16:25:55 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 263E043D41 for ; Tue, 17 Aug 2004 16:25:54 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i7HGPqu06823 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 19:25:52 +0300 Date: Tue, 17 Aug 2004 19:25:52 +0300 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Message-ID: <20040817192552.B5554@oasis.uptsoft.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040817185240.A5554@oasis.uptsoft.com> <20040817161516.GB53307@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040817161516.GB53307@dan.emsphone.com>; from dnelson@allantgroup.com on Tue, Aug 17, 2004 at 11:15:16AM -0500 X-OS: FreeBSD 4.5-STABLE Subject: Re: actual boot device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2004 16:25:55 -0000 I am booting kernel directly from bootblock, and do not have boot loader, so kenv does not work. certainly, sysctl kern.bootfile points to /kernel, but it does not tell anything. The actual device may be floppy, CF card or harrdisk, and I do not have any means of figuring it out. On Tue, Aug 17, 2004 at 11:15:16AM -0500, Dan Nelson wrote: > In the last episode (Aug 17), Sergey Lyubka said: > > How would one know the actual boot device after kernel successfully > > booted ? > > The kern.bootfile sysctl points to the kernel file that was loaded, > according to the loader. If you booted off of cdrom or floppy, you can > run "kenv loaddev" to find out which device was actually used to read > the file. > > -- > Dan Nelson > dnelson@allantgroup.com -- Sergey Lyubka, Network Security Consultant NetFort ISS Ltd, Galway, Ireland