Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jul 2000 02:37:43 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        John Baldwin <jhb@pike.osd.bsdi.com>
Cc:        imp@village.org, dwhite@resnet.uoregon.edu, freebsd-current@FreeBSD.ORG
Subject:   Re: No /boot/loader
Message-ID:  <Pine.BSF.4.21.0007230203250.691-100000@besplex.bde.org>
In-Reply-To: <200007221503.IAA98549@pike.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0007230203250.691-100000>