From owner-freebsd-current Fri Oct 30 10:30:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA09971 for freebsd-current-outgoing; Fri, 30 Oct 1998 10:30:49 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA09958 for ; Fri, 30 Oct 1998 10:30:45 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id KAA01109; Fri, 30 Oct 1998 10:29:58 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810301829.KAA01109@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: John Polstra cc: current@FreeBSD.ORG Subject: Re: New boot loader and alternate kernels In-reply-to: Your message of "Fri, 30 Oct 1998 10:17:11 PST." <199810301817.KAA12367@austin.polstra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 30 Oct 1998 10:29:58 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I have a question about the new boot loader. My /boot/boot.conf > file looks like this: > > load /kernel > autoboot 10 > > Now suppose I want to boot an alternate kernel. To do that, it seems > I have to interrupt the autoboot sequence by pressing a key, then do > "unload /kernel", then do "boot /kernel.alt". Is that right? It's > the unload step that I'm wondering about. Can it be avoided? Unloading is an all or nothing proposition; it throws everything away (it doesn't take any arguments). This avoids having holes in the loaded region, as well as having to deal with dependancy issues. You can use the fact that 'boot' and 'autoboot' will look for a kernel for you to avoid having to load a kernel explicitly in your default case. The variable $bootfile is a comma-separated list of kernel names to try to boot. By default, it's implicitly set to 'kernel,kernel.old'. In your current case, you could leave your /boot/boot.conf file empty, because the default behaviour is to wait 10 seconds and then boot. If you wanted the equivalent of load /kernel.test autoboot 10 but without needing to unload the kernel, you could say: set bootfile=/kernel.test autoboot 10 (Yes, the comma-separated list sucks. I'm not sure what would be a better approach; I had reasons for not using semicolons that I've now forgotten.) -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message