Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 1997 22:29:54 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        Jin Guojun <jin@george.lbl.gov>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: suggestion on using boot.config
Message-ID:  <Pine.BSF.3.95.971215222139.4581A-100000@current1.whistle.com>
In-Reply-To: <199712160444.UAA16864@george.lbl.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.971215222139.4581A-100000>