From nobody@FreeBSD.org  Thu Jun 14 14:50:00 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E4EA316A468
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 14 Jun 2007 14:50:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id D45BE13C4B9
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 14 Jun 2007 14:50:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l5EEo0MV094055
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 14 Jun 2007 14:50:00 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l5EEo0bW094046;
	Thu, 14 Jun 2007 14:50:00 GMT
	(envelope-from nobody)
Message-Id: <200706141450.l5EEo0bW094046@www.freebsd.org>
Date: Thu, 14 Jun 2007 14:50:00 GMT
From: Cedric GROSS <cedric.gross@cnv.fr>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [sysinstall][patch] sysinstall warn for invalid geometry which is not
X-Send-Pr-Version: www-3.0

>Number:         113682
>Category:       bin
>Synopsis:       [patch] sysinstall(8) warns for invalid geometry which is not
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-sysinstall
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 14 14:50:02 GMT 2007
>Closed-Date:    
>Last-Modified:  Sun Jan 23 21:14:45 UTC 2011
>Originator:     Cedric GROSS
>Release:        6.2
>Organization:
CNV
>Environment:
FreeBSD prt-freebsd.cnv.local 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
When running install with HDD > 32Gb slice editor warn a geometry of
xxx/xxx/255 is invalid which is not.

In fact, condition for showing message and sanitize the geometry is
wrong and should be same as for PC98 configuration.

Also, Sanitize_Bios_Geom in  src/lib/libdisk/change.c should be changed
because we first test for head<16 and for HDD >32Gb we reach head=255
(SCSI Setting).

Seems that Sanitize is base on the 528Mb barrier (1024/16/63)
>How-To-Repeat:
Use disk with capacity > 32Gb and run slice editor on it.
>Fix:
Review print_chunks in src/usr.sbin/sysinstall/disks.c (patch included) and
review Sanitize_Bios_Geom in src/lib/libdisk/change.c 

Patch attached with submission follows:

--- disks.c.origin	Thu Jun 14 16:08:08 2007
+++ disks.c	Thu Jun 14 16:18:23 2007
@@ -119,11 +119,7 @@
     Total = 0;
     for (i = 0; chunk_info[i]; i++)
 	Total += chunk_info[i]->size;
-#ifdef PC98
-    if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) {
-#else
-    if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) {
-#endif
+    if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 256) {
 	dialog_clear_norefresh();
 	msgConfirm("WARNING:  A geometry of %lu/%lu/%lu for %s is incorrect.  Using\n"
 		   "a more likely geometry.  If this geometry is incorrect or you\n"


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brucec 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Fri Apr 30 19:04:44 UTC 2010 
Responsible-Changed-Why:  
Take 

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

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