Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Nov 1995 10:35:57 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        kuku@gilberto.physik.rwth-aachen.de, nbc@vulture.dmem.strath.ac.uk
Cc:        freebsd-hackers@freefall.freebsd.org
Subject:   Re: IDE/eIDE issues
Message-ID:  <199511172335.KAA28598@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>The Failsafe Guide to IDE drives (with FreeBSD ;)
>-------------------------------------------------

>Caveat (1) If in doubt about disk geometry, read the sticky label on the disk. 
>It tends to be more accurate than whatever the BIOS reports ;-)

If in doubt, read the drive manual.  One of mine says this:

Product Specification:
Drive model:	SHD-3212A
Cylinder:	2570(*)
Head:		4(*)
Sector/Track:	56-96(*)
(*) physical drive parameters and can't be used in DOS

Values to be entered in the BIOS SETUP program:
Cylinder:	1002
Heads:		16
Sectors:	52

>Caveat(2) *Always* assume this number to be correct - even if at some point
>FreeBSD reports the BIOS parameters.

Simply use the same numbers in the BIOS SETUP and FreeBSD fdisk.  If you
installed the drive then you must know the numbers.  If someone else
installed the drive, run SETUP to find the numbers.  If SETUP doesn't
work, then boot the FreeBSD install floppy with -v to find the numbers.
Be careful using old versions of FreeBSD.  2.0.5 has off by one errors
in the number of heads and cylinders (add one to the numbers that it
reports).

>Caveat(3) I realise that some people have had success with creating small
>DOS partitions and all that, but it didn't work for me :(

It's a stupid trick, but should work.

>Caveat(4) This information has been gathered through weeks of painful efforts
>with IDE disks, culminating in an "all nighter" when I actually got my 1Gig
>IDE to work. Any inaccuracies are wholly due to post-dated lack of sleep and 
>nutrition.

>Step(1) Switch of the BIOS translation, returning it to "standard" mode.

Wrong.  Always use as much BIOS translation as possible.  It may help
keep the number of cylinders below 1024 so that you don't have to worry
about that.  Note that for the drive specified above, the default
geometry of S=52, H=16, C=1002 is not closely related to the physical
geometry of S=variable, H=4, C=2570.  52/16/1002 is simply a geometry
that covers almost all the sectors on the drive.  Any other possible
geometry with the same property, e.g. 52/8/2004, should work if you
enter it into the BIOS SETUP before setting up any partitions.  Possible
geometries must satisfy the following constraints:

BIOS interface:			S <=  63, H <= 256, C <= 1024
Partition table interface:	S <=  63, H <= 256, C <= 1024

and if the BIOS doesn't do translation: H <= 16.  The restriction on the
number of cylinders only applies to booting and to running operating
systems that use the BIOS.

>Step(2) If you want a DOS partition, it will now need to reside (in real
>        geometry terms) totally within the first 1024 cylinders of the disk.

If possible, use a modern BIOS with translation and a geometry with
<= 1024 cylinders to avoid this problem.

>Step(3) Boot the computer with the FreeBSD boot disk, and start partitioning
>        the disk.
>Step(4) Make a root partition - not a "fake" partition within a partition,
>        but dedicate a whole, i.e. one of the four available on the entire
>		  disk, to becoming your FreeBSD "root". 25 Megabytes should do it. This
>		  partition *must must must* be *totally* within the first *real*
>		  1024 cylinders of the IDE disk in order that it be accessable to the
>		  BIOS at boot time.
>Step(5) Make your main partition, which will be a distinct partition from the
>        one created in step(4). In other words, there are only two partitions
>		  on the disk left - room for, say, DOS and something else. This partition
>		  can be anywhere at all on the disk, since the BIOS will not be used
>		  to read it in any way (that I am aware of).
>Step(6) Label the two partitions. The partition in step(4) becomes "/", while
>        the partition created in step(5) becomes your /usr and swap or whatever.        If you are doing this using the standard system installer (of course
>		  you are! ;-) it will create an appropriate fstab which will automount
>		  all this gubbins.

All this is OK if you don't mind using two or more partitions for FreeBSD
and only want to boot from the first one, but isn't necessary.  Only the
FreeBSD boot partition (usually 'a') needs to be below cylinder 1024.

>Step(7) Do the rest of the installation, and reboot, after which you should
>        have a working system. On no account ever change the BIOS back to 
>		  "kludge translation" mode or your system won't boot. You'll have
>		  to change it back to get it working again.

Changing back would require changing a few numbers in the partition table
and in any other tables that depend on the old geometry.  There are no
such tables in FreeBSD but in DOS there is the Boot Parameter Block.

Bruce



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