From owner-freebsd-current Sat Jul 22 9:38: 3 2000 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 579BD37C320 for ; Sat, 22 Jul 2000 09:37:54 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id CAA17771; Sun, 23 Jul 2000 02:37:30 +1000 Date: Sun, 23 Jul 2000 02:37:43 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: John Baldwin Cc: imp@village.org, dwhite@resnet.uoregon.edu, freebsd-current@FreeBSD.ORG Subject: Re: No /boot/loader In-Reply-To: <200007221503.IAA98549@pike.osd.bsdi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 22 Jul 2000, John Baldwin wrote: > Bruce Evans wrote: > > The dangerously dedicated case has one slice covering the whole disk. We > > unclip the slice info from the magic 50000 sectors to the size of the whole > > disk (as reported by the driver) to handle this. Reading the slice info > > using DIOCGSLICEINFO shows the full size, but no changes are made to the > > mbr. This is in the kernel. I'm not sure exactly what libdisk does, but > > it is constrained by what the kernel will accept. > > > > Bruce Please don't quote signatures or other irrelevant points. > Ok, so we normally do clip slice information, except in the case of a > dangerously dedicated slice. Which works fine so long as no one ever There is nothing to clip, since the dangerously dedicated slice is the whole disk. > creates a 50000 block slice in the 4th entry, as we will expand that sector > slice to cover all of the disk. It also means that kernel, like the loader, Normal 50000-sector slices are very unlikely to be misinterpreted as dangerously dedicated ones. A 5000-sector slice is (or should be) only interpreted as dangerously dedicated if: 1. all bytes in the partition table have certain values, in particular: 2. the slice type is 0xA5 ("FreeBSD"). 3. the starting sector is 0 absolute. This is is strictly invalid for normal slices. 4. the ending C/H/S is 255/255/255. 50000-sector slices starting at absolute 0 can't reach that far. > has to special case when it sees a dangeriously dedicated slice, which is > rather evil, IMO. It's no more evil than the boot signature. The garbage in the partition table is treated as a signature. It is more authoritative because it is larger and more magic. The loader really shouldn't know about the dangerously dedicated case. Its detection of the dangerously dedicated case is buggy. It only checks the conditions (2) and (3) above (and that the slice size is 50000). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message