From owner-freebsd-hackers Mon Dec 15 22:40:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA29697 for hackers-outgoing; Mon, 15 Dec 1997 22:40:14 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA29687 for ; Mon, 15 Dec 1997 22:40:09 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id WAA18399; Mon, 15 Dec 1997 22:32:42 -0800 (PST) Received: from UNKNOWN(), claiming to be "current1.whistle.com" via SMTP by alpo.whistle.com, id smtpd018395; Mon Dec 15 22:32:35 1997 Date: Mon, 15 Dec 1997 22:29:54 -0800 (PST) From: Julian Elischer To: Jin Guojun cc: hackers@FreeBSD.ORG Subject: Re: suggestion on using boot.config In-Reply-To: <199712160444.UAA16864@george.lbl.gov> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk for this you should try: man nextboot the bootblocks in teh state they are in now\have some bugs if you try to set flags (e.g. -s) but otherwise the options for nextboot work well it can be set to selct differnt kernels and partitions for the next 65 boots if you wish (it uses up N+3 bytes per boot where N is the name of the kernel. the WRITEBACK option will zero out each name as it's used.) The down side of this is it cannot be used in "Dangerously dedicated" mode (I have thoughts for this) julian (We use it all the time for remote rebooting on new kernels. If the boot fails, the next boot will use the next name in the sequence.) (of course we also have a hardware watchdog) On Mon, 15 Dec 1997, Jin Guojun wrote: > I do not know if this is a good place to address this issue. > > For remote development, I would like to modified "boot.c" to rename > "/boot.config" to either "/boot.config.run" or "/boot.config.last" > after readfile("boot.config", boot_config, BOOT_CONFIG_SIZE); > > The reason for this change is just for remote development. > This will avoid bad kernel/driver keep looping on panic during the development. > > For example, > # more /boot.config > /kernel.newdrv > > # ll /k* > -rwxr-xr-x 1 root wheel 1282582 Dec 12 18:11 /kernel* > -rwxr-xr-x 1 root wheel 1457189 Dec 12 09:43 /kernel.GENERIC* > -rwxr-xr-x 1 root wheel 1507955 Dec 15 19:42 /kernel.newdrv* > -rw-r--r-- 1 root wheel 0 Dec 12 09:43 /kernel.config > > > This boot.config will boot system to /kernel.newdrv. If /kernel.newdrv is bad > and there is no one near the machine, currently, the machine will never boot up. > If /boot.config can be renamed in boot.c and maybe changed back after > successfully booting, it will be panic on /kernel.newdrv and automatically > boot to /kernel on the second time; so thing can keep going. > > Any Pro/Con? > > -Jin > > P.S. Please CC to me when reply. Thanks. > >