From owner-freebsd-fs@FreeBSD.ORG Sat Mar 12 14:10:15 2011 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 368941065670 for ; Sat, 12 Mar 2011 14:10:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 015658FC12 for ; Sat, 12 Mar 2011 14:10:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p2CEAEx0009163 for ; Sat, 12 Mar 2011 14:10:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p2CEAEHC009162; Sat, 12 Mar 2011 14:10:14 GMT (envelope-from gnats) Date: Sat, 12 Mar 2011 14:10:14 GMT Message-Id: <201103121410.p2CEAEHC009162@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Andrey Vladimirov Cc: Subject: Re: kern/155484: GPT + UFS boot X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andrey Vladimirov List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2011 14:10:15 -0000 The following reply was made to PR kern/155484; it has been noted by GNATS. From: Andrey Vladimirov To: Alexander Best 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 > 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

2011/3/12 Alexander Best <arundel@freebsd.org>
On Fri Mar 11 11, Andrey Vladimirov wrote:
>
> >Number: =9A =9A =9A =9A 155484
> >Category: =9A =9A =9A kern
> >Synopsis: =9A =9A =9A GPT + UFS boot
> >Confidential: =9A no
> >Severity: =9A =9A =9A serious
> >Priority: =9A =9A =9A medium
> >Responsible: =9A =9Afreebsd-bugs
> >State: =9A =9A =9A =9A =9Aopen
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class: =9A =9A =9A =9A =9Asw-bug
> >Submitter-Id: =9A current-users
> >Arrival-Date: =9A Fri Mar 11 22:50:10 UTC 2011
> >Closed-Date:
> >Last-Modified:
> >Originator: =9A =9A Andrey Vladimirov
> >Release: =9A =9A =9A =9AFreebsd 8.2 RELEASE
> >Organization:
> >Environment:
> 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
> >Description:
> I'm trying to setup a system with a large RAID array (total ~4TB)<= br> > I do next step:
> 1.Create the boot, swap and UFS partitions:
> =9AFixit# gpart add -s 64K -t freebsd-boot mfid0
> =9AFixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
> =9AFixit# 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=3D"ufs:/dev/mfid0p2"' >&= gt; /boot/loader.conf

isn't this line pointing to your swap partition?

try echo 'vfs.root.mountfrom=3D"ufs:/dev/mfid0p3"' >&g= t; /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 lea= st 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=3D" - it does not matter, because if create swap partition after=9A (freebsd-boot) lo= ader and kernel not booting.
If I creat= e 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/k= ernel
>
> I load from DVD and go to Fixit
> Copying /boot/loader to /loader allows me to enter /loader at the &quo= t;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 a= s 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:
> =9AFixit# gpart add -s 64K -t freebsd-boot mfid0
> =9AFixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
> =9AFixit# 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=3D"ufs:/dev/mfid0p2"' >&= gt; /boot/loader.conf
>
> >Fix:
> If do next step:
> =9AFixit# gpart add -s 64K -t freebsd-boot mfid0
> =9AFixit# gpart add -s 3800G -t freebsd-ufs -l disk0 mfid0
> =9AFixit# gpart add -s 8G -t freebsd-swap -l swap0 mfid0
> or
> =9AFixit# gpart add -s 64K -t freebsd-boot mfid0
> next partition must be root(/)
> =9AFixit# gpart add -s 3G -t freebsd-ufs -l disk0 mfid0
> =9AFixit# 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--