From owner-freebsd-questions Sun Jan 10 11:57:33 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA07209 for freebsd-questions-outgoing; Sun, 10 Jan 1999 11:57:33 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from send101.yahoomail.com (send101.yahoomail.com [205.180.60.87]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id LAA07202 for ; Sun, 10 Jan 1999 11:57:32 -0800 (PST) (envelope-from ixkatl@yahoo.com) Message-ID: <19990110195607.19765.rocketmail@send101.yahoomail.com> Received: from [207.172.144.196] by send101.yahoomail.com; Sun, 10 Jan 1999 11:56:07 PST Date: Sun, 10 Jan 1999 11:56:07 -0800 (PST) From: Andrew Sherrod Subject: Need help with wd.c To: questions@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Okay, I need a hard-drive guru to help me figure something out. I had a number of problems getting FBSD to recognize the actual size of my hard drives. (Eventually I fell back on the old hack of adding a DOS partition and then deleting it once the geometry was recognized.) To start: Hardware: Tyan Trinity motherboard with AMD K6-2 350 processor. LBA activated. (Hard drive data to follow). Running 2.2.8 Free BSD only. No other operating systems. Okay... Here is "dmesg | grep wd" : wdc0 at 0x1f0-0x1f7irq 14 on isa wdco: unit 0 (wd0): wd0: 8063MB (16514064 sectors), 16383 cyls, 16 heads, 63 S/T 512 B/S wdc0: unit 1 (wd1): wd1: 2014MB (4124736 sectors), 4092 cyls, 16 heads, 63 S/T, 512 B/S wdc1 at 0x170-0x177 irq 15on isa wdc1: unit 0(wd2): wdc2: 1888MB (3866940 sectors), 4092 cyls, 15 heads, 63 S/T, 512 B/s [omitting CDROM info, as it is irrelevant] The first size is correct. The second is actually 3016 MB. The third is 4112MB. I added the following code to wd.c and recompiled the kernel: printf("%d:LBA Size: %lu - Read as %lu sectors\n", lunit, du->dk_params.wdp_lbasize, du->dk_dd.d_secperunit); As I understand the code, if the drive reports an LBA size, this should be used as the sectors per unit. However, after recompiling "dmesg | grep LBA" gives: 0:LBA Size: 16514064 - Read as 16514064 sectors 1:LBA Size: 6185088 - Read as 4124736 sectors 2:LBA Size: 8439184 - Read as 3866940 sectors The first is right. The next two make no sense to me. Can anyone help explain this? Andrew Sherrod (I don't follow questions@FreeBSD.org, so please cc my email address with the answer...) _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message