From gregp@noc.tht.net  Sun Mar 23 17:13:44 2003
Return-Path: <gregp@noc.tht.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3B95C37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Mar 2003 17:13:44 -0800 (PST)
Received: from noc.tht.net (noc.tht.net [216.126.88.19])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C826643F75
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Mar 2003 17:13:43 -0800 (PST)
	(envelope-from gregp@noc.tht.net)
Received: by noc.tht.net (Postfix, from userid 1000)
	id C407B2A693; Sun, 23 Mar 2003 20:13:40 -0500 (EST)
Message-Id: <20030324011340.C407B2A693@noc.tht.net>
Date: Sun, 23 Mar 2003 20:13:40 -0500 (EST)
From: gregp <gregp@noc.tht.net>
Reply-To: gregp <gregp@noc.tht.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: FreeBSD detects laptop drive geometries incorrectly 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         50229
>Category:       kern
>Synopsis:       FreeBSD detects laptop drive geometries incorrectly
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 23 17:20:17 PST 2003
>Closed-Date:    Thu May 20 04:59:52 PDT 2004
>Last-Modified:  Thu May 20 04:59:52 PDT 2004
>Originator:     gregp
>Release:        FreeBSD 5.0-RELEASE i386
>Organization:
>Environment:
Trying to install FreeBSD 5.0-RELEASE (or the latest 4.x RELEASE), uname unavailable.
Dell Inspiron 8000 Laptop, 40GB IBM Travelstar laptop harddrive.
	
>Description:
Upon booting from the install CD, FreeBSD misdetects the geometry of my hard disk, and reports gibbrish for it's name in the section where it prints its size/geometry.

When booting 5.0-RELEASE via boot -v, the following messages are visible:
[ copied by hand, and only relevant sections. more is available on request. ]

...
bios32: Found BIOS32 Service Directory header at 0xc00ffe80
bios32: Entry = 0xffe90 (c00ffe90) Rev = 0 Len = 1
pcibios: PCI BIOS entry at 0xf0000+0xf06c
pnpbios: Found PnP BIOS data at 0xc00fe2d0
pnpbios: Entry = f0000:e2f4 Rev = 1.0
pnpbios: Event flag at 4b4
Other BIOS signatures found:
...
atapci0: <Intel ICH2 ATA100 constroller> port=0xbfa0-0xbfaf at device 31.1 on pci0
ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0xbfa0
ata0: mask=03 ostat0=50 ostat2=50
ata0-master: ATAPI 00 00
ata0-slave: ATAPI 14 eb
ata0: mask=03 stat0=50 stat1=00
ata0: master ATA 01a5
ata0: devices=09
ata0: at 0x1f0 irq14 on atapci0
...
ad0: DMA limited to UDMA33, non-ATA66 cable or device
ad0: success setting UDMA2 on Intel chip
GEOM: new disk ad0
ar: FreeBSD check1 failed
ad0: <high ascii symbols> ATA-5 disk at ata0-master
ad0: 692MB (1418256 sectors), 1407 C, 16 H, 63 S, 512 B
ad0: 16 secs/int, a depth queue, UDMA33
ad0: piomode=4 dmamode=2 udmamode=5 dmaflag=1
...
GEOM: Configure ad0s1 start 32256 length 29520497664 end 29520529919
GEOM: Configure ad0s2 start 29520529920 length 98703360 end 29619233279
GEOM: Configure ad0s3 start 29619233280 length 509967360 end 30129200640 length 9878561280 end 40007761919

There were other GEOM entries, but I realize I forgot to write them down.  They didn't seem to match with the stuff printed for ad0, so I'm not sure if that's valid.

The drive currently has Windows XP and RedHat Linux installed.  Kernel 2.4.18 (stock RedHat kernel, IIRC) boots fine, and installs fine without doing any damage.  Obviously, installing FreeBSD on this disk will result in some wonderful data loss, considering it mis-detects its vitals (I've tried before).

Another IBM Travelstar drive, 10GB in size experiences similar problems, sizes vary.  This problem applies to both 5.0 and the latest 4.x RELEASE.

As I said, RedHat installs fine (I was in a hurry to get *a* UNIX on the laptop, so I had to settle), so any information you want as to how it detects things, or how it sees the geometry is available on request.  

Finally, the disk itself put in a FreeBSD desktop box (running 4.x) is correctly probed, and I can mount various partitions on it without issue.  It appears to be a problem between my BIOS/laptop/controller and FreeBSD.
	
>How-To-Repeat:
Try to install FreeBSD on the laptop.
	
>Fix:
Not a clue.  I'm not versed enough in the kernel or ATA stuffs to figure it out.
	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: sos 
State-Changed-When: Mon May 5 05:34:44 PDT 2003 
State-Changed-Why:  
You should try this with -current and get back with results. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50229 

From: Greg Prosser <gregp@noc.tht.net>
To: =?X-UNKNOWN?Q?S=F8ren_Schmidt?= <sos@FreeBSD.org>
Cc: freebsd-bugs@FreeBSD.org
Subject: Re: kern/50229: FreeBSD detects laptop drive geometries incorrectly
Date: Fri, 9 May 2003 21:58:51 -0400 (EDT)

 [.. stuff ..]
 unknown: <PNPhexx> can't assign resources (port)
 unknown: <PNPhexx> can't assign resources (irq)
 [.. a few more ..]
 ad0: 1280MB <CRAP> [2600/16/63] at ata0-master UDMA100
 
 I don't recall if those unknown: lines showed up before.
 
 I don't know if the drive is actually UDMA100.  It's a laptop, so I doubt
 it?
 
 I tried with a snapshot from May8th off snapshots.jp.
 
 -gnp
 
 On Mon, 5 May 2003, S=F8ren Schmidt wrote:
 
 ;; Synopsis: FreeBSD detects laptop drive geometries incorrectly
 ;;
 ;; State-Changed-From-To: open->feedback
 ;; State-Changed-By: sos
 ;; State-Changed-When: Mon May 5 05:34:44 PDT 2003
 ;; State-Changed-Why:
 ;; You should try this with -current and get back with results.
 ;;
 ;; http://www.freebsd.org/cgi/query-pr.cgi?pr=3D50229
 ;;
State-Changed-From-To: feedback->closed 
State-Changed-By: kris 
State-Changed-When: Fri Aug 15 20:56:34 PDT 2003 
State-Changed-Why:  
Feedback timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50229 
State-Changed-From-To: closed->open 
State-Changed-By: kris 
State-Changed-When: Fri Aug 15 23:06:23 PDT 2003 
State-Changed-Why:  
Oops, closed erroneously.  The requested feedback was received. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50229 

From: Greg Prosser <gregp@noc.tht.net>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/50229: FreeBSD detects laptop drive geometries incorrectly
Date: Fri, 17 Oct 2003 08:40:14 -0400 (EDT)

 FYI, a recent snapshot off snapshots.jp now appears to detect ad0 properly
 (at least it reports what appears to be the correct size).
 
 Thanks.
 
 -gnp
State-Changed-From-To: open->closed 
State-Changed-By: arved 
State-Changed-When: Thu May 20 04:59:08 PDT 2004 
State-Changed-Why:  
Submitter reports that the drive is detected properly since Oct 2003 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50229 
>Unformatted:
