From owner-freebsd-current@FreeBSD.ORG Wed Feb 1 20:19:33 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FEB216A422 for ; Wed, 1 Feb 2006 20:19:33 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A70243E67 for ; Wed, 1 Feb 2006 20:16:03 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.17.229]) ([10.251.17.229]) by a50.ironport.com with ESMTP; 01 Feb 2006 12:15:07 -0800 Message-ID: <43E116CA.9060201@elischer.org> Date: Wed, 01 Feb 2006 12:15:06 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <200602011341.k11Dfbq1008941@lurza.secnetix.de> In-Reply-To: <200602011341.k11Dfbq1008941@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: nextboot (was Re: boot block differences between 4.x and 6.x ?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2006 20:19:33 -0000 Oliver Fromme wrote: >Julian Elischer wrote: > > Oliver Fromme wrote: > > > [...] > > > I think the most visible changes in the boot blocks was > > > UFS2 support and the removal of nextboot(8) support. > > > > which I hope to put back because we continue to need it. > >I agree that it's needed. It's a very useful feature. > > > (The new nextboot being dependent on the root filesystem still being ok > > which is unacceptable to most embedded devices I've worked on, and why > > we still use the old bootblocks on all systems shipped.). > >>From my point of view, the biggest problem with the old >nextboot was the fact that it ignored loader(8) and tried >to load the kernel directly. While that might work under >certain conditions, it's not good in general. > >Therefore I think that a new nextboot implementation >should be implemented in loader itself. Since loader(8) >doesn't (and shouldn't) support writing to UFS2, the >state information should be written to an unused area in >block 2 on the disk, or something similar. In fact, one >byte is sufficient: It can be used as an index into a >table (ASCII text file), e.g. /boot/nextboot.conf. > >Would that be feasible to implement? > > The old nextboot used the 2nd block of the filesystem to hold information. But I can't remember if it used that information itself at all to decide whether to load boot1/boot2 from another partition, or whether it just always loaded it from the first 8k of the forst BSD partition.. I believe the latter. If I had lots of time to do it, I think I'd want to make a 'bootconfig' partition that covered the place where the info is stored and then try and interpret SOME of the information recovered to decide what drive/slice to load the rest of the boot1/boot2 combo. When we wrote the original nextboot code, we wanted to select between two root partitions, so that a failure to boot would result in a fallback to the other root, but we didn't want the bootblock writing anywhere in a filesystem, nor did we want the we kept free otherwise. We were only concerned with one drive however. At Ironport we use the identical scheme again. Allowing one root partition to be upgraded (with a newfs if needed) while teh other is being run on, and then rebooting into the new one with confidence that if it fails to get all the way up another reboot would come back to the previous root. Having the information as to where to boot to, on one of those partitions is not an option.. it may be failing because the filesystem, is in fact screwed. >Best regards > Oliver > > >