Re: My SCSI HD has 34 heads, not 255...

Andries.Brouwer@cwi.nl
Sat, 15 Jun 1996 12:52:14 +0200


Thomas E Zerucha:

: Is it the kernel's job to return some random number, or to return the
: correct geometery?

There does not exist a correct geometry. The numbers of heads, sectors,
cylinders are a fiction for SCSI disks, and various systems and
controllers use different fictions.

Linux does not use CHS at all, so, except when booting or using
fdisk it does not matter (for Linux) what geometry you invent.

: Which of my four systems should I run the FDISK on?

Doesn't matter. It will run fine on all of them.

: Running the linux fdisk to create a
: new linux partition anywhere else would destroy the DOS partition.

I don't think so. (And `the' linux fdisk is undefined. There are several.)

:: If you really need to use LILO or FDISK, they both provide options
:: to handle this case. If you are just accessing file systems,
:: where's the problem?

: This functionality is not documented (for fdisk) in the manpage, nor
: online.

Hmm. For fdisk 3.04:
...
-C cylinders
Specify the number of cylinders, possibly
overriding what the kernel thinks.

-H heads
Specify the number of heads, possibly overriding
what the kernel thinks.

-S sectors
Specify the number of sectors, possibly overriding
what the kernel thinks.
...

For fdisk 2.1:
...
If possible, fdisk will obtain the disk geometry
automatically. This is not necessarily the physical disk
geometry, but is the disk geometry that MS-DOS uses for
the partition table. If fdisk warns you that you need to
set the disk geometry, please believe this statement, and
set the geometry. This should only be necessary with
certain SCSI host adapters ...
...

For cfdisk:
...
cfdisk first tries to read the geometry of the hard disk.
If it fails, an error message is displayed and cfdisk
exits. This should only happen when partitioning a SCSI
drive on an adapter without a BIOS. To correct this
problem, you can set the cylinders, heads and sectors-per-
track on the command line.
...

No reason to use kernel patches as a substitute for reading the docs.

Andries