This may be deja vu if you've been tracking
comp.unix.bsd.freebsd. . . .

The short version: 

FreeBSD 4.x is not detecting my hard disk geometry
even remotely correctly. It reports a wildly inflated
cylinder count. I have tried out several Linux
distributions on this hard drive and none of them have
had any problem of this sort.

The long version:

Some horribly long-winded background . . .

A few months back, I had tried to install FreeBSD 4.5.
The install went rough, and it took several tries to
get FreeBSD actually installed. FreeBSD was reading
the disk geometry badly, reading some garbage where a
cylinder count should have been, and calculating a
disk capacity about an order of magnitude higher than
what it really was. To finally get a running (or at
least walking FreeBSD system), I ended up writing a
bogus partition table, containing an entry for a BSD
slice the size of my hard drive, and an entry saying
that had several gigabytes of unused space behind the
BSD slice. Not long after, I decided to nuke my
FreeBSD install, and go back to what I was running

Recently, I wanted to see if FreeBSD 4.7 wouldn't have
the ugly disk geometry problems that the 4.5 install
did. Someone suggested that I make some FreeBSD boot
floppies, boot from them, and see what happens. I
could always pull the floppy out and reboot before
anything got written to disk. So I did just that, and
found out that FreeBSD 4.7 still had the geometry

I've been experimenting with the boot floppy install,
rerunning the following routine: boot from floppy, see
if the cylinder count of the disk geometry is garbage,
and rebooting before committing to the install.
Somewhere in that routine, I've either twiddled BIOS
settings to see if FreeBSD would detect the geometry
right, or with fdisk to see if I could manage to write
a valid partition table. No luck with the BIOS, and no
luck with fdisk. I can tell fdisk what the correct
disk geometry is, but I've yet to figure out how to
change the partition table entries so that they are
consistent with the corrected geometry.

Relevant hardware specs:

Hard drive: Quantum Fireball, IDE, 20 GB
Motherboard: iWill KA266plus, with an ALI15X3 chipset.
FYI, the BIOS has not been upgraded, revision is

On to the current problem . . .

One of the guys in this newsgroup pointed out that I
could look at whatever kernel messages FreeBSD was 
leaving behind during the install by pressing Scroll
Lock and using the Page Up key to scroll up to the
messages. I found the following:

ad0: hard error reading fsbn 0-3 trying PIO mode
ad0: hard error reading fsbn 0-3 status=51 error=04
ad0: 8866663634010175MB
[16955114026566160/17/63] at ata0-master PIO4

My hard drive is in reality only 20GB.

After getting those error messages, I reran the
install and captured the error messages again, but
they were slightly different. Here they are:

ad0: hard error reading fsbn 0-3 trying PIO mode
ad0: hard error reading fsbn 0-3 status=51 error=04
ad0: 4363134873600047MB <}UyN~U}!~IEzA~M~
|M?1>5?!?!~!?!~!?!?!~!> [8343324202738466/17/63] at
ata0-master PIO4

Note that the reported hard drive capacity and
cylinder count are different than what they were the
last time. That's consistent with my experience in
installing FreeBSD 4.5. The reported cylinder count
was always inflated, but not always the same as

As I said before, Linux has (and continues to) work
fine with my hard drive, so I know there aren't any
catastrophic problems with the hard drive. Obviously
this does not rule out latent problems. In case this
is useful, here are the relevant snippets from
*Linux's* dmesg:

ALI15X3: chipset revision 196
ALI15X3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xe000-0xe007, BIOS settings:
hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xe008-0xe00f, BIOS settings:
hdc:pio, hdd:pio
hdb: Pioneer CD-ROM ATAPI Model DR-A04S 0105, ATAPI
CD/DVD-ROM drive
ide: Assuming 33MHz system bus speed for PIO modes;
override with idebus=xx
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: 40132503 sectors (20548 MB) w/1900KiB Cache,
CHS=2498/255/63, (U)DMA
ide-floppy driver 0.99.newide
Partition check:
 hda: hda1 hda2 hda3

The disk geometry reported by Linux is consistent with
the geometry reported by the BIOS setup.

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

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

Reply via email to