Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Oct 1999 11:27:54 -0700
From:      "Ronald F. Guilmette" <rfg@monkeys.com>
To:        Mark Ovens <mark@dogma.freebsd-uk.eu.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Some serious gripes about `fdisk' and also `booteasy'. 
Message-ID:  <24065.940184874@monkeys.com>
In-Reply-To: Your message of Sun, 17 Oct 1999 09:47:27 %2B0100. <19991017094727.B319@marder-1> 

next in thread | previous in thread | raw e-mail | index | archive | help

In message <19991017094727.B319@marder-1>, you wrote:

>On Sat, Oct 16, 1999 at 08:35:11PM -0700, Annelise Anderson wrote:
>> 
>> 
>> On Sat, 16 Oct 1999, Ronald F. Guilmette wrote:
>> 
>> > 
>> > This had bitten me twice now.
>> > 
>> > Will whoever is supporting/maintaining the `fdisk' program *PLEASE* fix it
>> > so that it displays some sort of a warning when the user is just about to
>> > partition a SCSI drive for which the on/off status of BIOS address trans-
>> > lation (for disks larger than 1GB) _cannot_ be automatically and properly
>> > determined by fdisk itself?
>> 
>> One piece of advice often given is to put a dos partition on the disk
>> (it can be deleted during install if wish) to assist with determining
>> the correct geometry.  I've installed FreeBSD on probably a close to
>> a dozen scsi hard drives and never had this problem.  I didn't think
>> bios address translation was relevant for scsi drives, in any case.
>> 
>
>Neither did I. That's the main reason I moved to all-SCSI, it "just
>works", especially with *nix. None of these "only 4 devices", "1024
>cyls/504MB/LBA", "can't have a CD as primary slave with a disk on
>secondary master" problems that IDE seems to be plagued with. I'd
>be interested in knowing the "truth" about this for future reference.

Just for your future reference, the "truth" about this is that yes, the
backwards (harware) compatability constraints associated with PeeCee
hardware... in which they all _still_ try to remain somewhat compatible
with the very earliest IBM PeeCees that supported disk drives... DOES
indeed still make us all play funny games when trying to address
specific disk sectors, regardless of whether you have an (E)IDE drive
or a SCSI drive.

The attempts to be backward compatible mean that in the address that gets
sent to the disk drive (in the form cylinder/head/sector) has to get munged
around in weird ways, in particular for any disk that has more than 1 gigabyte
capacity.  Again, this bit of screwyness affects _both_ (E)IDE drives and
also SCSI drives.

But in the case of (E)IDE drives, the software driver can (I think) always
correctly figure out the proper set of rules it has to use when forming the
cylinder/head/sector disk address.  But in the case of SCSI drives, it can't
always do that.

Currently, unless you have some extra hints (e.g. a DOS partition) already
lying around that the FreeBSD `fdisk' program can use to get a clue as to
the current ``disk geometry'' (i.e. the rules for forming a cyl/head/sector
address from a raw sector address) the `fdisk' program is likely to guess
wrong about your disk geometry, at least if you are using a SCSI disk.  In
fact, now that a majority of disk drives have capacities in excess of 1 GB,
the `fdisk' program will *mostly* guess wrong.  And when it does, you *must*
manually override its guess or else you will end up with a partition that
you cannot actually use for anything.  (And unless I'm mistaken, you _may_
even end up improperly overwriting parts of _other_ existing partitions on
that same SCSI disk... which would be really Bad News if you had other
partitions on there that contained stuff that you wanted to keep.)

Obviously this is a dangerous situation.

Equally obvious (to me at least) is that the FreeBSD `fdisk' program should
start by checking to see if it is running on some sort of x86 (PeeCee) type
system.  If it is, then it should proceed to try to determine what sort of
disk drive is being partitioned, SCSI or (E)IDE.  (In fact, its possible
that the first of these checks isn't even necessary because, unless I'm
mistaken, `fdisk' is _only_ used on PeeCee type systems, and even on those,
it is only used in cases where FreeBSD isn't being given the whole disk to
itself, but is instead being asked to ``co-reside'' on the disk with 1, 2,
or 3 other traditional PeeCee (BIOS level) partitions.)

Anyway, if `fdisk' is running on a PeeCee type system, and if it is dealing
with a SCSI drive that may or may not have the so-called ``BIOS address
translation'' feature endabled in the SCSI controller card, then it SHOULD
NOT just guess about the disk geometry... because it can easily guess wrong,
with potentially tragic results.  Instead, it should have two mutually-
exclusive command line options like:

	--translation
and:
	--no-translation

and if the user supplies neither of those, *and* if `fdisk' is unable to
find any useful ``hints'' (e.g. an existing DOS partition) lying around
already on the disk, then upon startup it should *prompt* the user with
a question like:

	Is BIOS address translation enabled on your SCSI controller card
	for this specific SCSI disk drive (y/n)?

I hope that this change will get made in the FreeBSD `fdisk' program.  That
will make it a lot safer to use.



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?24065.940184874>