From owner-freebsd-sparc64@FreeBSD.ORG Wed Jan 16 01:49:31 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 361CF5A2; Wed, 16 Jan 2013 01:49:31 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id C7001D58; Wed, 16 Jan 2013 01:49:30 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.5/8.14.5/ALCHEMY.FRANKEN.DE) with ESMTP id r0G1YTxg030144; Wed, 16 Jan 2013 02:34:29 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.5/8.14.5/Submit) id r0G1YTge030143; Wed, 16 Jan 2013 02:34:29 +0100 (CET) (envelope-from marius) Date: Wed, 16 Jan 2013 02:34:29 +0100 From: Marius Strobl To: Olivier =?iso-8859-1?Q?Cochard-Labb=E9?= Subject: Re: How to retrieve the "bootpath" variable in a running FreeBSD ? Message-ID: <20130116013429.GA28437@alchemy.franken.de> References: <20130113.075038.471841385206679419.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-sparc64@freebsd.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2013 01:49:31 -0000 On Sun, Jan 13, 2013 at 01:27:36AM +0100, Olivier Cochard-Labbé wrote: > On Sat, Jan 12, 2013 at 11:50 PM, Hiroki Sato wrote: > > > > Try: > > > > % kenv currdev > > > > Thanks a lot's ! > > Now my eeprom is correctly updated, just a last bug to fix. > After updating the eeprom from FreeBSD I need to issue a cold-reboot > for eeprom changes being applied (poweroff+poweron or "boot" command > in OBP): A simple "reboot" from SSH console is not enough. > I don't know if it's my old Sun Blade 150 that have this problem or if > it's a normal sparc behavior. > Uhm, that's tricky. I haven't implemented that part but AFAICT, the current behavior of rebooting from the previously used bootpath rather than from what is specified via boot-device (now) is on purpose and actually I make heavy use of it. Normally, I boot my machines from disk set via boot-device, except for kernel development which I typically use netbooting for. In order to do so, I interrupt the boot process and boot via `boot net`. It's very convenient that this sticks across reboots until one power cycles the machine or explicitly boots from disk again without having to fiddle with boot-device. The behavior you are asking for can also be implemented but I can't think of a proper logic for determining what to do when boot-device and bootpath disagree and I don't want to get rid of the current one :) If you need that alternate behavior the best way forward seems to be to add a switch for it to reboot(8). Marius