From owner-freebsd-current Wed Jan 6 15:59:00 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA25375 for freebsd-current-outgoing; Wed, 6 Jan 1999 15:59:00 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ceia.nordier.com (m2-23-dbn.dial-up.net [196.34.155.87]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA25361; Wed, 6 Jan 1999 15:58:53 -0800 (PST) (envelope-from rnordier@nordier.com) Received: (from rnordier@localhost) by ceia.nordier.com (8.8.7/8.6.12) id BAA03690; Thu, 7 Jan 1999 01:57:38 +0200 (SAT) From: Robert Nordier Message-Id: <199901062357.BAA03690@ceia.nordier.com> Subject: Re: How to Build & Run ELF Kernel In-Reply-To: <199901062306.PAA47473@silvia.hip.berkeley.edu> from Satoshi Asami at "Jan 6, 99 03:06:52 pm" To: asami@FreeBSD.ORG (Satoshi Asami) Date: Thu, 7 Jan 1999 01:57:35 +0200 (SAT) Cc: bde@zeta.org.au, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Satoshi Asami wrote: > * disklabel -B -b /boot/boot1 -s /boot/boot2 > > I did this and one of my machines have trouble reading the > bootblocks. It just says "read error" after OS-BS selects the disk. > > I tried it with > > disklabel -B /dev/rsd0s2c > disklabel -B -b sd0s2 > disklabel -B -b /boot/boot1 -s /boot/boot2 sd0s2 > > etc. It's always the same, disklabel exits without an error but it > fails during reboot. > > Any ideas? The new boot1 will report a "Read error" on any of the following: o Can't get the disk geometry from the BIOS o The disk geometry would cause division by zero o The derived cylinder number exceeds 1023 o BIOS fails to read a sector on five consecutive attempts I'd check particularly whether the FreeBSD slice entry is 100% correct. The old bootblocks use the CHS value (257/1/1 below) to determine the slice offset, whereas the new bootblocks use the start value (4128768 below) and the disk geometry reported by the BIOS to derive a CHS: [Sample fdisk output] sysid 165,(FreeBSD/NetBSD/386BSD) start 4128768, size 4305357 (2102 Meg), flag 80 (active) beg: cyl 257/ sector 1/ head 1; end: cyl 524/ sector 63/ head 254 sector = 4128768 % 63 + 1 = 1 head = 4128768 / 63 % 255 = 1 cyl = 4128768 / 63 / 255 = 257 -- Robert Nordier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message