Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Mar 2011 14:10:14 GMT
From:      Andrey Vladimirov <rarehawk@gmail.com>
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/155484: GPT + UFS boot
Message-ID:  <201103121410.p2CEAEHC009162@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/155484; it has been noted by GNATS.

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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103121410.p2CEAEHC009162>