From nobody@FreeBSD.org  Sat Nov  6 18:27:43 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AA8D5106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  6 Nov 2010 18:27:43 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 987FA8FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  6 Nov 2010 18:27:43 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oA6IRh36058397
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 6 Nov 2010 18:27:43 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id oA6IRhqR058396;
	Sat, 6 Nov 2010 18:27:43 GMT
	(envelope-from nobody)
Message-Id: <201011061827.oA6IRhqR058396@www.freebsd.org>
Date: Sat, 6 Nov 2010 18:27:43 GMT
From: Kris Moore <kmoore@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bin: usr.sbin/pc-sysinstall - Fix bug when booting MBR partitions and no boot-loader selected
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151990
>Category:       misc
>Synopsis:       [patch] pc-sysinstall(8) - Fix bug when booting MBR partitions and no boot-loader selected
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 06 18:30:10 UTC 2010
>Closed-Date:    Tue Nov 09 22:32:58 MST 2010
>Last-Modified:  Wed Nov 10 05:40:09 UTC 2010
>Originator:     Kris Moore
>Release:        9.0-Current
>Organization:
PC-BSD / iXsystems
>Environment:
9.0-Current
>Description:
When we switched to the gpart backend, and provided selection between MBR & GPT, the MBR full-disk init failed to stamp boot1, and results in a boot not found error. This patch fixes the issue. 
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- src.o/usr.sbin/pc-sysinstall/backend/functions-disk.sh	2010-11-05 12:05:57.066860900 -0400
+++ src/usr.sbin/pc-sysinstall/backend/functions-disk.sh	2010-11-06 14:15:26.462959357 -0400
@@ -646,8 +646,11 @@
   rc_halt "dd if=/dev/zero of=/dev/${_intDISK}s1 count=1024"
   
   if [ "$_intBOOT" = "bsd" ] ; then
-    echo_log "Stamping boot sector on ${_intDISK}"
+    echo_log "Stamping boot0 on ${_intDISK}"
     rc_halt "gpart bootcode -b /boot/boot0 ${_intDISK}"
+  else
+    echo_log "Stamping boot1 on ${_intDISK}"
+    rc_halt "gpart bootcode -b /boot/boot1 ${_intDISK}"
   fi
 
 }


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Nov 7 08:58:20 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151990 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Tue Nov 9 22:32:48 MST 2010 
State-Changed-Why:  
fixed. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/151990: commit references a PR
Date: Wed, 10 Nov 2010 05:32:44 +0000 (UTC)

 Author: imp
 Date: Wed Nov 10 05:32:36 2010
 New Revision: 215078
 URL: http://svn.freebsd.org/changeset/base/215078
 
 Log:
   When we switched to the gpart backend, and provided selection between
   MBR & GPT, the MBR full-disk init failed to stamp boot1, and results
   in a boot not found error. This patch fixes the issue.
   
   PR:		151990
   Submitted by:	Kris Moore
 
 Modified:
   head/usr.sbin/pc-sysinstall/backend/functions-disk.sh
 
 Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh
 ==============================================================================
 --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh	Wed Nov 10 05:22:12 2010	(r215077)
 +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh	Wed Nov 10 05:32:36 2010	(r215078)
 @@ -646,8 +646,11 @@ init_mbr_full_disk()
    rc_halt "dd if=/dev/zero of=/dev/${_intDISK}s1 count=1024"
    
    if [ "$_intBOOT" = "bsd" ] ; then
 -    echo_log "Stamping boot sector on ${_intDISK}"
 +    echo_log "Stamping boot0 on ${_intDISK}"
      rc_halt "gpart bootcode -b /boot/boot0 ${_intDISK}"
 +  else
 +    echo_log "Stamping boot1 on ${_intDISK}"
 +    rc_halt "gpart bootcode -b /boot/boot1 ${_intDISK}"
    fi
  
  }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
