Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Dec 2001 09:11:03 +0100
From:      Joerg Wunsch <j@uriah.heep.sax.de>
To:        freebsd-current@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/kern subr_diskmbr.c
Message-ID:  <20011210091103.M97235@uriah.heep.sax.de>
In-Reply-To: <20011210005928.9538A3810@overcee.netplex.com.au>; from peter@wemm.org on Sun, Dec 09, 2001 at 04:59:28PM -0800
References:  <20011209102129.F97235@uriah.heep.sax.de> <20011210004350.6703C3810@overcee.netplex.com.au> <200112092200.fB9M0J660085@uriah.heep.sax.de> <20011210005928.9538A3810@overcee.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
As Peter Wemm wrote:

> No, it isn't ignored, BIOS'es "know" that fdisk partitions end on
> cylinder boundaries, and therefore can intuit what the expected
> geometry is for the disk in question.

And you call that a "design"?  I call it a poor hack, nothing else.

The restriction to whatever the BIOS believes to be a "cylinder"
boundary is one of my gripes with fdisk tables; you obviously missed
that (or you don't argue about it -- can i take this as silent
agreement?).  It imposes a geometry that is not even remotely there,
with the drawbacks that a number of sectors can never be assigned (OK,
no big deal these days), but even worse, disks are non-portable
between different BIOSes that perform different "intuition" about how
to obtain the "geometry" from those poorly chosen values that are
included in fdisk tables.

/The/ major advantage of DD mode was that all BIOSes (so far :) at
least agree on how to access block 0 and the adjacent blocks, so
starting our own system there makes those disks portable.

> [...] The problem is that the int13 code only allowed for 255 heads,
> and the fake "end of disk" entry that is unconditionally in /boot/boot1
> specified an ending head number 255 (ie: 256 heads).  When this gets put
> into a byte register it is truncated to zero and we get divide by zero
> errors.

I've read this, and yes, i never argued about fixing /that/.  Since
those values chosen by our grandfather Bill Jolitz have been just
`magic' numbers only, it's unfortunate they eventually turned out to
be such bad magic about a decade later.

> We can just as easily have bootable-DD mode with a real MBR and have
> freebsd start on sector #2 instead of overlapping boot1 and mbr.

Probably, i think i could live with that.

> I'd rather that we be specific about this.  If somebody wants ad2e
> or da2e then they should not be using *any* fdisk tables at all.
> Ie: block 0 should be empty.

That disk wouldn't boot at all, you know that.

Yes, i prefer my disks to be called da0a...daNP.

>> But to be honest, see my other article: i never argued to make this
>> the default or a recommended strategy in any form.  It should only
>> remain intact at all.  Back to the subject, the current warning
>> however, is pointless, and has the major drawback to potentially
>> hide important console messages.

> The console buffer is 32K these days.  You'd have to have around 300
> disks to have any real effect on the kernel.

You're narrow minded here, Peter, this time about in the same way as
Windoze is narrow minded: "All the world's a graphical console
produced by XXX."  No, all the world's not like that.  You might
consider my pcvt console obsolete, OK, but did you ever think about a
plain VT220 on a serial console?  They don't have /any/ scrollback
buffer.  (And you can't even stop the output with ^S while FreeBSD is
booting.)  Also, i think that:

uriah /boot/kernel/kernel: da0: invalid primary partition table: Dangerously Dedicated (ignored)
uriah last message repeated 5 times
uriah /boot/kernel/kernel: da1: invalid primary partition table: Dangerously Dedicated (ignored)
uriah last message repeated 34 times
uriah /boot/kernel/kernel: da2: invalid primary partition table: Dangerously Dedicated (ignored)
uriah last message repeated 34 times

...73 of those silly messages are just beyond any form of usefulness.
Either we hide this completely behind bootverbose (back to the root of
this thread) since it bears no information at all (i already knew what
is written there, since it was my deliberate decision, and it could
not have happened unless being my deliberate decision), or we at least
ensure any of those messages is emitted at most once per drive.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

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?20011210091103.M97235>