From owner-cvs-all Sat Nov 9 1:30:43 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56BB637B401; Sat, 9 Nov 2002 01:30:42 -0800 (PST) Received: from gate.qubesoft.com (gate.qubesoft.com [217.169.36.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9113743E42; Sat, 9 Nov 2002 01:30:41 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from builder02.qubesoft.com (builder02.qubesoft.com [192.168.1.8]) by bluebottle.qubesoft.com (8.12.6/8.12.6) with ESMTP id gA8GoHc1005892; Fri, 8 Nov 2002 16:50:17 GMT (envelope-from dfr@nlsystems.com) Subject: Re: cvs commit: src/lib/libdisk write_alpha_disk.c From: Doug Rabson To: John Baldwin Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1036774379.21473.3.camel@builder02.qubesoft.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.1.90 (Preview Release) Date: 08 Nov 2002 16:52:59 +0000 Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 2002-11-08 at 16:39, John Baldwin wrote: > On 08-Nov-2002 Doug Rabson wrote: > > On Thursday 07 November 2002 2:42 pm, John Baldwin wrote: > >> On 07-Nov-2002 John Baldwin wrote: > >> > jhb 2002/11/07 06:39:22 PST > >> > > >> > Modified files: > >> > lib/libdisk write_alpha_disk.c > >> > Log: > >> > Get this closer to working. The Write_Disk() function's for loop > >> > needed to use the same start condition as the i386 version. However, > >> > since Alpha's only have one fake "slice" from sysinstall's perspective we > >> > don't need to use a loop, but can just write out the BSD label in the > >> > first fake "slice". > >> > >> Unfortunately a newly installed disk does not boot, however. *sigh* > > > > Does it load the bootstrap at all? If not, then its almost certainly just the > > checksum being wrong. If it tries to load the bootstrap then crashes, > > probably the field pointing to the bootstrap is wrong. > > It's the checksum. So far I've verified that when libdisk first writes > the label to the disk it is correct. I've tried closing the disk and > immediately re-opening the disk and re-computing the checksum and it is > still ok. However, after install, the disklabel's are different (I made > a backup copy on the disk so I could compare them). The differences are > all within the actual array of partitions within the disklabel itself. > phk@ has suggested that certain ioctl's can dink with those fields in the > kernel and neither sysinstall nor libdisk use those ioctls. However, newfs > does so my current guess is that when newfs uses those ioctl's, it goes in > and changes the disklabel on disk resulting in the checksum being invalid. > The problematic ioctl() seems to be in rewritelabel(). I don't know why > newfs now doesn't produce the same disklabel as libdisk. Perhaps libdisk's > disklabel's are buggy but no one's noticed because newfs fixes them up? I'm sure that rewritelabel() used to have some extra code that re-calculated the SRM checksum. Has this rotted away? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message