Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18612 - install disk kernels don't have auto-geometry resizing support
Summary: install disk kernels don't have auto-geometry resizing support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Everything (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-01 18:00 UTC by Andy Dustman
Modified: 2005-03-25 11:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Dustman 2003-04-01 18:00:56 UTC
The patch applied to 3.6.5-r1 vs. 3.6.5 does not seem to fix the fscking problems.
This causes checkroot to fail, and general consternation.

Reproducible: Always
Steps to Reproduce:
1. Boot
2.
3.

Actual Results:  
fsck complains about bad sectors that aren't, system reverts to single-user mode.

Expected Results:  
Boot normally

Apr  1 16:13:13 kenny kernel: hda: WDC WD400BB-75DEA0, ATA DISK drive
Apr  1 16:13:13 kenny kernel: hdc: MATSHITA CD-RW UJDA360, ATAPI CD/DVD-ROM drive
Apr  1 16:13:13 kenny kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Apr  1 16:13:13 kenny kernel: ide1 at 0x170-0x177,0x376 on irq 15
Apr  1 16:13:13 kenny kernel: blk: queue c031fa04, I/O limit 4095Mb (mask
0xffffffff)
Apr  1 16:13:13 kenny kernel: hda: setmax LBA 78165360, native  78125000
Apr  1 16:13:13 kenny kernel: hda: 78125000 sectors (40000 MB) w/2048KiB Cache,
CHS=4863/255/63, UDMA(100)
Apr  1 16:13:13 kenny kernel: Partition check:
Apr  1 16:13:13 kenny kernel:  /dev/ide/host0/bus0/target0/lun0: p1 p2 p3
Apr  1 16:13:13 kenny kernel: reiserfs: checking transaction log (device 03:03)
...
Apr  1 16:13:13 kenny kernel: Using r5 hash to sort names
Apr  1 16:13:13 kenny kernel: ReiserFS version 3.6.25
Apr  1 16:13:13 kenny kernel: VFS: Mounted root (reiserfs filesystem) readonly.
Apr  1 16:13:13 kenny kernel: Mounted devfs on /dev
Apr  1 16:13:13 kenny kernel: Freeing unused kernel memory: 260k freed
Apr  1 16:13:13 kenny kernel: Adding Swap: 996020k swap-space (priority -1)
Apr  1 16:13:13 kenny kernel: hda: dma_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: dma_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: hda: dma_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: dma_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: hda: dma_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: dma_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: hda: dma_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: dma_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: hda: DMA disabled
Apr  1 16:13:13 kenny kernel: ide0: reset: success
Apr  1 16:13:13 kenny kernel: hda: read_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: read_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: hda: read_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: read_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: hda: read_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: read_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: hda: read_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: read_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: ide0: reset: success
Apr  1 16:13:13 kenny kernel: hda: read_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: read_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112
Apr  1 16:13:13 kenny kernel: end_request: I/O error, dev 03:03 (hda), sector
75907112

Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r0)
=================================================================
System uname: 2.4.20 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo
http://distro.ibiblio.org/gentoo http://gentoo.oregonstate.edu "
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow apm avi crypt encode gif jpeg libg++ libwww mikmod mmx mpeg
ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml gdbm
berkdb slang readline bonobo java guile mysql X sdl gpm tcpd pam ssl perl python
esd imlib oggvorbis gnome gtk opengl mozilla cdr -motif -svga -qt -kde -arts
gtk2 alsa innodb cups ldap i8x0"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -mno-sse2 -O2 -mpreferred-stack-boundary=2
-finline-functions -falign-jumps=4 -falign-loops=4 -falign-functions=32 -pipe"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-04-02 15:22:33 UTC
maybe your hd has bad sectors ?
Comment 2 Brandon Low (RETIRED) gentoo-dev 2003-04-02 15:26:21 UTC
This is not a reisrfsprogs bug, this is a kernel issue.

Please make sure that the kernle you are using fully supports your hard disk drive controller, and that you have no hardware issues.

Test perhaps gs-sources, a recent ac-sources or aa-sources, or perhaps the gentoo-sources for kernels with more recent IDE support than the vanilla-2.4.20 that you appear to be running.
Comment 3 Andy Dustman 2003-04-03 10:01:03 UTC
No, reverting to the old version of reiserfsprogs fixes the problem. I have had this happen on two completely different systems. The latest was on a Dell with an I845 chipset which is well-supported. This is the system that produced the errors included in the original bug report. The other is an ASUS A7N8X with an Nvidia NForce2 chipset which is running gs-sources at the moment. Both of these systems are less than a month old, and both work fine with reiserfsprogs-3.6.4. reiserfsprogs-3.6.5 is doing something wonky. For a while I thought it was trying to seek past the end of the device, but I don't think the data supports that. It certainly is close to the end, though.
Comment 4 Andy Dustman 2003-04-03 11:50:27 UTC
OK, I decided to test the bad sector/seek theory:

# dd if=/dev/hda3 of=/dev/null bs=512
dd: reading `/dev/hda3': Input/output error
75875896+0 records in
75875896+0 records out

I'm beginning to think this is a cfdisk problem or something, since I used cfdisk to partition both system. Note the drive parameters:

Apr  1 16:13:13 kenny kernel: hda: 78125000 sectors (40000 MB) w/2048KiB Cache,
CHS=4863/255/63, UDMA(100)

and the error was:

Apr  1 16:13:13 kenny kernel: hda: dma_intr: status=0x51 { DriveReady
SeekComplete Error }
Apr  1 16:13:13 kenny kernel: hda: dma_intr: error=0x10 { SectorIdNotFound },
LBAsect=78156212, sector=75907112

78156212 >= 78125000, so it is seeking past the end of the device.

On the dd test:

Apr  3 11:32:13 kenny kernel: hda: dma_intr: status=0x53 { DriveReady SeekComplete Index Error }
Apr  3 11:32:13 kenny kernel: hda: dma_intr: error=0x10 { SectorIdNotFound }, LBAsect=78125000, sector=75875856

Assuming LBAsect is indexed from 0, it is also going past the end.

Looking at /proc/partitions, it looks like the partitions do not add up correctly:

kenny root # cat /proc/partitions
major minor  #blocks  name
 
   3     0   39062500 ide/host0/bus0/target0/lun0/disc
   3     1     128488 ide/host0/bus0/target0/lun0/part1
   3     2     996030 ide/host0/bus0/target0/lun0/part2
   3     3   37953562 ide/host0/bus0/target0/lun0/part3
kenny root # python
Python 2.2.2 (#1, Jan 28 2003, 23:32:54)
[GCC 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 39062500*2
78125000
>>> 128488+996030+37953562
39078080
>>> _*2
78156160
>>>

Partitions were initialized with cfdisk, and the last partition was allocated to use the default amount of space, i.e. to the end of the disk. The new reiserfsprogs must only be exposing this problem.
Comment 5 Brandon Low (RETIRED) gentoo-dev 2003-04-03 12:00:25 UTC
It appears that you are correct, Vitaly of the ReiserFS team has taken a look at this bug and his initial diagnosis was the same as mine (hardware problem) upon further inspection he came to the same conclusion you did of partition table issue.

The fact of the matter is that reiserfsprogs <= 3.6.4 did not do ANY checking at boot up, so the new version is as you say just 'exposing the problem' since it now does some basic structure checks at bootup.
Comment 6 Brandon Low (RETIRED) gentoo-dev 2003-04-03 12:05:11 UTC
I may be wrong on this, but moving the end of the partition to the correct location and then running fsck.reiserfs --rebuild-tree should take care of it (or maybe you will need to resizereiserfs first... do some reading online to figure it out.  As for the cfdisk issue, I'm looking in to either updating the package or filing a bug with them upstream.
Comment 7 Andy Dustman 2003-04-03 13:53:43 UTC
Yeah, I plan to use fdisk+resize_reiserfs to fix this as soon as I get a chance to boot off the install CD (and back some stuff up first; maybe this is a good opportunity to try mondo on Gentoo...). I'm not sure the order matters, but I think I'll resize/shrink the filesystem first, then fix the partition. I'll report back the results; this would probably be a good thing to document (maybe in the newsletter) because I expect it's a fairly common problem.
Comment 8 Andy Dustman 2003-04-03 19:05:14 UTC
OK, the problem is much deeper and weirder than first thought... Review:

Apr  1 16:13:13 kenny kernel: hda: 78125000 sectors (40000 MB) w/2048KiB Cache,
CHS=4863/255/63, UDMA(100)

However, when I boot from the Gentoo-1.4-rc3 install disk:

Linux version 2.4.20-xfs_pre6 (root@ToyRoom) (gcc version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207)) #1 Thu Feb 27 03:41:27 Local time zone must be set--see
zic manu
...
hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63, (U)DMA

Surprise! 2.4.20-xfs_pre6 thinks the disk is bigger by two cylinders.

So cfdisk is not the culprit (it gives exact same results as fdisk) but there is an unpleasant bug in your install disk kernel.

I will try this on my other system later tonight to see if it exhibits the same behavior. However, I do know that they are both using Western Digital drives (different models).
Comment 9 Brandon Low (RETIRED) gentoo-dev 2003-04-03 19:05:48 UTC
(what kernel version is this? - I see, 2.4.20)

According to WD, this disk has 78,165,360 sectors.
So, in case it was partitioned with such a size maybe nothing was wrong.

The boot messages shown say:
  kenny kernel: hda: setmax LBA 78165360, native  78125000
How come setmax has the right value and native has not?

Did other software clip the disk?
What is the identify data for this drive?

Was the partitioning done with a kernel that had CONFIG_IDEDISK_STROKE
enabled?


Andries

The above came from the linux kernel mailing list WRT to this bug.  Looks like good questions...
Comment 10 Brandon Low (RETIRED) gentoo-dev 2003-04-03 19:09:07 UTC
Based on your last comment and my last comment, I get the feeling that this is an issue of new IDE core vs. old IDE core view of disks.  According to Andries comment, your partitioning was correct based on the infos from WD, so I would guess that the stock 2.4.20 IDE core wasn't reading the whole thing.  Can you try using linux-2.4.21-pre[56] and see if the errors disappear, please?
Comment 11 Andy Dustman 2003-04-03 19:19:22 UTC
I'll have to let you know tomorrow (hopefully before noon EST) for this system. I'll check my home system later tonight (running gs-sources-2.4.20_pre6) to see if there is any mismatch with the 2.4.20-xfs_pre6.

I don't have answers for Andries, but maybe you do now that you know it was partitioned with 2.4.20-xfs_pre6.
Comment 12 Andy Dustman 2003-04-03 21:43:17 UTC
On my home system:

Gentoo-1.4-rc3 install CD:
Linux version 2.4.20-xfs_pre6 (root@ToyRoom) (gcc version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207)) #1 Thu Feb 27 03:41:27 Local time zone must be set--see
zic manu
...
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
NFORCE2: IDE controller on PCI bus 00 dev 48
NFORCE2: chipset revision 162
NFORCE2: not 100% native mode: will probe irqs later
AMD_IDE: Bios didn't set cable bits corectly. Enabling workaround.
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
AMD_IDE: PCI device 10de:0065 (nVidia Corporation) (rev a2) UDMA100 controller on pci00:09.0
NFORCE2: default first interface base=0x01f0, second interface base=0x170
    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA
hda: WDC WD800BB-75CAA0, ATA DISK drive
hdb: Maxtor 94610H6, ATA DISK drive
hdc: ATAPI 52X CDROM, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
blk: queue 803c4104, I/O limit 4095Mb (mask 0xffffffff)
hda: host protected area => 1
hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=9729/255/63, UDMA(100)
blk: queue 803c4240, I/O limit 4095Mb (mask 0xffffffff)
hdb: host protected area => 1
hdb: 90045648 sectors (46103 MB) w/2048KiB Cache, CHS=5605/255/63, UDMA(100)
...

2.4.21_pre6-gss:
Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
NFORCE2: IDE controller at PCI slot 00:09.0
NFORCE2: chipset revision 162
NFORCE2: not 100% native mode: will probe irqs later
AMD_IDE: Bios didn't set cable bits corectly. Enabling workaround.
AMD_IDE: PCI device 10de:0065 (nVidia Corporation) (rev a2) UDMA100 controller on pci00:09.0
    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA
hda: WDC WD800BB-75CAA0, ATA DISK drive
hdb: Maxtor 94610H6, ATA DISK drive
blk: queue c034a600, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c034a73c, I/O limit 4095Mb (mask 0xffffffff)
hdc: ATAPI 52X CDROM, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: host protected area => 1
hda: setmax LBA 156301488, native  156250000
hda: 156250000 sectors (80000 MB) w/2048KiB Cache, CHS=9726/255/63, UDMA(100)
hdb: host protected area => 1
hdb: 90045648 sectors (46103 MB) w/2048KiB Cache, CHS=5605/255/63, UDMA(100)
...

Note that there is a mismatch on hda (WDC WD800BB-75CAA0) -- 9729 vs. 9726 cylinders -- but not on hdb (Maxtor 94610H6). hdb is the drive from my old Red Hat installation; it has not been repartitioned with Gentoo yet.

Here's a fragment of the config for 2.4.21_pre6-gss:

#
# ATA/IDE/MFM/RLL support
#
CONFIG_IDE=y
                                                                                
#
# IDE, ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y
                                                                                
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
CONFIG_BLK_DEV_IDECD=m
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
CONFIG_BLK_DEV_IDESCSI=m
# CONFIG_IDE_TASK_IOCTL is not set
 
#
# IDE chipset support/bugfixes
#
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_PCI_WIP=y
CONFIG_BLK_DEV_ADMA=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_WDC_ALI15X3 is not set
CONFIG_BLK_DEV_AMD74XX=y
# CONFIG_AMD74XX_OVERRIDE is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_HPT34X_AUTODMA is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_PDC202XX_FORCE is not set
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_DMA_NONPCI is not set
CONFIG_BLK_DEV_IDE_MODES=y
# CONFIG_BLK_DEV_ATARAID is not set
# CONFIG_BLK_DEV_ATARAID_PDC is not set
# CONFIG_BLK_DEV_ATARAID_HPT is not set
# CONFIG_BLK_DEV_ATARAID_SII is not set
Comment 13 Brandon Low (RETIRED) gentoo-dev 2003-04-03 21:45:44 UTC
Hmm... I'm going to go with a BIG wtf and re-CC x86-kernel on this so that LiveWire can tell us what the difference between those two kernels is.
Comment 14 Bob Johnson (RETIRED) gentoo-dev 2003-04-03 22:07:07 UTC
its nforce2.. the xfs-sources is using alron/alains? driver which 
is basically just a hack till something better was available. 
2.4.21_pre6 should finally have somewhat decent support. 
 
so, this isnt part of the ide_core thats been added to xfs-sources.. 
seperate patch.   
fyi, this patch is in gaming-sources, and i thought gentoo-sources also. 
Comment 15 Andy Dustman 2003-04-03 22:31:09 UTC
Just a reminder/clarification here: There are two different systems here.

The one with the 40 GB WD has the I845 chipset (kenny, Pentium-4, at work). This is the one in the initial report.

The one with the 80 GB WD and 45 GB Maxtor has the NForce2 chipset (chef, Athlon-XP, at home).

I have only tested chef with 2.4.21_pre6-gss and won't get an opportunity to test kenny until tommorrow a.m.

In other words, the problem doesn't seem to be specific to a particular chipset, although there is a nugget of circumstantial evidence that it may be specific to Western Digital drives, but only a very small nugget.
Comment 16 Brandon Low (RETIRED) gentoo-dev 2003-04-04 10:35:30 UTC
Well, another helpful comment on LKML suggests going to CHS mode instead of LBA mode in BIOS to fix your problem...  Now on your nforce2 board I don't guarantee anything, but on your work system, I expect that should fix it just fine.
Comment 17 Andy Dustman 2003-04-04 11:48:37 UTC
The work machine is a Dell Optiplex GX260, and it's BIOS doesn't have an option for selecting between CHS and LBA. It *does* claim that the drive capacity is 40000 MB (it doesn't list cylinders, etc.), which is what 2.4.20 says it is, whereas the boot CD kernel says it's 40021 MB. Could the BIOS be reporting an incorrect size? (Also, as expected, 2.4.21_pre6-gss on this machine works the same as 2.4.20.)

On my home machine (NForce2), I'm pretty sure I can select between CHS and LBA.
Comment 18 Andy Dustman 2003-04-06 12:14:04 UTC
Neither CHS mode nor 2.4.21_pre7-gss (separately or together) seem to make any difference over LBA mode or 2.4.20 or 2.4.21_pre6.

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
NFORCE2: IDE controller at PCI slot 00:09.0
NFORCE2: chipset revision 162
NFORCE2: not 100% native mode: will probe irqs later
AMD_IDE: Bios didn't set cable bits corectly. Enabling workaround.
AMD_IDE: PCI device 10de:0065 (nVidia Corporation) (rev a2) UDMA100 controller on pci00:09.0
    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA
hda: C/H/S=38296/16/255 from BIOS ignored
hda: WDC WD800BB-75CAA0, ATA DISK drive
hdb: Maxtor 94610H6, ATA DISK drive
blk: queue c034c600, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c034c73c, I/O limit 4095Mb (mask 0xffffffff)
hdc: ATAPI 52X CDROM, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: attached ide-disk driver.
hda: host protected area => 1
hda: setmax LBA 156301488, native  156250000
hda: 156250000 sectors (80000 MB) w/2048KiB Cache, CHS=155009/16/63, UDMA(100)
hdb: attached ide-disk driver.
hdb: host protected area => 1
hdb: 90045648 sectors (46103 MB) w/2048KiB Cache, CHS=5605/255/63, UDMA(100)
Partition check:
 /dev/ide/host0/bus0/target0/lun0: [PTBL] [9726/255/63] p1 p2 p3
 /dev/ide/host0/bus0/target1/lun0: p1 p2 < p5 p6 p7 p8 p9 p10 >
Comment 19 Andy Dustman 2003-04-06 12:52:55 UTC
Enabling CONFIG_IDEDISK_STROKE seems to fix it. The docs for that options specifically refer to the AWARD BIOS. (In fact, Documentation/Configure.help refers to it as "AWARD Bios Work-Around".) My home system has a Phoenix BIOS. The option is off by default and the docs suggest disabling it if you're not sure that you need it. Perhaps this should be reconsidered.

I haven't actually tried the newer reiserfsprogs with this setup, but it seems likely to work since it now reports the correct size (or at least, the same as the boot CD's kernel).
Comment 20 Andy Dustman 2003-06-11 13:57:23 UTC
I suppose you can close this bug. What it amounted to was that the install CD kernel had CONFIG_IDEDISK_STROKE and the kernels I was trying to use did not, and this produced a size mismatch that was detected by newer reiserfsprogs fsck. The real root of the problem is a documentation bug: CONFIG_IDEDISK_STROKE claims to be an "AWARD BIOS work-around", but it is definitely not limited to only the AWARD BIOS. The kernel docs need to be updated. As of 2.4.21_pre6-gss, it still says:

CONFIG_IDEDISK_STROKE
  Should you have a system w/ an AWARD Bios and your drives are larger
  than 32GB and it will not boot, one is required to perform a few OEM
  operations first.  The option is called "STROKE" because it allows
  one to "soft clip" the drive to work around a barrier limit.  For
  Maxtor drives it is called "jumpon.exe".  Please search Maxtor's
  web-site for "JUMPON.EXE".  IBM has a similar tool at:
  <http://www.storage.ibm.com/hdd/support/download.htm>.
 
  If you are unsure, say N here.

I think 2.5 sources have better documentation that could be backported, but I don't have them handy at the moment. IIRC, it's called "auto-geometry support" or something like that.
Comment 21 witr 2003-07-08 20:09:55 UTC
As a cross reference, this problem has been discussed in the forums:  http://forums.gentoo.org/viewtopic.php?p=404543.
Comment 22 Andy Dustman 2003-10-06 10:04:42 UTC
The 2.6 docs are no better for this option. The documentation is just wrong:
IDEDISK_STROKE (called "Auto-Geometry Resizing support" in 2.6 and "AWARD
Bios Work-Around" in 2.4) is needed for many non-AWARD systems.

Unless one of the Gentoo developers is going to try to get the kernel documentation
fixed, this bug should probably be closed.
Comment 23 Andy Dustman 2004-03-10 14:22:08 UTC
Going nowhere slow. Documentation bug.
Comment 24 Tim Yamin (RETIRED) gentoo-dev 2004-03-10 14:38:01 UTC
Andy, you might want to file a bug at http://bugme.osdl.org with the upstream kernel developers. Thanks.
Comment 25 Andy Dustman 2004-07-16 07:10:05 UTC
Apparently the IDEDISK_STROKE option has been removed as of 2.6.7. When set, it defines idedisk_set_max_address(). In 2.6.7, this is defined all the time, so instead of being an option, it's now mandatory.

As of 2.4.26, IDEDISK_STROKE is still an optional feature, and the docs still refer to it as being an AWARD BIOS problem, which it isn't.

I strongly believe this option should be turned on for all Gentoo install disc kernels. If you use 2.6.7 or newer, you don't really have a choice. Without it, you run a serious risk of paritioning your disk during the install such that the last partition is too large. That little problem is not a fun one to fix later on.

I'm updating the summary, changing the component, and adding livecd@gentoo.org to reflect this.
Comment 26 roger55 (RETIRED) gentoo-dev 2004-07-16 10:08:45 UTC
According to this thread: http://marc.theaimsgroup.com/?l=linux-kernel&m=108741709003473&w=2  the option is removed from the config in 2.6.7 and one now has to boot with 'hdX=stroke' to achieve the autoresizing effect.

This should probably be mentioned in the handbook.

Cheers Roger


Comment 27 Andy Dustman 2004-07-16 11:09:42 UTC
Interesting, because both a 2.6.8-rc1 system and 2.6.7 system seem to be doing something different without passing that command line parameter:

Jul 15 11:31:18 kenny Linux version 2.6.8-rc1 (root@kenny.terry.uga.edu) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #1 Thu Jul 15 10:51:32 EDT 2004
Jul 15 11:31:18 kenny Kernel command line: root=/dev/hda3
Jul 15 11:31:18 kenny hda: WDC WD400BB-75DEA0, ATA DISK drive
Jul 15 11:31:18 kenny ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Jul 15 11:31:18 kenny hdc: MATSHITA CD-RW UJDA360, ATAPI CD/DVD-ROM drive
Jul 15 11:31:18 kenny ide1 at 0x170-0x177,0x376 on irq 15
Jul 15 11:31:18 kenny hda: max request size: 128KiB
Jul 15 11:31:18 kenny hda: Host Protected Area detected.
Jul 15 11:31:18 kenny   current capacity is 78125000 sectors (40000 MB)
Jul 15 11:31:18 kenny   native  capacity is 78165360 sectors (40020 MB)
Jul 15 11:31:18 kenny hda: 78125000 sectors (40000 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)
Jul 15 11:31:18 kenny /dev/ide/host0/bus0/target0/lun0: p1 p2 p3

Note that the geometry it is coming up with is 65535/16/63, which just can't be right, because that's only 66059280 sectors.

I *think* what is different also between 2.4 and 2.6 is the way the HPA is handled. 2.6 has idedisk_check_hpa(), which is invoked by init_idedisk_capacity(); it looks heavily refactored from 2.4.

It may be that what I have now is working because I resized the parition with cfdisk specifying the right geometry. In practice, it looks like you do need to have the stroke option to (possibly) reduce the capacity of the drive if there is an HPA, by my reading of the code (drivers/ide/ide-disk.c).

Anyway... I am pretty sure if you don't stroke on the install disk, you have the strong possibility with IDE disks of making partitions too large, and it doesn't look like the capacity will be reduce unnecessarily. Even if the end-user compiles a kernel without IDE_STROKE (2.4, 2.6.6-) or doesn't pass the hdx=stroke option (2.6.7+), it may overestimate the capacity of the drive, but the partitions (and filesystems) will already be created, so it shouldn't be an issue unless you try to image the entire drive; then you'll get errors towards the end but still have all your data.
Comment 28 Chris Gianelloni (RETIRED) gentoo-dev 2004-07-16 13:17:53 UTC
I've added this to the kernel config for 2004.2, so I'm resolving it.

Roger, can you make sure to verify if the option is indeed needed, and if it is, submit it to the documentation team ASAP?

Thanks
Comment 29 Chris Gianelloni (RETIRED) gentoo-dev 2005-03-25 11:23:56 UTC
Moving these so we can remove the "Install CD" component from "Gentoo Linux".

I apologize to everyone for this spam, but according to the bugzilla developers,
this is the only reasonable way to do this.