Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2003 06:00:43 -0600
From:      Mike Meyer <mwm-dated-1042977644.3a6c51@mired.org>
To:        swear@attbi.com (Gary W. Swearingen)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Dangerously dedicated vs. fully dedicated, etc.
Message-ID:  <15907.64491.399256.923879@guru.mired.org>
In-Reply-To: <r0ptr0d0f9.tr0@localhost.localdomain>
References:  <r0ptr0d0f9.tr0@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
In <r0ptr0d0f9.tr0@localhost.localdomain>, Gary W. Swearingen <swear@attbi.com> typed:
> I'm having trouble understanding a couple parts of the "disklabel"
> manpage related to dangerously/fully dedicated disks.
> 
> The "BUGS" section has this paragraph:
> 
>     For the i386 architecture, the primary bootstrap sector contains an
>     embedded fdisk table.  The disklabel utility takes care to not
>     clobber it when installing a bootstrap only (-B), or when editing an
>     existing label (-e), but it unconditionally writes the primary
>     bootstrap program onto the disk for -w or -R, thus replacing the
>     fdisk table by the dummy one in the bootstrap program.  This is only
>     of concern if the disk is fully dedicated, so that the BSD disklabel
>     starts at absolute block 0 on the disk.
> 
> 1) Can anyone explain that last sentence to me?  Shouldn't that "is only
> of concern" instead be "is not of concern", reversing the sense?

No, it's right.

> 2) Is a "fully dedicated" disk exactly the same as a "dangerously
> dedicated" disk?  If not, what's the difference?  Can one use a disk
> (or a slice) which has no space reserved for stage 1 & 2 boot records,
> say, for a non-bootable disk?  I know no way to disklabel one that way.

I've never seen "fully dedicated" anywhere else, so I can't say for
sure. However, I suspect they are using that to distinguish a drive on
a non-PC system - which has a standard disklabel in block 0 - from a
dangerously dedicated drive, which has a dangerously dedicated
disklabel in block 0.

> 3) Is "block 0" exactly the same as "sector 0"?

No. Block 0 is a file system block, whose size depends on the
parameters you gave newfs when you created the file system. I've seen
reports that booting won't work if you don't use the default values on
the root file system, but have never verified them. Sector 0 is the
first sector of block 0.

> 4) Shouldn't "BSD disklabel starts at absolute block 0" be "FreeBSD
> stage 1 boot record starts at sector 0"?  The disklabel immediately
> follows the stage 1 boot record, right?  So it would be "block 1"?

No, both the stage 1 boot and the disklabel are in block 0.

> Under "Writing a standard label", the manpage says:
> 
>     PC-based systems have special requirements in order for the BIOS to
>     properly recognize a FreeBSD disklabel.  Older systems may require
>     what is known as a ''dangerously dedicated'' disklabel, which
>     creates a fake DOS partition to work around problems older BIOSes
>     have with modern disk geometries.
> 
> 5) What's "fake DOS partition"?  DD disks don't have partitions.  Is it
> just trying to not bother saying that it fills in the MBR partition
> table as if there was at least one slice which the DD MBR will ignore.

DD disks don't have fdisk partitions, but they have an fdisk table. It
has one partition that covers the entire disk. That's probably what
they are referring to. Note that the system also supports accessing
the drive as if it had one fdisk partition, so that da0s1a and da0a
reference the same bit of disk if da0 is DD.

> 6) Why is the problem limited to older systems?  Don't new BIOSes
> check for a normal-looking partition table?

The BIOS checking the fdisk table isn't what you're avoiding with a DD
disk. What you're avoiding is the BIOS geometry calculations at boot
time. Older BIOSes apparently have trouble with that.

> 7) Isn't the first sentence wrong?  BIOS don't look for disklabels, do
> they?  The special requirements are in order for the BIOS to find the
> FreeBSD stage 1 boot record, no?. (And the FreeBSD installer doesn't
> satisfy the requirements for non-DD disks (as I read the FAQ's DD
> answer).  I can't imagine why not.  Older systems with a standard
> MBR boot any active slice (even FreeBSD) without problems, no?)

I think the first sentence has confusing wording, in that PC BIOSes
could be confused if there wasn't an fdisk table. It should say
"recognize disks with a FreeBSD disklabel."

A standard FreeBSD disklabel does *not* have an fdisk table in
it. That's what gets put at the beginning of fdisk partitions, and at
the beginning of disks on non-PC based systems. If you put that at the
beginning of a disk on a PC, you could confuse the BIOS. The special
requirements are that you have an fdisk table.

On non-DD disks, the FreeBSD installer installs either a standard MBR
or a boot0 MBR, both of which have an fdisk table. It then installs
standard disk labels on the fdisk partitions, where they won't confuse
anything.

	<mike

P.S. - I've used "fdisk partition" here since the OP used
       "partition". The standard FreeBSD terminology is "slice".

-- 
Mike Meyer <mwm@mired.org>		http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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