NetBSD Problem Report #50311

From kre@munnari.OZ.AU  Wed Oct  7 13:58:44 2015
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A96B7A57FE
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  7 Oct 2015 13:58:44 +0000 (UTC)
Message-Id: <201510071356.t97Durxo021038@andromeda.noi.kre.to>
Date: Wed, 7 Oct 2015 20:56:53 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: Missing gptmbr.bin on amd64 (& i386) prevents GPT bootable install
X-Send-Pr-Version: 3.95

>Number:         50311
>Category:       install
>Synopsis:       Missing gptmbr.bin on amd64 (& i386) prevents GPT bootable install
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 07 14:00:00 +0000 2015
>Closed-Date:    Fri Oct 16 07:09:21 +0000 2015
>Last-Modified:  Fri Oct 16 07:09:21 +0000 2015
>Originator:     Robert Elz
>Release:        NetBSD 7.99.21 (current as of 2015-10-07)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD andromeda.noi.kre.to 7.99.21 NetBSD 7.99.21 (VBOX64-1.1-20150829) #3: Sun Aug 30 07:16:17 ICT 2015 kre@andromeda.noi.kre.to:/home/kre/src/current-kernel/usr/src/sys/arch/amd64/compile/VBOX64 amd64
Architecture: x86_64
Machine: amd64
>Description:
	I did an amd64 install onto a new system, on which I thought
	I'd try doing a pure GPT system setup, using sysinst.
	Aside from the sysinst steps to use GPT being a little
	counter-intuitive (the method to use isn't as obvious as it
	could be) all of that worked - except the resulting system
	wasn't bootable.

	Cause of that was that the "gpt biosboot" step failed, and that
	was because there's no gptmbr.bin on the ramdisk

>How-To-Repeat:
	Do an amd64 install of current and format a new empty disk
	(no boot info previously installed) as GPT.  Complete the
	install.  If you're observant you'll see the "gpt biosboot"
	failure error message flash past.  Attempt to reboot.

>Fix:
	The workaround for anyone who is in this situation is to
	finish the sysinst install procedure, then when given the
	opportunity, get a shell, mount the newly installed root
	(and /usr if you separated them) and re-run the
	gpt biosboot using the gptmbr.bin that will have been
	installed in /usr/mdec on the newly installed system

	To prevent this happening in the future, in src/distrib/amd64 ...

Index: ramdisks/common/list.ramdisk
===================================================================
RCS file: /cvsroot/NetBSD/src/distrib/amd64/ramdisks/common/list.ramdisk,v
retrieving revision 1.19
diff -u -r1.19 list.ramdisk
--- ramdisks/common/list.ramdisk        10 Aug 2014 20:07:41 -0000      1.19
+++ ramdisks/common/list.ramdisk        7 Oct 2015 13:52:58 -0000
@@ -83,6 +83,7 @@
 COPY   ${DESTDIR}/usr/mdec/mbr                 usr/mdec/mbr
 COPY   ${DESTDIR}/usr/mdec/mbr_ext             usr/mdec/mbr_ext
 COPY   ${DESTDIR}/usr/mdec/mbr_bootsel         usr/mdec/mbr_bootsel
+COPY   ${DESTDIR}/usr/mdec/gptmbr.bin          usr/mdec/gptmbr.bin

 # and the boot script
 COPY   ${CURDIR}/../common/dot.profile         .profile

	I believe the same is required in src/distrib/i386 but I
	haven't tested that one to be certain.

	I have yet to build and test a system with this change to
	know for certain that it is correct and sufficient, and
	doesn't cause the size of the ramdisk to exceed limits,
	but I am fairly confident that it is what is needed.
	(I will append confirmation once I know.)

>Release-Note:

>Audit-Trail:
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50311 CVS commit: src/distrib
Date: Wed, 7 Oct 2015 14:09:05 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed Oct  7 14:09:05 UTC 2015

 Modified Files:
 	src/distrib/amd64/ramdisks/common: Makefile.ramdisk list.ramdisk
 	src/distrib/i386/ramdisks/common: Makefile.ramdisk list.ramdisk

 Log Message:
 PR install/50311: missing gptmbr.bin on ramdisk based installs.


 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.11 src/distrib/amd64/ramdisks/common/Makefile.ramdisk
 cvs rdiff -u -r1.19 -r1.20 src/distrib/amd64/ramdisks/common/list.ramdisk
 cvs rdiff -u -r1.11 -r1.12 src/distrib/i386/ramdisks/common/Makefile.ramdisk
 cvs rdiff -u -r1.25 -r1.26 src/distrib/i386/ramdisks/common/list.ramdisk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Wed, 07 Oct 2015 14:11:40 +0000
Responsible-Changed-Why:
I commited the fix


State-Changed-From-To: open->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Wed, 07 Oct 2015 14:11:40 +0000
State-Changed-Why:
Waiting for [pullup-7 #992]


From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/50311 (Missing gptmbr.bin on amd64 (& i386) prevents GPT bootable install)
Date: Thu, 08 Oct 2015 04:36:19 +0700

 I can confirm now that with the fix installed, a ramdisk based amd64
 install of NetBSD current correctly makes a bootable GPT pdrive.

 kre

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50311 CVS commit: [netbsd-7] src/distrib
Date: Thu, 15 Oct 2015 20:30:57 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Thu Oct 15 20:30:57 UTC 2015

 Modified Files:
 	src/distrib/amd64/ramdisks/common [netbsd-7]: Makefile.ramdisk
 	    list.ramdisk
 	src/distrib/i386/ramdisks/common [netbsd-7]: Makefile.ramdisk
 	    list.ramdisk

 Log Message:
 Pull up following revision(s) (requested by martin in ticket #992):
 	distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.11
 	distrib/amd64/ramdisks/common/list.ramdisk: revision 1.20
 	distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.12
 	distrib/i386/ramdisks/common/list.ramdisk: revision 1.26
 PR install/50311: missing gptmbr.bin on ramdisk based installs.


 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.10.10.1 \
     src/distrib/amd64/ramdisks/common/Makefile.ramdisk
 cvs rdiff -u -r1.19 -r1.19.2.1 src/distrib/amd64/ramdisks/common/list.ramdisk
 cvs rdiff -u -r1.11 -r1.11.10.1 \
     src/distrib/i386/ramdisks/common/Makefile.ramdisk
 cvs rdiff -u -r1.25 -r1.25.2.1 src/distrib/i386/ramdisks/common/list.ramdisk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50311 CVS commit: [netbsd-7-0] src/distrib
Date: Thu, 15 Oct 2015 20:31:51 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Thu Oct 15 20:31:51 UTC 2015

 Modified Files:
 	src/distrib/amd64/ramdisks/common [netbsd-7-0]: Makefile.ramdisk
 	    list.ramdisk
 	src/distrib/i386/ramdisks/common [netbsd-7-0]: Makefile.ramdisk
 	    list.ramdisk

 Log Message:
 Pull up following revision(s) (requested by martin in ticket #992):
 	distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.11
 	distrib/amd64/ramdisks/common/list.ramdisk: revision 1.20
 	distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.12
 	distrib/i386/ramdisks/common/list.ramdisk: revision 1.26
 PR install/50311: missing gptmbr.bin on ramdisk based installs.


 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.10.12.1 \
     src/distrib/amd64/ramdisks/common/Makefile.ramdisk
 cvs rdiff -u -r1.19 -r1.19.4.1 src/distrib/amd64/ramdisks/common/list.ramdisk
 cvs rdiff -u -r1.11 -r1.11.12.1 \
     src/distrib/i386/ramdisks/common/Makefile.ramdisk
 cvs rdiff -u -r1.25 -r1.25.4.1 src/distrib/i386/ramdisks/common/list.ramdisk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 16 Oct 2015 07:09:21 +0000
State-Changed-Why:
pullup done


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.