home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Caldera Network Desktop 1.0
/
caldera-network-desktop-1.0-boot-disk.img
/
usr
/
doc
/
LST
/
BIGDISK.gz
/
BIGDISK
Wrap
Text File
|
1996-01-15
|
13KB
|
257 lines
Problems Using Very Large Hard Disks
Using very large hard disks in PCs can lead to problems because of
the limitations of the BIOS and IDE standards on which most PCs are
based. Problems arise because the BIOS can only manage hard disks with
a maximum of 256 heads, 63 sectors, and 1024 cylinders; and because the
IDE standard is based on a model that specifies the Cylinders, Heads,
and Sectors of the hard diski (CHS model), but only allows a maximum of
16 heads, 255 sectors, and 65536 cylinders. The lowest limits of both of
these standards combine to give a maximum size for standard hard disks
of 504 MB (16 heads, 63 sectors, and 1024 cylinders).
The newer Enhanced-IDE (EIDE) standard avoids this limitation by not
using CHS model. Instead, a Logical Block Addressing model is used
(LBA). This model numbers all sectors on the disk sequentially.
Newer BIOS versions overcome the 504 MB limitation by using an Extended
CHS model that extends the maximum number of heads to 256. The new upper
size limit, from the Enhanced IDE and Extended CHS models, is almost
7.9 GB.
Linix does not use the BIOS to access your hard disk, so IDE and EIDE
hard disks should not cause problems on Linux systems. If problems occur,
however, Linux might be obtaining incorrect hard disk size parameters from
the BIOS. To correct this problem, use boot parameters to pass the correct
information to Linux. The parameter to pass is"hdx=cyl,heads,sect", where
hdx is the hard disk device (hda, hdb, hdc, or hdd). More information
is provided below on using these parameters to create cylinder counts
of less than 1024.
SCSI Hard Disks
In general, all SCSI hard disks use the LBA mode mentioned above. SCSI
hard disks do have a separate problem that EIDE hard disks do not have,
however. SCSI hard disks larger than 1 GB must have special treatment with
the 'fdisk' utility and while configuring the LILO boot manager. If your
SCSI hard disk is affected by this problem, 'fdisk' will display messages
regarding the problem when you prepare your hard disk. The expert mode
of 'fdisk' can be used to correct the SCSI problems. The LILO problems
are fixed by adjusting the '/etc/disktab' file. Both of these fixes are
described below with an example.
Why the Problem Arises
The problem with these larger hard disks is that the partition table must
be read before any operating system becomes active. The partition table
is accessed via the BIOS, which is limited to 256 heads, 63 sectors,
and 1023 cylinders. Because of this, the hard disk controller attempts
to convert (or translate) the true parameters of hard disks with more
than 1023 cylinders into values that can be accepted by the BIOS.
The partition table itself can always be found at the first cylinder,
first sector and first header (which is the same in any translation);
but because of this translation from the controller, if all data for
the boot process (such as the boot loader and operating system kernel)
are not found in the first 1024 cylinders, the BIOS cannot successfully
boot the system.
Partitions can be created above 1024 cylinders, but you cannot boot these
partitions because boot data in those high partitions cannot be accessed
until after the system is booted. This only causes trouble when a system
has multiple operating systems, and the user attempts to choose which
to boot.
A work-around solution is to create a small Linux partition below 1023
cylinders that can be used to boot the Linux system. This partition can
be as little as 15 MB, because it only needs to contain the kernel and
the root filesystem. The '/usr' directory and other information can be
stored in a second Linux partition located above 1024 cylinders. Use the
'fdisk' utility of another operating system such as OS/2 to create these
partitions. Then use the Linux 'fdisk' during installation to mark the
partitions as Type 0x83, Linux.
A better solution is to enter the correct combination of cylinders,
sectors, and heads that the hard disk controller is passing to the
BIOS. Use the 'fdisk' expert mode, as described below. The following
diagram shows an example of the translation of the physical values of
the hard disk to LBA direct block addressing, which is finally used by
the operating system to access the hard disk.
On the left, you can see that the physical layout of the hard disk is
very different from the logical (LBA) values reported. Most hard disks
have significantly fewer heads than are externally reported. The logical
values reported by the hard disk should conform to the limitations of
IDE or BIOS. In the case of an EIDE or SCSI controller, the controller
itself will do another translation.
SCSI hard disks are usually reported as 64 heads and 32 sectors, giving
a size of 64*32*512 Bytes = 1 MB per cylinder. EIDE usually reports 255
heads. The last translation is done by the operating system itself. Here
Linux uses logical block addressing (LBA) to refer to the blocks
sequentially from the first block to the last block on the hard disk.
Many controllers use two different models in order to provide cylinder
numbers under 1024. In most cases, the controller first tries to double
the number of heads. If this does not result in a cylinder count less
than 1024, the controller increases the actual values for heads and
sectors to the maximum possible number in order to minimize the number of
cylinders. This process is used, for example, by the Extended Translation
of the Adaptec controllers AH 274x/284x/294x. The NCR controller use a
variant by which the number of heads and sectors is chosen to provide
the correct size while being within the 1024 cylinder limit. Overlap
between partitions is thereby minimizes because each partition begins
and ends on a cylinder boundary.
The translation by an Adaptec controller of a 4 GB disk gives a count
of 255 heads, 63 sectors, and 522 cylinders.
Your task is to find out the translation that the controller is doing,
and enter the values that is passes for the hard disk into the expert
mode of 'fdisk'. As you do this, remember that the total size of the
hard disk must remain constant.
For example, assume that we have a computer with a 4 GB SCSI hard
disk. This is more than 1024 cylinders, so 'fdisk' gives a warning
during installation:
The number of cylinders for this disk is set to 4095.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
(e.g., DOS FDISK, OS/2 FDISK)
When you use the "p" command to display the partition table, you see a
sequence of error messages:
Device Boot Begin Start End Blocks Id System
/dev/sda1 1 1 754 771088+ 6 DOS 16-bit>32M
Partition 1 does not end on cylinder boundary:
phys=(95, 254, 63) should be (95, 63, 32)
/dev/sda2 * 97 754 1954 1228972+ 82 Linux swap
Partition 2 does not end on cylinder boundary:
phys=(248, 254, 63) should be (248, 63, 32)
/dev/sda3 1274 1954 2456 514080 a5 BSD/386
Partition 3 does not end on cylinder boundary:
phys=(312, 254, 63) should be (312, 63, 32)
/dev/sda4 2362 2456 4095 1678792+ 5 Extended
Partition 4 does not end on cylinder boundary:
phys=(521, 254, 63) should be (521, 63, 32)
/dev/sda5 2362 2456 2707 257008+ 83 Linux
/dev/sda6 2394 2707 2770 64228+ 83 Linux native
/dev/sda7 2402 2770 3436 682731 6 DOS 16-bit>32M
/dev/sda8 2487 3436 4095 674698+ 6 DOS 16-bit>32M
To correct these errors, new values must be provided for 'fdisk' so that
the partition boundaries match the values reported by the hard disk and
controller. In this example, the 4 GB hard disk shown above has 64 heads,
32 sectors, and 4095 cylinders, for a total capacity of 64*32*4095 bytes =
4095 MB.
If you set the number of heads to 255, and the number of sectors to 63
(a hint that this value is correct appears in the error messages shown
above), the partition still must have 4095 MB. So if 255*63*cylinders =
4095 MB, then the number of cylinders would be 522.
These new values must be entered in 'fdisk'. First, you must change
to the expert mode with the "x" command; then enter the new parameters
for the heads, sectors, and cylinders. In expert mode the commands "c"
(cylinders), "h" (heads), and "s" (sectors) can be used. According to
the calculation above, these values should be 255 heads and 63 sectors.
NOTE: If you are using DOS on your system, never enter a head count
of 256. This value will cause DOS to crash without comment.
Below is how the screen might look as you enter these new values in
'fdisk'.
Expert command (m for help): h Number of heads (1-256): 255
Expert command (m for help): s Number of sectors (1-63): 63
Warning: setting sector offset for DOS compatiblity
Expert command (m for help): c Number of cylinders (1-65535): 522
After these values are entered in the "fdisk" expert mode, return to the
normal main menu of "fdisk" with "r". Now using the "p" command should
show all partitions without the warnings shown in the first listing above.
Command (m for help): p Disk /dev/sda: 255 heads, 63 sectors, 522
cylinders Units = cylinders of 16065 * 512 bytes
Device Boot Begin Start End Blocks Id System
/dev/sda1 1 1 96 771088+ 6 DOS 16-bit>32M
/dev/sda2 * 97 97 249 1228972+ 82 Linux swap
/dev/sda3 250 250 313 514080 a5 BSD/386
/dev/sda4 314 314 522 1678792+ 5 Extended
/dev/sda5 314 314 345 257008+ 83 Linux native
/dev/sda6 346 346 353 64228+ 83 Linux native
/dev/sda7 354 354 438 682731 6 DOS 16-bit>32M
/dev/sda8 439 439 522 674698+ 6 DOS 16-bit>32M
If the error messages have not disappeared, you have not yet found the
right values. Try again with new values until the error messages do
not appear.
When you find the correct values, make a note of them in your system
documentation. You must enter these values each time you need to run
'fdisk'. They are not saved.
After the correct values are entered in expert mode, you can continue
working normally with 'fdisk' to create the partitions that you need to
install Linux on.
If you want to use LILO to boot Linux directly from the hard disk,
you must list the correct partitions in the file '/etc/fstab/. These
partitions are shown from the main menu of 'fdisk' once you have corrected
the information in expert mode. Change the partition display of 'fdisk'
from units to sectors with the "u" command. The sector values shown
correspond to the block values of the LBA mode.
Command (m for help): u Changing display/entry units to sectors
Display the revised partition table:
Command (m for help): p
Disk /dev/sda: 255 heads, 63 sectors, 522 cylinders
Units = sectors of 1 * 512 bytes
Device Boot Begin Start End Blocks Id System
/dev/sda1 63 63 1542239 771088+ 6 DOS 16-bit>32M
/dev/sda2 * 1542240 1542240 4000184 1228972+ 82 Linux swap
/dev/sda3 4000185 4000185 5028344 514080 a5 BSD/386
/dev/sda4 5028345 5028345 8385929 1678792+ 5 Extended
/dev/sda5 5028408 5028408 5542424 257008+ 83 Linux native
/dev/sda6 5542488 5542488 5670944 64228+ 83 Linux native
/dev/sda7 5671008 5671008 7036469 682731 6 DOS 16-bit>32M
/dev/sda8 7036533 7036533 8385929 674698+ 6 DOS 16-bit>32M
Now the start, size and end of the partition are no-longer displayed in
cylinders, but in sectors (which Linux uses to access the hard disk).
Enter these sector values in the file '/etc/disktab'. The entries in
this file would look like this for our example:
# Dev. BIOS Secs/ Heads/ Cylin Part.
# num. code track cylin. ders offset
0x801 0x80 63 255 522 63 # /dev/sda1
0x802 0x80 63 255 522 1542240 # /dev/sda2
0x803 0x80 63 255 522 4000185 # /dev/sda3
0x805 0x80 63 255 522 5028408 # /dev/sda5
0x806 0x80 63 255 522 5542488 # /dev/sda6
0x807 0x80 63 255 522 5671008 # /dev/sda7
0x808 0x80 63 255 522 7036533 # /dev/sda8
The process described here is a difficult one, and we cannot guarantee
your success for any particular hardware configuration. We hope that the
principal steps and concepts are clear, however. If you have trouble,
please contact Caldera for additional information or suggestions.