From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: jmk@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] WD hard disk not available in partdisk MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Fri, 5 Jul 2002 11:20:21 -0400 Topicbox-Message-UUID: c2f37b14-eaca-11e9-9e20-41e7f4b1d025 A dumb bug, I fear, introduced between the 2nd and 3rd Edition, but I'd like confirmation from another party. I believe the code around line 590 of sdata.c has the 'current' and 'logical' sectors swapped and should be if(drive->info[Ivalid] & 0x0001){ drive->c = drive->info[Iccyl]; drive->h = drive->info[Ichead]; drive->s = drive->info[Icsec]; } else{ drive->c = drive->info[Ilcyl]; drive->h = drive->info[Ilhead]; drive->s = drive->info[Ilsec]; } Your old drive does not have LBA mode so this assignment becomes important. What puzzles me is that this hasn't caused problems before, as it can lead to division by zero later on. This applies to both the kernel and 9load. In the later ATA/ATAPI 'standards' all this was finessed away by stating that all drives will support LBA mode. I've tested this on a WD AC2120 (125MB, my disc is smaller than your disc). --jim On Thu Jul 4 16:46:16 EDT 2002, nu3e@arrl.net wrote: > I tried to install 4th Edition on an old Western Digital AC2340 340 MB hard > drive. The hard drive is recognized by the BIOS and works with DOS and > Win95, but it does not appear in "partdisk" during the Plan 9 install. I > also tried an old Seagate ST3243A 214 MB hard drive and "partdisk" > recognizes it fine. I tried all master/slave combinations of the AC2340 and > ST3243A, and in every case only the ST3243A is available in "partdisk". > > Here are snippets of what I get with the ST3243A as primary master and the > AC2340 as primary slave. In every case the AC2340 appears to be recognized > early in the boot process, but it is never available in "partdisk": > ---- > dev A0 port 1F0 config 045A capabilities 0000 mwdma 0000 dma 00000000 rwm > 8 > dev B0 port 1F0 config 427A capabilities 0100 mwdma 0000 dma 00000000 rwm > 16 > dev A0 port 170 config 8580 capabilities 0B00 mwdma 0003 dma 00000000 rwm > 0 > ---- > The following disk devices were found. > > sdC0 - ST3243A > * p1 0 1023 (1023 cylinders, 203.80 MB) FATHUGE > empty 1023 1024 (1 cylinders, 204.00 KB) > > sdD0 - NEC CD-ROM DRIVE: 2523.18 > ---- > This system has an old Intel Plato (aka Premier/PCI II) motherboard (Pentium > 90 w/ 430NX chipset). > > I also tried a 3rd Edition 9disk.9fd and had the same problem. > > Am I doing something dumb or is this a bug/feature? :-) > > John