From nobody@FreeBSD.org  Fri Mar 11 22:42:34 2011
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 DE6091065675
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Mar 2011 22:42:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id B4B2A8FC1E
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Mar 2011 22:42:34 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2BMgYia011259
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Mar 2011 22:42:34 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2BMgYuB011250;
	Fri, 11 Mar 2011 22:42:34 GMT
	(envelope-from nobody)
Message-Id: <201103112242.p2BMgYuB011250@red.freebsd.org>
Date: Fri, 11 Mar 2011 22:42:34 GMT
From: Andrey Vladimirov <rarehawk@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: GPT + UFS boot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         155484
>Category:       kern
>Synopsis:       [ufs] GPT + UFS boot don't work well together
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-fs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 11 22:50:10 UTC 2011
>Closed-Date:    Thu Jun 02 14:12:02 UTC 2011
>Last-Modified:  Thu Jun 02 14:12:02 UTC 2011
>Originator:     Andrey Vladimirov
>Release:        Freebsd 8.2 RELEASE
>Organization:
>Environment:
FreeBSD  8.2-STABLE FreeBSD 8.2-STABLE #0: Wed Mar  9 20:11:11 UTC 2011     andrey@:/usr/obj/usr/src/sys/x3650m2  amd64
>Description:
I'm trying to setup a system with a large RAID array (total ~4TB)
I do next step:
1. Create the boot, swap and UFS partitions:
 Fixit# gpart add -s 64K -t freebsd-boot mfid0
 Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 Fixit# gpart add -t freebsd-ufs -l disk0 mfid0
2. Install the Protected MBR (pmbr) and gptboot loader 
Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ad0
Then install FreeBSD and add this:
echo 'vfs.root.mountfrom="ufs:/dev/mfid0p2"' >> /boot/loader.conf
After rebooting (system not booting) i see message:
is unable to find loader at /boot/loader or can it load /boot/kernel/kernel

I load from DVD and go to Fixit
Copying /boot/loader to /loader allows me to enter /loader at the "boot:"
prompt and the loader will load, however, its unable to load the kernel.

If I do an "ls" at the loader prompt I can see boot listed as a directory
(with a "d" before it).  Trying to do "ls boot" inexplicably it says
"boot: not a directory"

>How-To-Repeat:
do next step:
1. Create the boot, swap and UFS partitions:
 Fixit# gpart add -s 64K -t freebsd-boot mfid0
 Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 Fixit# gpart add -t freebsd-ufs -l disk0 mfid0
2. Install the Protected MBR (pmbr) and gptboot loader 
Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ad0
echo 'vfs.root.mountfrom="ufs:/dev/mfid0p2"' >> /boot/loader.conf

>Fix:
If do next step:
 Fixit# gpart add -s 64K -t freebsd-boot mfid0
 Fixit# gpart add -s 3800G -t freebsd-ufs -l disk0 mfid0
 Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
or
 Fixit# gpart add -s 64K -t freebsd-boot mfid0
next partition must be root(/) 
 Fixit# gpart add -s 3G -t freebsd-ufs -l disk0 mfid0  
 Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0

No problem with boot on GPT.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Mar 12 03:54:09 UTC 2011 
Responsible-Changed-Why:  
Reclassify and assign. 

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

From: Andriy Gapon <avg@freebsd.org>
To: bug-followup@freebsd.org, rarehawk@gmail.com
Cc:  
Subject: Re: kern/155484: [ufs] GPT + UFS boot don't work well together
Date: Sat, 12 Mar 2011 09:47:43 +0200

 gpart(8)
 /bootme
 Does this help?
 
 -- 
 Andriy Gapon

From: Alexander Best <arundel@freebsd.org>
To: Andrey Vladimirov <rarehawk@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/155484: GPT + UFS boot
Date: Sat, 12 Mar 2011 08:22:30 +0000

 On Fri Mar 11 11, Andrey Vladimirov wrote:
 > 
 > >Number:         155484
 > >Category:       kern
 > >Synopsis:       GPT + UFS boot
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Fri Mar 11 22:50:10 UTC 2011
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Andrey Vladimirov
 > >Release:        Freebsd 8.2 RELEASE
 > >Organization:
 > >Environment:
 > FreeBSD  8.2-STABLE FreeBSD 8.2-STABLE #0: Wed Mar  9 20:11:11 UTC 2011     andrey@:/usr/obj/usr/src/sys/x3650m2  amd64
 > >Description:
 > I'm trying to setup a system with a large RAID array (total ~4TB)
 > I do next step:
 > 1.Create the boot, swap and UFS partitions:
 >  Fixit# gpart add -s 64K -t freebsd-boot mfid0
 >  Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 >  Fixit# gpart add -t freebsd-ufs -l disk0 mfid0
 > 2. Install the Protected MBR (pmbr) and gptboot loader 
 > Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ad0
 > Then install FreeBSD and add this:
 > echo 'vfs.root.mountfrom="ufs:/dev/mfid0p2"' >> /boot/loader.conf
 
 isn't this line pointing to your swap partition?
 
 try echo 'vfs.root.mountfrom="ufs:/dev/mfid0p3"' >> /boot/loader.conf
 
 ...also shouldn't this be:
 
 gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 mfid0 ?
 
 also i'm not sure -b and -p can be used together in one command. at least the
 gpart(8) manual uses two commands for it.
 
 > After rebooting (system not booting) i see message:
 > is unable to find loader at /boot/loader or can it load /boot/kernel/kernel
 > 
 > I load from DVD and go to Fixit
 > Copying /boot/loader to /loader allows me to enter /loader at the "boot:" prompt and the loader will load, however, its unable to load the kernel.
 > 
 > If I do an "ls" at the loader prompt I can see boot listed as a directory (with a "d" before it)
 > Trying to do "ls boot" inexplicably it says "boot: not a directory"
 > 
 > 
 > 
 > 
 > 
 > >How-To-Repeat:
 > do next step:
 > 1.Create the boot, swap and UFS partitions:
 >  Fixit# gpart add -s 64K -t freebsd-boot mfid0
 >  Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 >  Fixit# gpart add -t freebsd-ufs -l disk0 mfid0
 > 2. Install the Protected MBR (pmbr) and gptboot loader 
 > Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ad0
 > echo 'vfs.root.mountfrom="ufs:/dev/mfid0p2"' >> /boot/loader.conf
 > 
 > >Fix:
 > If do next step:
 >  Fixit# gpart add -s 64K -t freebsd-boot mfid0
 >  Fixit# gpart add -s 3800G -t freebsd-ufs -l disk0 mfid0
 >  Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 > or
 >  Fixit# gpart add -s 64K -t freebsd-boot mfid0
 > next partition must be root(/) 
 >  Fixit# gpart add -s 3G -t freebsd-ufs -l disk0 mfid0  
 >  Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 > 
 > No problem with boot on GPT.
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 
 -- 
 a13x

From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Andrey Vladimirov <rarehawk@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/155484: GPT + UFS boot
Date: Sat, 12 Mar 2011 11:36:10 +0300

 On 12.03.2011 01:42, Andrey Vladimirov wrote:
 > 2. Install the Protected MBR (pmbr) and gptboot loader 
 > Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ad0
 
 Did you try to use gptboot instead gptzfsboot?
 
 -- 
 WBR, Andrey V. Elsukov

From: Andrey Vladimirov <rarehawk@gmail.com>
To: Alexander Best <arundel@freebsd.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/155484: GPT + UFS boot
Date: Sat, 12 Mar 2011 16:09:53 +0200

 --0015174be5b0f2f393049e49a1ea
 Content-Type: text/plain; charset=ISO-8859-1
 
 2011/3/12 Alexander Best <arundel@freebsd.org>
 
 > On Fri Mar 11 11, Andrey Vladimirov wrote:
 > >
 > > >Number:         155484
 > > >Category:       kern
 > > >Synopsis:       GPT + UFS boot
 > > >Confidential:   no
 > > >Severity:       serious
 > > >Priority:       medium
 > > >Responsible:    freebsd-bugs
 > > >State:          open
 > > >Quarter:
 > > >Keywords:
 > > >Date-Required:
 > > >Class:          sw-bug
 > > >Submitter-Id:   current-users
 > > >Arrival-Date:   Fri Mar 11 22:50:10 UTC 2011
 > > >Closed-Date:
 > > >Last-Modified:
 > > >Originator:     Andrey Vladimirov
 > > >Release:        Freebsd 8.2 RELEASE
 > > >Organization:
 > > >Environment:
 > > FreeBSD  8.2-STABLE FreeBSD 8.2-STABLE #0: Wed Mar  9 20:11:11 UTC 2011
 >   andrey@:/usr/obj/usr/src/sys/x3650m2  amd64
 > > >Description:
 > > I'm trying to setup a system with a large RAID array (total ~4TB)
 > > I do next step:
 > > 1.Create the boot, swap and UFS partitions:
 > >  Fixit# gpart add -s 64K -t freebsd-boot mfid0
 > >  Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 > >  Fixit# gpart add -t freebsd-ufs -l disk0 mfid0
 > > 2. Install the Protected MBR (pmbr) and gptboot loader
 > > Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1
 > ad0
 > > Then install FreeBSD and add this:
 > > echo 'vfs.root.mountfrom="ufs:/dev/mfid0p2"' >> /boot/loader.conf
 >
 > isn't this line pointing to your swap partition?
 >
 
 > try echo 'vfs.root.mountfrom="ufs:/dev/mfid0p3"' >> /boot/loader.conf
 >
 > ...also shouldn't this be:
 >
 > gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 mfid0 ?
 >
 > also i'm not sure -b and -p can be used together in one command. at least
 > the
 > gpart(8) manual uses two commands for it.
 >
 
 Yes i this command(sorry it is my misprint):
 gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 mfid0
 
 About this "vfs.root.mountfrom=" - it does not matter, because if create
 swap partition after  (freebsd-boot) loader and kernel not booting.
 If I create root partition after freebsd-boot - all work!!!!
 
 
 > > After rebooting (system not booting) i see message:
 > > is unable to find loader at /boot/loader or can it load
 > /boot/kernel/kernel
 > >
 > > I load from DVD and go to Fixit
 > > Copying /boot/loader to /loader allows me to enter /loader at the "boot:"
 > prompt and the loader will load, however, its unable to load the kernel.
 > >
 > > If I do an "ls" at the loader prompt I can see boot listed as a directory
 > (with a "d" before it)
 > > Trying to do "ls boot" inexplicably it says "boot: not a directory"
 > >
 > >
 > >
 > >
 > >
 > > >How-To-Repeat:
 > > do next step:
 > > 1.Create the boot, swap and UFS partitions:
 > >  Fixit# gpart add -s 64K -t freebsd-boot mfid0
 > >  Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 > >  Fixit# gpart add -t freebsd-ufs -l disk0 mfid0
 > > 2. Install the Protected MBR (pmbr) and gptboot loader
 > > Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1
 > ad0
 > > echo 'vfs.root.mountfrom="ufs:/dev/mfid0p2"' >> /boot/loader.conf
 > >
 > > >Fix:
 > > If do next step:
 > >  Fixit# gpart add -s 64K -t freebsd-boot mfid0
 > >  Fixit# gpart add -s 3800G -t freebsd-ufs -l disk0 mfid0
 > >  Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 > > or
 > >  Fixit# gpart add -s 64K -t freebsd-boot mfid0
 > > next partition must be root(/)
 > >  Fixit# gpart add -s 3G -t freebsd-ufs -l disk0 mfid0
 > >  Fixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
 > >
 > > No problem with boot on GPT.
 > >
 > > >Release-Note:
 > > >Audit-Trail:
 > > >Unformatted:
 >
 > --
 > a13x
 >
 
 
 
 -- 
 Best regards,
 Andrey Vladimirov
 
 --0015174be5b0f2f393049e49a1ea
 Content-Type: text/html; charset=KOI8-R
 Content-Transfer-Encoding: quoted-printable
 
 <br><br><div class=3D"gmail_quote">2011/3/12 Alexander Best <span dir=3D"lt=
 r">&lt;<a href=3D"mailto:arundel@freebsd.org">arundel@freebsd.org</a>&gt;</=
 span><br><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8=
 ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 On Fri Mar 11 11, Andrey Vladimirov wrote:<br>
 &gt;<br>
 &gt; &gt;Number: =9A =9A =9A =9A 155484<br>
 &gt; &gt;Category: =9A =9A =9A kern<br>
 &gt; &gt;Synopsis: =9A =9A =9A GPT + UFS boot<br>
 &gt; &gt;Confidential: =9A no<br>
 &gt; &gt;Severity: =9A =9A =9A serious<br>
 &gt; &gt;Priority: =9A =9A =9A medium<br>
 &gt; &gt;Responsible: =9A =9Afreebsd-bugs<br>
 &gt; &gt;State: =9A =9A =9A =9A =9Aopen<br>
 &gt; &gt;Quarter:<br>
 &gt; &gt;Keywords:<br>
 &gt; &gt;Date-Required:<br>
 &gt; &gt;Class: =9A =9A =9A =9A =9Asw-bug<br>
 &gt; &gt;Submitter-Id: =9A current-users<br>
 <div class=3D"im">&gt; &gt;Arrival-Date: =9A Fri Mar 11 22:50:10 UTC 2011<b=
 r>
 </div>&gt; &gt;Closed-Date:<br>
 &gt; &gt;Last-Modified:<br>
 &gt; &gt;Originator: =9A =9A Andrey Vladimirov<br>
 &gt; &gt;Release: =9A =9A =9A =9AFreebsd 8.2 RELEASE<br>
 &gt; &gt;Organization:<br>
 &gt; &gt;Environment:<br>
 &gt; FreeBSD =9A8.2-STABLE FreeBSD 8.2-STABLE #0: Wed Mar =9A9 20:11:11 UTC=
  2011 =9A =9A andrey@:/usr/obj/usr/src/sys/x3650m2 =9Aamd64<br>
 &gt; &gt;Description:<br>
 &gt; I&#39;m trying to setup a system with a large RAID array (total ~4TB)<=
 br>
 &gt; I do next step:<br>
 &gt; 1.Create the boot, swap and UFS partitions:<br>
 &gt; =9AFixit# gpart add -s 64K -t freebsd-boot mfid0<br>
 &gt; =9AFixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0<br>
 &gt; =9AFixit# gpart add -t freebsd-ufs -l disk0 mfid0<br>
 &gt; 2. Install the Protected MBR (pmbr) and gptboot loader<br>
 &gt; Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1=
  ad0<br>
 &gt; Then install FreeBSD and add this:<br>
 &gt; echo &#39;vfs.root.mountfrom=3D&quot;ufs:/dev/mfid0p2&quot;&#39; &gt;&=
 gt; /boot/loader.conf<br>
 <br>
 isn&#39;t this line pointing to your swap partition?<br></blockquote><block=
 quote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left=
 : 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 <br>
 try echo &#39;vfs.root.mountfrom=3D&quot;ufs:/dev/mfid0p3&quot;&#39; &gt;&g=
 t; /boot/loader.conf<br>
 <br>
 ...also shouldn&#39;t this be:<br>
 <br>
 gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 mfid0 ?<br>
 <br>
 also i&#39;m not sure -b and -p can be used together in one command. at lea=
 st the<br>
 gpart(8) manual uses two commands for it.<br></blockquote><div><br>Yes i <s=
 pan id=3D"result_box" class=3D"short_text" lang=3D"en"><span title=3D"=EE=
 =C1=D6=CD=C9=D4=C5, =DE=D4=CF=C2=D9 =D5=D7=C9=C4=C5=D4=D8 =C1=CC=D8=D4=C5=
 =D2=CE=C1=D4=C9=D7=CE=D9=CA =D0=C5=D2=C5=D7=CF=C4" class=3D"hps">this</span=
 > <span title=3D"=EE=C1=D6=CD=C9=D4=C5, =DE=D4=CF=C2=D9 =D5=D7=C9=C4=C5=D4=
 =D8 =C1=CC=D8=D4=C5=D2=CE=C1=D4=C9=D7=CE=D9=CA =D0=C5=D2=C5=D7=CF=C4" class=
 =3D"hps">command(sorry it is my </span></span>misprint<span id=3D"result_bo=
 x" class=3D"short_text" lang=3D"en"><span title=3D"=EE=C1=D6=CD=C9=D4=C5, =
 =DE=D4=CF=C2=D9 =D5=D7=C9=C4=C5=D4=D8 =C1=CC=D8=D4=C5=D2=CE=C1=D4=C9=D7=CE=
 =D9=CA =D0=C5=D2=C5=D7=CF=C4" class=3D"hps">):<br>
 </span></span>gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 =
 mfid0 <br><br>About this &quot;vfs.root.mountfrom=3D&quot; - <span id=3D"re=
 sult_box" class=3D"short_text" lang=3D"en"><span title=3D"=EE=C1=D6=CD=C9=
 =D4=C5, =DE=D4=CF=C2=D9 =D5=D7=C9=C4=C5=D4=D8 =C1=CC=D8=D4=C5=D2=CE=C1=D4=
 =C9=D7=CE=D9=CA =D0=C5=D2=C5=D7=CF=C4" class=3D"hps">it does not matter, </=
 span></span><span id=3D"result_box" class=3D"short_text" lang=3D"en"><span =
 title=3D"=EE=C1=D6=CD=C9=D4=C5, =DE=D4=CF=C2=D9 =D5=D7=C9=C4=C5=D4=D8 =C1=
 =CC=D8=D4=C5=D2=CE=C1=D4=C9=D7=CE=D9=CA =D0=C5=D2=C5=D7=CF=C4" class=3D"hps=
 ">because</span></span> if create swap partition after=9A (freebsd-boot) lo=
 ader and kernel not booting.<br>
 <span id=3D"result_box" class=3D"short_text" lang=3D"en"><span title=3D"=EE=
 =C1=D6=CD=C9=D4=C5, =DE=D4=CF=C2=D9 =D5=D7=C9=C4=C5=D4=D8 =C1=CC=D8=D4=C5=
 =D2=CE=C1=D4=C9=D7=CE=D9=CA =D0=C5=D2=C5=D7=CF=C4" class=3D"hps">If I creat=
 e root partition after </span></span>freebsd-boot - all work!!!!<br><br></d=
 iv><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; bo=
 rder-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 
 <br>
 &gt; After rebooting (system not booting) i see message:<br>
 &gt; is unable to find loader at /boot/loader or can it load /boot/kernel/k=
 ernel<br>
 &gt;<br>
 &gt; I load from DVD and go to Fixit<br>
 &gt; Copying /boot/loader to /loader allows me to enter /loader at the &quo=
 t;boot:&quot; prompt and the loader will load, however, its unable to load =
 the kernel.<br>
 &gt;<br>
 &gt; If I do an &quot;ls&quot; at the loader prompt I can see boot listed a=
 s a directory (with a &quot;d&quot; before it)<br>
 &gt; Trying to do &quot;ls boot&quot; inexplicably it says &quot;boot: not =
 a directory&quot;<br>
 &gt;<br>
 &gt;<br>
 &gt;<br>
 &gt;<br>
 &gt;<br>
 &gt; &gt;How-To-Repeat:<br>
 &gt; do next step:<br>
 &gt; 1.Create the boot, swap and UFS partitions:<br>
 &gt; =9AFixit# gpart add -s 64K -t freebsd-boot mfid0<br>
 &gt; =9AFixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0<br>
 &gt; =9AFixit# gpart add -t freebsd-ufs -l disk0 mfid0<br>
 &gt; 2. Install the Protected MBR (pmbr) and gptboot loader<br>
 &gt; Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1=
  ad0<br>
 &gt; echo &#39;vfs.root.mountfrom=3D&quot;ufs:/dev/mfid0p2&quot;&#39; &gt;&=
 gt; /boot/loader.conf<br>
 &gt;<br>
 &gt; &gt;Fix:<br>
 &gt; If do next step:<br>
 &gt; =9AFixit# gpart add -s 64K -t freebsd-boot mfid0<br>
 &gt; =9AFixit# gpart add -s 3800G -t freebsd-ufs -l disk0 mfid0<br>
 &gt; =9AFixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0<br>
 &gt; or<br>
 &gt; =9AFixit# gpart add -s 64K -t freebsd-boot mfid0<br>
 &gt; next partition must be root(/)<br>
 &gt; =9AFixit# gpart add -s 3G -t freebsd-ufs -l disk0 mfid0<br>
 &gt; =9AFixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0<br>
 &gt;<br>
 &gt; No problem with boot on GPT.<br>
 &gt;<br>
 &gt; &gt;Release-Note:<br>
 &gt; &gt;Audit-Trail:<br>
 &gt; &gt;Unformatted:<br>
 <font color=3D"#888888"><br>
 --<br>
 a13x<br>
 </font></blockquote></div><br><br clear=3D"all"><br>-- <br>Best regards,<br=
 >Andrey Vladimirov<br>
 
 --0015174be5b0f2f393049e49a1ea--

From: Andrey Vladimirov <rarehawk@gmail.com>
To: "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/155484: GPT + UFS boot
Date: Sat, 12 Mar 2011 15:58:35 +0200

 --0015174c45a285ca63049e4979f1
 Content-Type: text/plain; charset=KOI8-R
 Content-Transfer-Encoding: quoted-printable
 
 Sorry it is misprint.
 
 I use this:
 Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 mfid0
 
 
 12 =CD=C1=D2=D4=C1 2011 =C7. 10:36 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 And=
 rey V. Elsukov
 <bu7cher@yandex.ru>=CE=C1=D0=C9=D3=C1=CC:
 
 > On 12.03.2011 01:42, Andrey Vladimirov wrote:
 > > 2. Install the Protected MBR (pmbr) and gptboot loader
 > > Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1
 > ad0
 >
 > Did you try to use gptboot instead gptzfsboot?
 >
 > --
 > WBR, Andrey V. Elsukov
 >
 
 
 
 --=20
 Best regards,
 Andrey Vladimirov
 
 --0015174c45a285ca63049e4979f1
 Content-Type: text/html; charset=KOI8-R
 Content-Transfer-Encoding: quoted-printable
 
 Sorry it is misprint.<br><br>I use this:<br>Fixit# gpart bootcode -b /mnt2/=
 boot/pmbr -p /mnt2/boot/gptboot -i 1 mfid0<br><br><br><div class=3D"gmail_q=
 uote">12 =CD=C1=D2=D4=C1 2011=9A=C7. 10:36 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=
 =CC=D8 Andrey V. Elsukov <span dir=3D"ltr">&lt;<a href=3D"mailto:bu7cher@ya=
 ndex.ru">bu7cher@yandex.ru</a>&gt;</span> =CE=C1=D0=C9=D3=C1=CC:<br>
 <blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
 r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class=3D"im"=
 >On 12.03.2011 01:42, Andrey Vladimirov wrote:<br>
 &gt; 2. Install the Protected MBR (pmbr) and gptboot loader<br>
 &gt; Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1=
  ad0<br>
 <br>
 </div>Did you try to use gptboot instead gptzfsboot?<br>
 <font color=3D"#888888"><br>
 --<br>
 WBR, Andrey V. Elsukov<br>
 </font></blockquote></div><br><br clear=3D"all"><br>-- <br>Best regards,<br=
 >Andrey Vladimirov<br>
 
 --0015174c45a285ca63049e4979f1--

From: Andriy Gapon <avg@freebsd.org>
To: bug-followup@freebsd.org, rarehawk@gmail.com
Cc:  
Subject: Re: kern/155484: [ufs] GPT + UFS boot don't work well together
Date: Wed, 16 Mar 2011 15:42:42 +0200

 Let me ask again - did my suggestion help?
 
 -- 
 Andriy Gapon

From: Andrey Vladimirov <rarehawk@gmail.com>
To: Andriy Gapon <avg@freebsd.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/155484: [ufs] GPT + UFS boot don't work well together
Date: Thu, 17 Mar 2011 00:52:58 +0200

 --001636d34866f7fac5049ea1677b
 Content-Type: text/plain; charset=ISO-8859-1
 
 >
 >
 > Let me ask again - did my suggestion help?
 >
 > --
 > Andriy Gapon
 >
 
 No. (if swap partition after freebsd-boot)
 
 -- 
 Best regards,
 Andrey Vladimirov
 
 --001636d34866f7fac5049ea1677b
 Content-Type: text/html; charset=ISO-8859-1
 
 <div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
 Let me ask again - did my suggestion help?<br>
 <br>
 --<br>
 <font color="#888888">Andriy Gapon<br>
 </font></blockquote></div><br>No. (if swap partition after freebsd-boot)<br clear="all"><br>-- <br>Best regards,<br>Andrey Vladimirov<br>
 
 --001636d34866f7fac5049ea1677b--

From: Andriy Gapon <avg@FreeBSD.org>
To: Andrey Vladimirov <rarehawk@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/155484: [ufs] GPT + UFS boot don't work well together
Date: Thu, 26 May 2011 15:28:48 +0300

 I can not reproduce your problem.
 This is what I did (to provide a full and clean picture unlike your original example):
 
 $ gpart create -s gpt /dev/zvol/pond/zvol2
 zvol/pond/zvol2 created
 $ gpart add -s 64K -t freebsd-boot zvol/pond/zvol2
 zvol/pond/zvol2p1 added
 $ gpart add -s 128m -t freebsd-swap -l swap0 zvol/pond/zvol2
 zvol/pond/zvol2p2 added
 $ gpart add -t freebsd-ufs -l disk0 zvol/pond/zvol2
 zvol/pond/zvol2p3 added
 $ gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 zvol/pond/zvol2
 bootcode written to zvol/pond/zvol2
 $ newfs /dev/zvol/pond/zvol2p3
 /dev/zvol/pond/zvol2p3: 895.9MB (1834812 sectors) block size 16384, fragment size 2048
         using 5 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
 super-block backups (for fsck -b #) at:
  160, 376416, 752672, 1128928, 1505184
 $ mount /dev/zvol/pond/zvol2p3 /mnt
 $ cp -a /boot /mnt/boot
 $ umount /mnt
 $ gpart show zvol/pond/zvol2
 =>     34  2097085  zvol/pond/zvol2  GPT  (1.0G)
        34      128                1  freebsd-boot  (64k)
       162   262144                2  freebsd-swap  (128M)
    262306  1834813                3  freebsd-ufs  (895M)
 $ name -srm
 FreeBSD 9.0-CURRENT amd64
 
 After this I can boot to kernel from this zvol in qemu without any problems.
 So either there is some pilot error, or some problems with your boot blocks or
 with 8GB size of the swap partition (but somehow I doubt that this is the case).
 
 Do you have a chance to play with your configuration more?
 If so, can you try smaller swap partition sizes (starting with 128M for example)?
 Can you try to use boot blocks (gptboot) from a recent head/CURRENT snapshot?
 
 -- 
 Andriy Gapon

From: Andriy Gapon <avg@FreeBSD.org>
To: bug-followup@FreeBSD.org, rarehawk@gmail.com
Cc:  
Subject: Re: kern/155484: [ufs] GPT + UFS boot don't work well together
Date: Wed, 01 Jun 2011 19:57:40 +0300

 I have tried with 8GB swap partition size and still couldn't reproduce the
 problem.  I am going to close this PR.
 
 Layout of my test setup:
 $ gpart show zvol/pond/zvol5
 =>      34  20971453  zvol/pond/zvol5  GPT  (10G)
         34       128                1  freebsd-boot  (64k)
        162  16777216                2  freebsd-swap  (8.0G)
   16777378   4194109                3  freebsd-ufs  (2G)
 
 -- 
 Andriy Gapon
State-Changed-From-To: open->closed 
State-Changed-By: avg 
State-Changed-When: Thu Jun 2 14:11:44 UTC 2011 
State-Changed-Why:  
Works for me. 

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