[The following was originally posted by me to the
FreeBSD bugs list when I was a lot surer that I was
dealing with a FreeBSD bug. Now I'm not sure sure if
this is a software bug, hardware bug, or a consequence
of dubious design decisions. Hence the cross-post to
here.]

I've been doing my best to sort out the issues with
the bug, issue, or whatever that FreeBSD has with
identifying my hard drive. The following is mostly a
summarizing of previous posts, plus some tidbits of
new stuff.

Background:

I had been trying to switch from Linux to FreeBSD;
however, the last time I tried, FreeBSD couldn't get
the disk geometry correct; the cylinder count from
FreeBSD was wildly inflated and inconsistent from
install attempt to install attempt. This was for
version 4.5 of FreeBSD. When I posted to
comp.unix.bsd.freebsd.misc asking if FreeBSD 4.7 had
the same problem, someone suggested that I attempt an
install from boot floppies, and if there is still a
problem, abort before committing to the install. Ever
since then, I've been experimenting with the boot
floppies, trying to see if I could find ways of either
making the problem disappear or diagnosing it.

My hardware:

IDE drives are the following:

* QUANTUM FIREBALLP LM20.5, ATA DISK drive
* Pioneer CD-ROM ATAPI Model DR-A04S 0105, ATAPI
CD/DVD-ROM drive

The hard drive is primary master, and the CD-ROM the
primary slave. Whether the CD-ROM acts as a master or
slave depends on a jumper setting.

My motherboard is an iWill KA266plus. When I first
starting dealing with the problem, the BIOS was the
original one installed by the manufacturer, but it has
recently been upgraded. The southbridge is a ALi
M1535D+ chipset.

Symptoms:

Almost every time I attempt to install FreeBSD, it
complains that the disk geometry is bad, reporting a
wildly inflated cylinder count that changes from
install attempt to install attempt. A few times,
FreeBSD reads the cylinder count correctly, but upon
the next install attempt, the inflated count is back.
This has been true for FreeBSD versions 4.5, 4.7, and
5.0-RC2.

The following kernel message is from a FreeBSD
install. I captured it by pressing Scroll Lock and
pressing the Page Up key to get to the text:

ad0: 8866663634010175MB
<?U}O|U}!~IEzA~M~!|M~1.5?!?!~!~!?!?!~!?!>
[16955114026566160/17/63] at ata0-master PIO4

The garbage between the angle brackets should be the
name of the hard drive, "QUANTUM FIREBALLP". Compare
this with the kernel message from Linux:

hda: QUANTUM FIREBALLP LM20.5, ATA DISK drive

The name of the disk drive is reported correctly.

This hard drive querying problem has never occured
under Linux, Windows XP, or an OpenBSD 3.1 snapshot,
although the last one had other problems, namely lack
of stability, which was to be expected. (I do not have
Windows XP anymore.) The problem seems consistent for
both the original and upgraded BIOS. Setting the BIOS
to explicitly use LBA disk geometry rather that
relying on the automatic BIOS setting seems to make no
difference either. However, the problem appears to go
away when I make the CD-ROM into a secondary master
rather than a primary slave. 

I've experimented with a couple variants of the
master/slave setup. 

In the first and original setup, the hard drive was
the master, and the CD-ROM the slave. I used an IDE
cable from I-do-not-remember-where, and at the time I
neither knew nor cared whether it could handle ATA66.
This was the setup under which the problem first
showed up.

In the second setup, I scrounged up an ATA cable that
I knew could handle ATA66. I used this newer cable to
attach the hard drive to the motherboard, and I used
the old cable to attach the CD-ROM to the motherboard
as a secondary master. (The jumper for the CD-ROM was
moved accordingly.) In this setup, the ATA querying
problem went away, or at the very least, I could not
reproduce it (and I tried to, several times). Instead
I got the following healthy-looking kernel message:

ad0: 19595MB <QUANTUM FIREBALLP LM20.5>
[39813/16/63] at ata0-master UDMA66

The third setup was just like the first, only I
switched IDE cables. The old cable was used to connect
the hard drive to the motherboard, while the newer one
was used to connect the CD-ROM to the motherboard. I
could not reproduce the problem under this setup
either, it was just as it was with the second setup.

The fourth setup was like the first. The CD-ROM
returned to being a primary slave (and the jumper was
set accordingly). However, I used the newer IDE cable
rather than the old one. The problems from the first
setup returned.

David Schultz (from the FreeBSD bugs mailing list) has
the same make and model of hard drive as I, yet has
not been able to reproduce my problem even after
duplicating my master/slave setup. To quote him:

> I have used the drive with the integrated IDE
> controllers on an
> ASUS P2B-F motherboard (440BX-based, ATA33) and an
> ASUS P3V4X
> (VIA 82C596 ATA66 controller), as well as with a
> Promise Ultra66
> card.  A subset of those controllers have been used
> with the drive
> in both master and slave configurations.

Also, Linux does *not* use UDMA66 on my hard drive by
default, but rather MDMA2. I got this from running the
command "hdparm -i /dev/hda". I have not tried
optimizing my hard drive speed, and I don't know if
explains the difference between the behavior of Linux
and FreeBSD. I also do not know how OpenBSD 3.x or
Windows XP set up their DMA defaults.

Any further diagnoses? Ideas for further narrowing
down the problem?

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to