From owner-freebsd-hackers Sun Sep 16 10: 6:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from newsguy.com (smtp.newsguy.com [209.155.56.71]) by hub.freebsd.org (Postfix) with ESMTP id 6A11737B406; Sun, 16 Sep 2001 10:06:17 -0700 (PDT) Received: from newsguy.com (ppp232-bsace7002.telebrasilia.net.br [200.181.81.232]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id KAA91612; Sun, 16 Sep 2001 10:06:07 -0700 (PDT) Message-ID: <3BA4DCF8.26277131@newsguy.com> Date: Sun, 16 Sep 2001 14:10:16 -0300 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en,pt-BR,pt,en-GB,en-US,ja MIME-Version: 1.0 To: Warner Losh Cc: bp@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Multiple kernels selector... References: <39B51E16.E8AD4BC8@newsguy.com> <200109160636.f8G6akW20252@harmony.village.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Warner Losh wrote: > > [[ Please excuse me for replying to a one year old message, but I have > a question or two ]] > > In message <39B51E16.E8AD4BC8@newsguy.com> "Daniel C. Sobral" writes: > : ." Loading /boot/current.conf. Please wait..." cr > : s" /boot/current.conf" read-conf > > What's the difference beteen ." and s"? > > : s" /boot/stable.conf" read-conf > > What should go in /boot/stable.conf vs /boot/current.conf? > > also, is there a good way of clearing out the environment and starting > over? If I'd like to load /boot/loader.conf from inside of > stable.conf or current.conf after setting currdev? > > What I'm trying to do: > > I have a disk (ad0) in my laptop. It has two slices (one BSD one > DOS). The BSD slice has partitions a, b, e, f, and g. I'd like to > put current on partition g and stable on a. I'd like a "stable" > command that sets up the environment to boot stable and a "current" > command that sets it up to do current. Can I do that or am I SOL? Do you know the Japanese ISO image with three versions selector: 3.x, 4.x and current? That might help some, as might the stuff in /usr/share/examples/bootforth. Now, to the questions: ." xxxx" prints xxxx s" xxxx" places a string on the stack. It must be used only inside definitions, because, otherwise, the space where the string is placed is reused. No, there is no way of clearing out the environment. As a matter of fact, a few environment variables are actually set by loader itself, and at least these should be preserved. Since environment variables are not FICL-bound, such a command might as well be done entirely in C and provided as a builtin. The module stuff, though, must be taken care of in Forth. If I ever find time, this stuff will be dealt with using environment variables too, but... My own boot environment, which is available with slight variations on /usr/share/examples/bootforth, presents me with a menu which present me the option of loading, in addition to the other conf files, stable.conf, current.conf or nothing else. I see no reason why you couldn't set currdev before doing it. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@the.secret.bsdconspiracy.net wow regex humor... I'm a geek To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message