From ginga@athena.ginganet.org  Thu Aug 13 04:19:43 2009
Return-Path: <ginga@athena.ginganet.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 83F1B106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Aug 2009 04:19:43 +0000 (UTC)
	(envelope-from ginga@athena.ginganet.org)
Received: from athena.ginganet.org (202x210x243x26.ap202.ftth.ucom.ne.jp [202.210.243.26])
	by mx1.freebsd.org (Postfix) with ESMTP id 534458FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Aug 2009 04:19:43 +0000 (UTC)
Received: from localhost (localhost.olympus.local [127.0.0.1])
	by athena.ginganet.org (Postfix) with ESMTP id 8869C5D51
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Aug 2009 13:00:29 +0900 (JST)
Received: from athena.ginganet.org ([127.0.0.1])
	by localhost (athena.ginganet.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id PnLW96cHX0zR for <FreeBSD-gnats-submit@freebsd.org>;
	Thu, 13 Aug 2009 13:00:13 +0900 (JST)
Received: by athena.ginganet.org (Postfix, from userid 5003)
	id B078B5D47; Thu, 13 Aug 2009 13:00:13 +0900 (JST)
Message-Id: <20090813040013.B078B5D47@athena.ginganet.org>
Date: Thu, 13 Aug 2009 13:00:13 +0900 (JST)
From: Kawaguti Ginga <ginga-freebsd@ginganet.org>
Reply-To: Kawaguti Ginga <ginga-freebsd@ginganet.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: installer partition editor generates insane label
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         137713
>Category:       bin
>Synopsis:       sysinstall(8): installer partition editor generates insane label
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-sysinstall
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 13 04:20:02 UTC 2009
>Closed-Date:    
>Last-Modified:  Tue Jul 13 13:36:41 UTC 2010
>Originator:     Kawaguti Ginga
>Release:        FreeBSD 8-BETA2
>Organization:
ginganet.org
>Environment:
System: FreeBSD 8.0-BETA2 FreeBSD 8.0-BETA2 amd64

Seems to happen not only on 8-current but 7-stable also.
(I haven't checked 6-stable)

	

>Description:
	FreeBSD installer (invoked from bootable DVD)'s disklabel editor
	creates odd disk label.

One example disklabel created by installer for 18GB HDD is shown below.

| FreeBSD# # fdisk -s da0
| /dev/da0: 2231 cyl 255 hd 63 sec
| Part        Start        Size Type Flags
|    1:          63    35840952 0xa5 0x80
| FreeBSD# bsdlabel da0s1
| # /dev/da0s1:
| 8 partitions:
| #        size   offset    fstype   [fsize bsize bps/cpg]
|   a:  2097152       63    4.2BSD        0     0     0
|   b:  2097152  2097215      swap
|   c: 35840952       63    unused        0     0         # "raw" part, don't edit
|   d:  4194304  4194367    4.2BSD        0     0     0
|   e: 27452344  8388671    4.2BSD        0     0     0
| partition c: partition extends past end of unit
| bsdlabel: partition c doesn't start at 0!
| bsdlabel: An incorrect partition c may cause problems for standard system utilities
| partition e: partition extends past end of unit

* fdisk: no problem.
* bsdlabel: 
   + c partition has offset:63, which SHOULD be 0.

   + If using offset:63, *SIZE* of c-partition 
     should be 63 less than fdisk-partition(slice) size.

   + last partition(in this example, "e" partition) is *OVERSIZED*.
        size:27452344 + offset:8388671 = 35841015
     => size of this partition penetrates the slice boundary.

>How-To-Repeat:

For the previous example,
I've created "maximum slice size in fdisk partition".
Then created:
 1. "1g" partition, 
 2. "1g" swap
 3. "2g" partition
 4. rest of the size(just entered the value shown in disklabel-editor's prompt)
     
(only 1 FreeBSD slice for HDD, no DOS/Windows slice)

>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-sysinstall 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Tue Jul 13 13:36:41 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s) 

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