From owner-freebsd-current@FreeBSD.ORG Sun May 28 06:27:41 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 6E6D016BCD9 for ; Sun, 28 May 2006 06:24:19 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E16743D55 for ; Sun, 28 May 2006 06:24:14 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k4S6NdhB074447; Sun, 28 May 2006 10:23:39 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k4S6NdqH074446; Sun, 28 May 2006 10:23:39 +0400 (MSD) (envelope-from yar) Date: Sun, 28 May 2006 10:23:38 +0400 From: Yar Tikhiy To: Julian Elischer Message-ID: <20060528062338.GC74300@comp.chem.msu.su> References: <20060518151232.GA37743@comp.chem.msu.su> <200605181819.k4IIJHL7001150@hardy.tmseck.homedns.org> <20060519085408.GB51604@comp.chem.msu.su> <20060521102204.GB78879@comp.chem.msu.su> <20060526072458.GA47499@comp.chem.msu.su> <20060527110415.GA63440@comp.chem.msu.su> <4479386B.6030008@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4479386B.6030008@elischer.org> User-Agent: Mutt/1.5.9i Cc: freebsd-current@freebsd.org Subject: Re: Root FS corruption 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: Sun, 28 May 2006 06:27:54 -0000 On Sat, May 27, 2006 at 10:43:07PM -0700, Julian Elischer wrote: > Yar Tikhiy wrote: > > > >Folks, I have good news for all of us: This kind of corruption > >isn't done by the kernel. Thanks to Ian Dowse, I found out that > >/boot/loader would rewrite nextboot.conf through libufs or whatever. > >This is done in support.4th, the word is rewrite_nextboot_file. > >Initially I missed a clear sign of the problem being caused by the > >loader: The corrupted data started with `nextboot_enable="NO" \n', > >which is the string written from support.4th. The actual bug must > >be hiding in libufs, or whatever loader uses to access UFS. > > > >Recent technical details of my investigation have been filed > >in PR bin/98005: > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=98005 > > > >The conclusion is: Avoid nextboot(8) for now. > > the current nextboot fails to provide all the designed functionality > of the previous nextboot. (which is why we still use the old one at > ironport) > One day I'll get around to reimplementing the old one.. > > (the design criteria were:) > > Store the nextboot info "not in a filesystem". (the filesystem may be > corrupt > or there ma be several types of filesystem available). > Change that info from boot0 without writing to a filesystem. > (to note that it was used) > Be able to store different stuff on different disks at the same time. > Be able to ensure that you could specify how many times the > information was used before falling back to something else. The present problem seems to lurk in the BIOS disk access mini-library used by the /sys/boot code, while nextboot just triggers it. Ian Dowse sent me a patch to test. I hope that the fixed library will facilitate your efforts on implementing the new nextboot. Thanks! -- Yar