From owner-cvs-all Fri Nov 8 8:40:13 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 607BA37B401 for ; Fri, 8 Nov 2002 08:40:11 -0800 (PST) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9507443E4A for ; Fri, 8 Nov 2002 08:40:10 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 31076 invoked from network); 8 Nov 2002 16:40:08 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 8 Nov 2002 16:40:08 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id gA8GdWn5060337; Fri, 8 Nov 2002 11:39:39 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200211080923.26906.dfr@nlsystems.com> Date: Fri, 08 Nov 2002 11:39:32 -0500 (EST) From: John Baldwin To: Doug Rabson Subject: Re: cvs commit: src/lib/libdisk write_alpha_disk.c Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org 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 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? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message