From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 14 14:50:04 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF6AB16A41F for ; Thu, 14 Jun 2007 14:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id C34C413C484 for ; Thu, 14 Jun 2007 14:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l5EEo3ix097434 for ; Thu, 14 Jun 2007 14:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l5EEo3ji097433; Thu, 14 Jun 2007 14:50:03 GMT (envelope-from gnats) Resent-Date: Thu, 14 Jun 2007 14:50:03 GMT Resent-Message-Id: <200706141450.l5EEo3ji097433@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Cedric GROSS Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4EA316A468 for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: bin/113682: [sysinstall][patch] sysinstall warn for invalid geometry which is not X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2007 14:50:04 -0000 >Number: 113682 >Category: bin >Synopsis: [sysinstall][patch] sysinstall warn for invalid geometry which is not >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >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: >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 change 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: >Unformatted: