From pepper@reppep.com  Mon Jan 19 17:55:12 2004
Return-Path: <pepper@reppep.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5DEAC16A4CF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Jan 2004 17:55:12 -0800 (PST)
Received: from www.reppep.com (www.reppep.com [66.92.104.200])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3A9F943D39
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Jan 2004 17:55:11 -0800 (PST)
	(envelope-from pepper@reppep.com)
Received: by www.reppep.com (Postfix, from userid 501)
	id 07251FE82; Mon, 19 Jan 2004 20:56:06 -0500 (EST)
Message-Id: <20040120015606.07251FE82@www.reppep.com>
Date: Mon, 19 Jan 2004 20:56:06 -0500 (EST)
From: Chris Pepper <pepper@reppep.com>
Reply-To: Chris Pepper <pepper@reppep.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: sysinstall: wrong geometry guessed
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         61603
>Category:       bin
>Synopsis:       sysinstall(8): wrong geometry guessed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-sysinstall
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 19 18:00:24 PST 2004
>Closed-Date:    
>Last-Modified:  Sun Jan 23 21:02:30 UTC 2011
>Originator:     Chris Pepper
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD www.reppep.com 4.9-STABLE FreeBSD 4.9-STABLE #13: Thu Nov 13 23:50:39 EST 2003 root@www.reppep.com:/usr/obj/usr/src/sys/REPPEP i386


	
>Description:
	sysinstall under 5.2-RELEASE guessed my geometry wrong. I have a 6gb WinXP partition and a 32gb FreeBSD partition. After upgrading from 4.9-STABLE (including requesting BootEasy), the system failed to boot. I was able to boot from CD and set currdev to load the 5.2 installation, and install BootEasy w/ boot0cfg, but not to get the system booting correctly -- with BootEasy, F2 for FreeBSD just beeped, although the WinXP installation was accessible.

	sysinstall chose a good geometry for this system from 4.5 through 4.9, but not booting from 5.2 disc 1. sysinstall 5.2 guessed 4865/255/63, which didn't work. fdisk inside 5.2 claimed 77545/16/63. pfdisk suggeted 1023/240/63, which worked for sysinstall when entered manually.

	Note: http://www.freebsd.org/relnotes/4-STABLE/installation/i386/trouble.html #4.2.2 claims sysinstall can determine the geometry from a 'DOS partition' at the beginning of the disk, but that didn't work for me.

	I will write up another PR for documentation issues associated with this problem.
	
>How-To-Repeat:
	Install from 5.2-RELEASE CD on an HP Pavilion with 40gb WD disk, accepting sysinstall's (incorrect) geometry.
	
>Fix:
	Make sysinstall smarter, if possible.

	Additionally, improve the documentation on disk geometry (next PR).

	Offer a method for fixing a usable FreeBSD installation without reinstalling. My system was bootable and looked fine, except boot code was missing. Presumably there is a way to install boot code for FreeBSD (for BootEasy to load) without reinstalling from scratch, but I was unable to find it. This is obscure, but would have been useful.
>Release-Note:
>Audit-Trail:

From: Chris Pepper <pepper@reppep.com>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-i386@FreeBSD.org
Cc:  
Subject: Re: i386/61603: sysinstall: wrong geometry guessed
Date: Mon, 19 Jan 2004 21:10:47 -0500

 	Further information:
 
 	FreeBSD's fdisk comes up with these values, which don't 
 correspond to sysinstall's guess or the values I copied from pfdisk 
 to sysinstall to reinstall. fdisk comes up with the same values both 
 with a non-booting system (booted from CD) and with a good system, 
 booted normally from BootEasy.
 
 
 						Chris Pepper
 
 >guest# fdisk
 >******* Working on device /dev/ad0 *******
 >parameters extracted from in-core disklabel are:
 >cylinders=77545 heads=16 sectors/track=63 (1008 blks/cyl)
 >
 >Figures below won't work with BIOS for partitions not in cyl 1
 >parameters to be used for BIOS calculations are:
 >cylinders=77545 heads=16 sectors/track=63 (1008 blks/cyl)
 >
 >Media sector size is 512
 >Warning: BIOS sector numbering starts with sector 1
 >Information from DOS bootblock is:
 >The data for partition 1 is:
 >sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT)
 >     start 63, size 12579777 (6142 Meg), flag 0
 >         beg: cyl 0/ head 1/ sector 1;
 >         end: cyl 831/ head 239/ sector 63
 >The data for partition 2 is:
 >sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
 >     start 12579840, size 65575440 (32019 Meg), flag 80 (active)
 >         beg: cyl 832/ head 0/ sector 1;
 >         end: cyl 1023/ head 239/ sector 63
 >The data for partition 3 is:
 ><UNUSED>
 >The data for partition 4 is:
 ><UNUSED>
 
 -- 
 Chris Pepper:               <http://www.reppep.com/~pepper/>
 Rockefeller University:     <http://www.rockefeller.edu/>
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Mon Sep 11 12:41:21 UTC 2006 
State-Changed-Why:  
Hello Chris, 

Can you tell me whether this problem still persists in later 
versions of FreeBSD? Thanks in advance 


Responsible-Changed-From-To: freebsd-i386->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Sep 11 12:41:21 UTC 2006 
Responsible-Changed-Why:  
grab the pr 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61603 
State-Changed-From-To: feedback->suspended 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 1 20:24:35 UTC 2008 
State-Changed-Why:  
Feedback was not received, but my belief from looking through the mailing 
lists is that this is probably still a problem. 


Responsible-Changed-From-To: remko->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Mar 1 20:24:35 UTC 2008 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=61603 
Responsible-Changed-From-To: freebsd-bugs->randi 
Responsible-Changed-By: randi 
Responsible-Changed-When: Sat Jun 6 19:28:38 UTC 2009 
Responsible-Changed-Why:  
Taking this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61603 
State-Changed-From-To: suspended->open 
State-Changed-By: brucec 
State-Changed-When: Wed Dec 8 09:51:25 UTC 2010 
State-Changed-Why:  
This is still a problem. 


Responsible-Changed-From-To: randi->brucec 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Wed Dec 8 09:51:25 UTC 2010 
Responsible-Changed-Why:  
Grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61603 
Responsible-Changed-From-To: brucec->freebsd-sysinstall 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Sun Jan 23 21:02:11 UTC 2011 
Responsible-Changed-Why:  
Back to the pool. 

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