From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 10:37:34 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 851941065673 for ; Tue, 17 Feb 2009 10:37:34 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hpsmtp-eml18.kpnxchange.com (hpsmtp-eml18.KPNXCHANGE.COM [213.75.38.118]) by mx1.freebsd.org (Postfix) with ESMTP id 19D208FC17 for ; Tue, 17 Feb 2009 10:37:33 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtp-eml102.kpnxchange.com ([213.75.84.102]) by hpsmtp-eml18.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Feb 2009 11:25:29 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by cpsmtp-eml102.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Feb 2009 11:25:28 +0100 Received: from van-laarhoven.org (hind.van-laarhoven.org [10.66.0.146]) (authenticated bits=0) by uitsmijter.van-laarhoven.org (8.14.3/8.14.3) with ESMTP id n1HARQiO049631; Tue, 17 Feb 2009 11:27:26 +0100 (CET) (envelope-from nick@van-laarhoven.org) Received: (nullmailer pid 2908 invoked by uid 1001); Tue, 17 Feb 2009 10:25:24 -0000 To: freebsd-hackers@freebsd.org Content-Disposition: inline From: Nick Hibma Date: Tue, 17 Feb 2009 11:25:23 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200902171125.24160.nick@van-laarhoven.org> X-Spam-Status: No, score=-3.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on uitsmijter.van-laarhoven.org X-OriginalArrivalTime: 17 Feb 2009 10:25:29.0052 (UTC) FILETIME=[0E2061C0:01C990EA] Cc: Andriy Gapon Subject: Re: booting/loading a tool, not kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 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 Feb 2009 10:37:35 -0000 You are aware of nextboot(8)? That you could use to specify the 'kernel' to load on next boot. Also boot.config(5) might be of use. Nick > I'd like to add an entry to my loader menu to load/execute memtest86 > instead of a kernel. It is built as standalone ELF executable, of course. > > Currently I go to a loader prompt and do: > > unload > > load /boot/memtest86 > > boot > > Where should I look to get this into the forth code? > > Suppose I want to extend this approach. > What would be a good name for subdirectory to put such tools? > What would be a good way to add a sub-menu for such tools? > > Also, my current approach means that loader still first loads a standard > kernel and its modules and then replaces them with memetest86. How to > get to a loader menu without pre-loading anything?