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

Robert Laufer (laufer@wicx50.informatik.uni-wuerzburg.de)
Mon, 3 Jun 1996 17:48:05 +0200 (MET DST)


Leonard N. Zubkoff (lnz@dandelion.com) wrote:
: From: "Eric S. Mountain" <eric@minouche.demon.co.uk>
: Date: Sun, 2 Jun 1996 15:05:57 +0100 (BST)

: I'm slightly puzzled by some recent changes to the AHA152X SCSI driver
: which seem to have broken fdisk and hdparm's idea of what my SCSI HD
: looks like (though everything else works).

: I got my SCSI HD when Linux was at 1.3.91. All worked fine: SCSI
: stuff compiled as modules, "Automatic Disk Geometry determination
: (CONFIG_SCSI_AUTO_BIOSP)" set on and aha152x selected. Partitioned my
: drive as follows:
: --------------------------------------------------------------------
: Disk /dev/sda: 34 heads, 61 sectors, 1017 cylinders
: Units = cylinders of 2074 * 512 bytes

: Now, with 1.99.9 (pre2.0.9), I get:
: --------------------------------------------------------------------
: Disk /dev/sda: 255 heads, 63 sectors, 131 cylinders
: Units = cylinders of 16065 * 512 bytes

: Are you booting off an IDE drive by any chance?

: It's unfortunate that you installed this drive with the CONFIG_SCSI_AUTO_BIOSP
: option turned on. It was a badly broken idea. Most SCSI controllers implement
: only a small number of cylinder/head/sector translations, and using one not
: supported by the controller and driver will lead to a disk that can never be
: booted by the BIOS. If the driver provides a function to provide the
: translation, then the driver must be consulted not overridden as the old code
: did.

: You can certainly patch the aha152x driver as you've done, but I really
: recommend that your rebuild your disk when you can using the correct
: translations.

: Leonard

The correct translations are allright, but IMO it couldn`t be that
someone must rebuild his disk only of this changes.
Why can't the aha152x driver accept the values of the partition-table it
gets from the Bios?!

Robert.

--
          >_,<
          (oo)  Robert Laufer
  ,-------(._.) Student of Computer Science at Universit"at W"urzburg
 / |     ||     email: laufer@informatik.uni-wuerzburg.de
*  ||W--'||     www: http://www-info3.informatik.uni-wuerzburg.de/~laufer
======================ooO== o ==Ooo======================================
                          (o o)
                          //|\\

Here is my error-report:

I used the AHA152x low-level driver for my controller AHA2825. I got errors since changes in 1.3.98 and still doesn't work since changes in 1.99.5 alias pre2.0.5. That were the last changes in aha152x.[ch] until 1.99.9 either. I just noticed the bug when I wanted to upgrade from 1.99.4 to 1.99.9. Lilo gave me the error-message listed below. The previous version I used was 1.3.97 and worked well, since the changes were made in 1.3.98.

###################### 1.3.97 ###################### root@walker:~# lilo added linux* [...] root@walker:~# fdisk_v2.1 /dev/sda

The number of cylinders for this disk is set to 2103. 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)

Command (m for help): p

Disk /dev/sda: 64 heads, 32 sectors, 2103 cylinders Units = cylinders of 2048 * 512 bytes

Device Boot Begin Start End Blocks Id System /dev/sda1 1 1 501 513008 83 Linux native /dev/sda2 502 502 1002 513024 83 Linux native /dev/sda3 1003 1003 1503 513024 83 Linux native /dev/sda4 1024 1504 2103 614400 5 Extended /dev/sda5 1024 1504 1554 52208 82 Linux swap /dev/sda6 1024 1555 2055 513008 83 Linux native /dev/sda7 2048 2056 2103 49136 83 Linux native

Command (m for help): q root@walker:~# fdisk_v3.04 -l /dev/sda Disk /dev/sda: 64 heads, 32 sectors, 2103 cylinders Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System /dev/sda1 0+ 500 501- 513008 83 Linux native /dev/sda2 501 1001 501 513024 83 Linux native /dev/sda3 1002 1502 501 513024 83 Linux native /dev/sda4 1503 2102 600 614400 5 DOS Extended /dev/sda5 1503+ 1553 51- 52208 82 Linux swap /dev/sda6 1554+ 2054 501- 513008 83 Linux native /dev/sda7 2055+ 2102 48- 49136 83 Linux native

###################### 1.3.98 ###################### root@walker:~# lilo Device 0x0800: Invalid partition table, 2nd entry 3D address: 1/0/501 (8048565) Linear address: 31/221/63 (1026048) root@walker:~# fdisk_v2.1 /dev/sda You must set heads. You can do this from the extra functions menu.

Command (m for help): p

Disk /dev/sda: 0 heads, 63 sectors, 267 cylinders Units = cylinders of 1 * 512 bytes

Device Boot Begin Start End Blocks Id System /dev/sda1 64 33 1026048 513008 83 Linux native /dev/sda2 1 1026049 2052096 513024 83 Linux native /dev/sda3 1 2052097 3078144 513024 83 Linux native /dev/sda4 4001 3078145 4306944 614400 5 Extended /dev/sda5 4001 3078177 3182592 52208 82 Linux swap /dev/sda6 4001 3182625 4208640 513008 83 Linux native /dev/sda7 4001 4208673 4306944 49136 83 Linux native

Command (m for help): q root@walker:~# fdisk_v3.04 -l /dev/sda Disk /dev/sda: 0 heads, 63 sectors, 267 cylinders Units = megabytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MB #blocks Id System /dev/sda1 0+ 500 501- 513008 83 Linux native partition ends on cylinder 500, beyond the end of the disk /dev/sda2 501 1001 501 513024 83 Linux native partition ends on cylinder 1001, beyond the end of the disk /dev/sda3 1002 1502 501 513024 83 Linux native partition ends on cylinder 1023, beyond the end of the disk /dev/sda4 1503 2102 600 614400 5 DOS Extended partition ends on cylinder 1023, beyond the end of the disk /dev/sda5 1503+ 1553 51- 52208 82 Linux swap partition ends on cylinder 1023, beyond the end of the disk /dev/sda6 1554+ 2054 501- 513008 83 Linux native partition ends on cylinder 1023, beyond the end of the disk /dev/sda7 2055+ 2102 48- 49136 83 Linux native partition ends on cylinder 1023, beyond the end of the disk

###################### 1.99.9 alias pre2.0.9 ###################### root@walker:~# lilo Device 0x0800: Invalid partition table, 2nd entry 3D address: 1/0/501 (8048565) Linear address: 31/221/63 (1026048) root@walker:~# fdisk_v2.1 /dev/sda

Command (m for help): p

Disk /dev/sda: 255 heads, 63 sectors, 268 cylinders Units = cylinders of 16065 * 512 bytes

Device Boot Begin Start End Blocks Id System /dev/sda1 1 1 64 513008 83 Linux native Partition 1 has different physical/logical beginnings (non-Linux?): phys=(0, 1, 1) logical=(0, 0, 33) Partition 1 has different physical/logical endings: phys=(500, 63, 32) logical=(63, 221, 30) Partition 1 does not end on cylinder boundary: phys=(500, 63, 32) should be (500, 254, 63) /dev/sda2 502 64 128 513024 83 Linux native Partition 2 has different physical/logical beginnings (non-Linux?): phys=(501, 0, 1) logical=(63, 221, 31) Partition 2 has different physical/logical endings: phys=(1001, 63, 32) logical=(127, 187, 60) Partition 2 does not end on cylinder boundary: phys=(1001, 63, 32) should be (1001, 254, 63) /dev/sda3 1003 128 192 513024 83 Linux native Partition 3 has different physical/logical beginnings (non-Linux?): phys=(1002, 0, 1) logical=(127, 187, 61) Partition 3 has different physical/logical endings: phys=(1023, 63, 32) logical=(191, 154, 27) Partition 3 does not end on cylinder boundary: phys=(1023, 63, 32) should be (1023, 254, 63) /dev/sda4 1024 192 269 614400 5 Extended Partition 4 has different physical/logical beginnings (non-Linux?): phys=(1023, 63, 32) logical=(191, 154, 28) Partition 4 has different physical/logical endings: phys=(1023, 63, 32) logical=(268, 24, 12) Partition 4 does not end on cylinder boundary: phys=(1023, 63, 32) should be (1023, 254, 63) /dev/sda5 1024 192 199 52208 82 Linux swap /dev/sda6 1024 199 262 513008 83 Linux native /dev/sda7 1024 262 269 49136 83 Linux native

Command (m for help): q root@walker:~# fdisk_v3.04 -l /dev/sda Disk /dev/sda: 255 heads, 63 sectors, 268 cylinders Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System /dev/sda1 0+ 63- 64- 513008 83 Linux native start: (c,h,s) expected (0,0,33) found (0,1,1) end: (c,h,s) expected (63,221,30) found (500,63,32) partition ends on cylinder 500, beyond the end of the disk /dev/sda2 63+ 127- 64- 513024 83 Linux native start: (c,h,s) expected (63,221,31) found (501,0,1) end: (c,h,s) expected (127,187,60) found (1001,63,32) partition ends on cylinder 1001, beyond the end of the disk /dev/sda3 127+ 191- 64- 513024 83 Linux native start: (c,h,s) expected (127,187,61) found (1002,0,1) end: (c,h,s) expected (191,154,27) found (1023,63,32) partition ends on cylinder 1023, beyond the end of the disk /dev/sda4 191+ 268- 77- 614400 5 DOS Extended start: (c,h,s) expected (191,154,28) found (1023,63,32) end: (c,h,s) expected (268,24,12) found (1023,63,32) partition ends on cylinder 1023, beyond the end of the disk /dev/sda5 191+ 198- 7- 52208 82 Linux swap start: (c,h,s) expected (191,154,60) found (1023,63,32) end: (c,h,s) expected (198,27,21) found (1023,63,32) partition ends on cylinder 1023, beyond the end of the disk /dev/sda6 198+ 261- 64- 513008 83 Linux native start: (c,h,s) expected (198,27,54) found (1023,63,32) end: (c,h,s) expected (261,248,51) found (1023,63,32) partition ends on cylinder 1023, beyond the end of the disk /dev/sda7 261+ 268- 7- 49136 83 Linux native start: (c,h,s) expected (261,249,21) found (1023,63,32) end: (c,h,s) expected (268,24,12) found (1023,63,32) partition ends on cylinder 1023, beyond the end of the disk

Command (m for help): v Warning: partition 3 overlaps partition 5. Warning: partition 3 overlaps partition 6. Warning: partition 5 overlaps partition 6. Warning: partition 6 overlaps partition 7. Logical partition 5 not entirely in partition 4 Logical partition 6 not entirely in partition 4 981017 unallocated sectors

Command (m for help): q

------------- after adjusting heads/sectors/cylinders: NOTE: I didn't write it to disk !!! ------------- root@walker:~# fdisk_v2.1 /dev/sda [adjusting cut] Command (m for help): p

Disk /dev/sda: 64 heads, 32 sectors, 2103 cylinders Units = cylinders of 2048 * 512 bytes

Device Boot Begin Start End Blocks Id System /dev/sda1 1 1 501 513008 83 Linux native /dev/sda2 502 502 1002 513024 83 Linux native /dev/sda3 1003 1003 1503 513024 83 Linux native /dev/sda4 1024 1504 2103 614400 5 Extended /dev/sda5 1024 1504 1554 52208 82 Linux swap /dev/sda6 1024 1555 2055 513008 83 Linux native /dev/sda7 2048 2056 2103 49136 83 Linux native