BIOS Settings - IDE Device Setup / Autodetection



This section discusses the BIOS settings that control the setup 
of IDE/ATA devices (particularly hard disk drives). Most BIOSes 
have an entry in the Standard Setup menu for each of the four 
IDE/ATA devices supported in a modern system (primary master, 
primary slave, secondary master, and secondary slave). For each 
one, you can enter a value for each setting in this section 
(type, size, cylinders, etc.) See here for details on hard disk 
geometries and data structures 

It should be noted that all modern hard disks use special 
technologies that makes simple geometry figures like "cylinders, 
heads, sectors" inapplicable. For example, almost all modern 
drives use a variable number of sectors, and are set up using 
an "approximate" figure in the system BIOS. This isn't 
something you generally need to worry about as you set up your 
hard disk, but remember that if it says "63 sectors" that 
doesn't necessarily mean the drive really has that number in 
each cylinder. In fact, it normally will not. This subject is 
covered in some detail in the section on hard disk geometry .

Virtually all BIOSes now come with IDE device autodetection. 
This comes in two forms: 

	Dynamic IDE Autodetection: This is the fully automatic 
mode. You set one or more of the IDE devices (primary master, 
primary slave, etc.) on "Auto" and the BIOS will automatically 
re-detect and set the correct options for the drive each time 
you boot the PC. The BIOS will usually display on the screen 
what device it finds each time it autodetects. For most people, 
this is the best way to go; it ensures that your BIOS always has 
the correct information about your hardware, and it removes any 
possibility of you installing a new drive but forgetting to set 
up the CMOS properly, or of changing a parameter by mistake in 
the setup program. Not all BIOSes offer this setting but most 
newer ones do. 

	Manual IDE Autodetection: This type of autodetection is 
run from the BIOS setup program. You select autodetection, and 
the BIOS will scan the IDE channels, and set the IDE parameters 
based on the devices it finds. When you save the BIOS settings, 
they are recorded permanently. The disadvantage of this is that 
if you change devices, you must return to the BIOS to 
re-autodetect the new devices (unlike the dynamic autodetection 
scheme, which does a fresh autodetection each time you boot the 
PC). Virtually every BIOS created in the last 8 to 10 years 
offers manual autodetection. 

When you use dynamic autodetection, the BIOS will normally 
"lock" the individual device settings that are being 
automatically set by the BIOS at boot time. Most systems that 
provide manual autodetection will not lock the individual 
settings; they autodetect, set the settings, and then let you 
change them if you want to. In most cases of course, you will 
not want to change what the BIOS detects.

Most BIOSes that allow dynamic autodetection also allow manual 
autodetection; the choice is yours. Using some sort of 
autodetection for IDE/ATA devices is strongly recommended. It is 
the best way to reduce the chances of disk errors due to 
incorrect BIOS settings. It also provides immediate feedback of 
problems; if you can't autodetect a drive from the BIOS, you 
know you have a problem even before you try to boot up .

	Note: On most BIOSes, you perform a manual IDE 
autodetection using a special entry with that name on the BIOS 
setup program menu. This entry autodetects all IDE/ATA devices, 
one at a time. However, other BIOSes "hide" autodetection. For 
example, on some BIOSes you autodetect an IDE/ATA device by 
moving to the "Type" setting for the device and hitting {Enter}. 
This runs the autodetection for that device only. Check your 
manual if you are having problems finding the 
autodetection facility.

	Warning: If your BIOS contains a "hard disk utility" or 
"low-level format" type program, do not use it on IDE/ATA drives. 
These utilities are intended for older MFM and RLL type devices. 
Modern IDE drives do not need low-level formatting, interleave 
factor settings, or media analysis under all but the very most 
unusual circumstances, and when they do need it, they need 
special utilities specially designed for the type of drive you 
are using.


Type

This setting determines the "type" of the IDE device. In the early 
years of the PC, there were few different types of hard disks, and 
there were far less sophisticated BIOS setup programs. There was 
no autodetection for hard disks, and no way to manually enter the 
parameters for the hard disk. You selected the "type" (really a 
number, usually from 1 to about 45 or so) of the hard drive from 
a predefined table that was hard-coded into the BIOS. Different 
machines would have different tables, and newer machines would 
have more newer drives in their tables than older machines did. 
If you tried to put a new drive in an older machine you might 
find it had no entry that matched, and you'd have to use the 
"best fit" entry you could find, sometimes losing some of your 
drive's capacity. Overall, it was a big pain. :^)

Newer BIOSes don't restrict you to using the entries in the fixed 
"disk type" table, although the table of fixed entries still 
persists. In today's BIOSes, you will normally have the following 
options for each device's "Type": 

	Predefined Types (1-45, 1-46, or 1-47): This is the 
	predefined fixed table mentioned above. Even on new 
	machines this table generally contains entries for 
	teeny-tiny, very old drives (like 40-100 MB). It is 
	strongly recommended that you avoid the use of this 
	table altogether. 

	User: This option lets you manually specify the parameters 
	for the drive. Not recommended unless you really know what
	you are doing (actually, not recommended even then unless 
	there is a specific reason you need to do this.) "User" 
	is normally what the BIOS will set the drive to when you 
	do a manual autodetect. 

	Note: Instead of "User", some systems use the last number 
	in the table for user settings. If entries 1-46 for 
	example are predefined drives, the BIOS may call the 
	"User" setting "Type 47". It's still the same thing, 
	just with a different name.

	Auto: This setting activates dynamic IDE autodetection 
	for the device. The device will be autodetected by the 
	BIOS each time the system boots. 

	CD-ROM: Some systems now support this entry, to tell the 
	BIOS that you are using a CD-ROM in that IDE 
	device position. 

	Disabled / None: Use this option to tell the BIOS that 
	there is no drive at all in this IDE device position. 

Some BIOSes implement manual autodetection of IDE devices using 
the "Type" setting. By pressing {Enter}, the BIOS will autodetect 
the device, set the type to "User", and set the other numbers 
and options for you. Most BIOSes however have a dedicated menu 
entry for autodetecting all IDE devices.

If you select anything for "Type" other than "User", the BIOS 
will lock the "Size", "Cylinders", "Heads", "Sectors", "Write 
Precompensation" and "Landing Zone" settings, since these will 
be determined either by reading the fixed table, or by dynamic 
autodetection (if you select "Auto"). CD-ROMs do not use these 
physical geometry parameters since their construction is 
totally different.

If your system supports the "Auto" setting, you are generally 
best off using it. This will ensure that your system is always 
set up correctly. You should set to "Disabled" any devices you 
are not using, and use "CD-ROM" for IDE CD-ROM drives.

	Note: Some BIOSes do not have a "Type" entry for CD-ROMs, 
but will autodetect a CD-ROM at boot time. In this case, it is 
best to set that device to "Auto".


Size

This setting indicates the size of the drive, normally in decimal 
megabytes. This actually isn't really a "setting" per se, since 
you don't normally enter this value. It is calculated according 
to the following formula: 

	Size = (Heads * Cylinders * Sectors * 512) / 1,000,000 

The 512 is because PCs use 512-byte sectors; the 1,000,000 
converts the number to decimal megabytes . The number of heads, 
cylinders and sectors in this formula is equal to whatever the 
settings are in the BIOS.


Cylinders

The number of cylinders <../../../hdd/geom/tracks.htm> on each 
side of each platter in the disk. For older drives, this is the 
number of physical cylinders the disk uses. For newer disks, it 
is the logical number of cylinders that the drive specifies for 
use in the BIOS setup; see here for an explanation of physical 
and logical geometry .

For newer drives using BIOS geometry translation, the BIOS 
reduces the number of logical cylinders by dividing it by an 
integer factor (2, 4, etc.) so that it is less than 1,024 (the 
BIOS limit for the number of cylinders for historical reasons) 
and then multiplies the number of heads by the same number.

For example, a Western Digital Caviar 33100 3.1 GB drive has 
nominal parameters (logical geometry) of 6,136 cylinders, 16 
heads and 63 sectors. When you set up this drive (autodetect it) 
most BIOSes will record 767 cylinders, 128 heads and 63 sectors. 
Of course the drive doesn't really have only 767 cylinders, but 
this is the way that the BIOS gets around the infamous 504 MB 
restriction. See here for more details on BIOS translation.

	Note: Some BIOSes will continue to show the actual 
physical parameters even when set to a translating mode like 
LBA. This can be confusing to see on the screen, but if the 
BIOS is set to "LBA" or "Large", it should be using the 
translated parameters internally.

	Note: IDE autodetection will set this value automatically.


Heads

The number of read/write heads the disk uses. For older drives, 
this is the number of physical heads the disk uses. For newer 
disks, it is the logical number of heads that the drive 
specifies for use in the BIOS setup, usually 16; see here for 
an explanation of physical and logical geometry .

For newer drives supported using BIOS geometry translation the 
BIOS increases the number of heads by the same number it uses 
to reduce the number of cylinders, so that the number of 
cylinders is less than the BIOS limit of 1,024.

For example, a Western Digital Caviar 33100 3.1 GB drive has 
nominal parameters (logical geometry) of 6,136 cylinders, 16 
heads and 63 sectors. When you set up this drive (autodetect it) 
the BIOS will record 767 cylinders, 128 heads and 63 sectors. Of 
course the drive doesn't really have 128 read/write heads (it 
doesn't even have 16, only 6), but this is the way that the BIOS 
gets around the infamous 504 MB restriction. See here for more 
details on BIOS translation .

	Note: Some BIOSes will continue to show the actual 
physical parameters even when set to a translating mode like LBA. 
This can be confusing to see on the screen, but if the BIOS is 
set to "LBA" or "Large", it should be using the translated 
parameters internally.

	Note: IDE autodetection will set this value automatically.


Sectors

This setting is the number of sectors on each track (cylinder and 
head combination). A sector contains 512 bytes and is the 
smallest unit of data normally referenced on a hard disk. For 
older drives that use the same number of sectors per track, this 
is the number of physical sectors on each track; the most common 
number is 17.

Newer drives use zoned bit recording to place a different number 
of sectors on tracks in different parts of the disk. The BIOS 
only allows a single number for sectors per track (which was 
kind of bad planning), so these drives use a logical geometry, 
often specifying 63 sectors per track, the largest number that 
will fit in this field. The drive translates internally to the 
correct sector numbers.

	Note: IDE autodetection will set this value automatically.


Write Precompensation

This is a relic from the mid-80s. Older disks that use the same 
number of sectors for every track sometimes required an 
adjustment to be made while writing, beginning at a certain 
track number, and this setting was that value. See here for a 
better description of write precompensation.

Modern IDE/ATA and SCSI drives have built-in intelligent 
controllers that take care of these sorts of adjustments (and 
many more) automatically. This setting should normally be set to 
-1, 0 or 65535 (the largest value it can support) or whatever 
value the autodetection sets. Which of these "bogus" values your 
BIOS uses to mean "there is no write precompensation value for 
this drive" depends on the BIOS. The number itself is ignored by 
the drive in any event.

	Note: IDE autodetection will set this value automatically.


Landing Zone

This setting specifies the cylinder to which the BIOS should send 
the heads of the hard disk when the machine is to be turned off. 
This is where the heads will "land" when they spin down. Modern 
drives (in fact, virtually every drive made in at least the last 
five or so years) automatically park the heads in a special area 
that contains no data when the power is turned off. Therefore 
this setting is meaningless and is typically ignored.

Most BIOSes set this value to be the largest cylinder number of 
the logical geometry specified for the disk when you autodetect. 
So if the drive has 6,136 logical cylinders, the landing zone 
will be set to 6,135. In any event a modern IDE drive will 
ignore this setting and autopark by itself.

	Note: IDE autodetection will set this value automatically.


Translation Mode

This setting specifies the translation and/or addressing mode 
for the drive. These special modes are used to enable the BIOS 
(and operating system) to handle large hard drives and overcome 
hard disk capacity barriers , especially the infamous 504 binary 
megabyte / 528 decimal megabyte barrier.

The exact options for this setting will vary by system. These are 
the ones you are most likely to see: 

	Normal or CHS: This mode is sometimes called "CHS" mode , 
	for "cylinder, head, sector", the three geometry 
	specifications for a hard disk. This is the "standard" 
	mode with no special translation or addressing. It is 
	used for regular IDE/ATA hard disks that are smaller than 
	504 MB; more precisely, it should be used for any hard 
	disk that has 1,024 or fewer cylinders and 16 or fewer 
	heads. 

	LBA: This stands for "logical block addressing". Instead 
	of referring to locations by passing to the disk a 
	cylinder, head and sector number (CHS addressing), the 
	sectors are serialized so that each just has an integer 
	number; 0, 1, 2, etc. up to the total number of sectors 
	on the disk. LBA is now pretty much the standard for 
	addressing large hard disks, and is recommended for hard 
	disks that are not small enough to be used under "Normal" 
	mode. When LBA mode is used, the autodetect program will 
	still translate the drive parameters so that the number 
	of cylinders is less than 1,024, the BIOS limit. However, 
	accesses to the disk will be based on the integer 
	sector number. 

	Large: This mode is also sometimes called "ECHS" mode, 
	standing for "Extended CHS". This mode uses translation 
	to ensure that the number of cylinders is less than 
	1,024. However, unlike LBA, it does not then number the 
	sectors linearly, it refers to the disk using the 
	translated cylinder, head and sector values. This is a 
	valid way to deal with larger hard disks, however it is 
	very rarely used and is now considered non-standard. 
	Using this mode is therefore not generally recommended. 

	Auto: Some BIOSes will automatically detect and set the 
	hard disk mode at boot time. Some BIOSes have the ability 
	to dynamically autodetect all drive settings at boot time. 
	However, even if you aren't using this overall boot-time 
	autodetection, you can use this specific mode 
	autodetection if your BIOS supports it, in most cases. 

The BIOS autodetection program will normally take care of making 
the appropriate mode selection for you (either if you use the 
"Auto" setting or if you autodetect the drive); in some BIOSes 
it will only "recommend" the correct mode, but this 
recommendation is usually accurate. Yet another reason to use 
autodetection. :^)

	Warning: There are a lot of caveats and special rules 
about how drive translation and addressing works. This is all 
discussed in more detail in this section .

	Warning: Changing the mode on your hard disk, for 
example from Large to LBA or vice-versa, can change the 
translation method that your BIOS uses for the drive. This can 
also happen if you move a drive from a computer that doesn't 
use LBA to one that does use it. If the translation mode 
changes you run the risk of losing all the data on the drive. 
It is recommended that you not change translation methods unless 
there is a specific reason to do so, and that you back up your 
data before changing these types of settings in the BIOS.


Block Mode

When enabled, allows the system to perform accesses to the hard 
disk in block mode . What this means is that more than one 
sector can be transferred on each interrupt; newer drives allow 
you to transfer as many as 16 or 32 sectors at a time. This 
greatly improves performance when you use multitasking operating 
systems such as Windows 95 or Windows NT, since the processor is 
"distracted" from its other work much less often.

Normally you will want to enable this setting if your hard disk 
is compatible. Disable it if you experience lockups or problems 
with your hard disk or other peripherals.

	Note: IDE autodetection will set this value automatically 
on most BIOSes, but on some this must be manually set; the 
autodetection won't do it.

	Note: On some BIOSes this setting is actually in the 
Integrated Peripherals section. Weird.


PIO Mode

This is the PIO mode setting for the IDE device. IDE/ATA uses 
one of two different ways to transfer information into and out 
of memory: either programmed I/O (PIO) or direct memory access 
(DMA) . There are 5 different PIO modes, from 0 to 4, with 4 
being the fastest. Newer drives support the faster modes.

You will normally want to select the highest mode that your 
drive supports. If you experience difficulties you may want to 
try to drop the mode down to a slower level, but this will 
impact performance.

	Note: IDE autodetection will set this value 
automatically on most BIOSes, but on some this must be manually 
set; the autodetection won't do it.


32-Bit Transfer Mode

Enabling this setting allows for 32-bit data transfers between 
the processor and the PCI bus. Actual transfers to the disk are 
always done 16 bits at a time, but enabling this option will 
cause a small performance improvement on the transfer from the 
bus to the processor.

If your disk supports this, enable it for a performance increase. 
Disable it if you encounter any difficulty or if your disk 
doesn't support it.

	Note: This setting has nothing to do with Windows 3.x's 
"32-bit disk access" or "32-bit file access", which refer to 
something different entirely.
