From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VOQNk-00042v-Dv for mharc-grub-devel@gnu.org; Tue, 24 Sep 2013 07:02:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOQNd-00040u-Gx for grub-devel@gnu.org; Tue, 24 Sep 2013 07:02:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOQNV-0005NP-Mo for grub-devel@gnu.org; Tue, 24 Sep 2013 07:02:09 -0400 Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:60940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOQNV-0005N4-Da for grub-devel@gnu.org; Tue, 24 Sep 2013 07:02:01 -0400 Received: by mail-la0-f44.google.com with SMTP id eo20so3560460lab.31 for ; Tue, 24 Sep 2013 04:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type; bh=JOSCN8SJc1MW9aPutT+XcoqTqLpAbRx2fNFHyUWdkjA=; b=w7O30d0WDPlok2EQmV3oeB9iK9mbzow8ej3y49s75ZHppLIXmVKgkTjvsG9jvKu1fu LLyJZpGPoQq1hHl65ht9ap8z13jZ0TY0EP7e7lSIsze+fyO5V/kzhtHg/DR/bIXHwkW1 0HwoDVFK+aDhpJZ5/DsB5lRE/SvcoOJ3jdqzet+ATVqUuMfUwMJvW9IxVZIupm43rIxb bEgjOrz7On+NvVu9g418BN5jILhegG858duP34uSKyGHCpUU6kPX61PjYlgcuuPHpEbP WxLhVmQtOSenZhkHhVn3cf3G+eAQYWD/fkmVcuD3uLzF1VPIxYjNOPue+kLTZKTZFxi2 RHFw== X-Received: by 10.152.45.106 with SMTP id l10mr25029870lam.12.1380020520169; Tue, 24 Sep 2013 04:02:00 -0700 (PDT) Received: from opensuse.site (ppp91-76-150-246.pppoe.mtu-net.ru. [91.76.150.246]) by mx.google.com with ESMTPSA id l10sm14950866lbh.13.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 24 Sep 2013 04:01:59 -0700 (PDT) Date: Tue, 24 Sep 2013 15:01:58 +0400 From: Andrey Borzenkov To: grub-devel@gnu.org Subject: Re: grub2 boot root-on-zfs errors Message-ID: <20130924150158.78bb8798@opensuse.site> In-Reply-To: <20130924075636.3f3d8696@opensuse.site> References: <52409669.4020804@gmail.com> <20130924075636.3f3d8696@opensuse.site> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/RnYdN3Q6QffsiiiuYHaLgH0"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 11:02:15 -0000 --Sig_/RnYdN3Q6QffsiiiuYHaLgH0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =D0=92 Tue, 24 Sep 2013 07:56:36 +0400 Andrey Borzenkov =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > =D0=92 Mon, 23 Sep 2013 21:28:41 +0200 > Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0= =B8=D1=88=D0=B5=D1=82: >=20 > > On 23.09.2013 20:59, Beeblebrox wrote: > > >>> This doesn't demonstrate anything else than that you didn't use to= ols > > > correctly. It's: grub-probe -d /dev/ada0p2 > > >=20 > > > Thank you very much - I ran the command you instructed and see that > > > the FS is identified correctly. > > > $ grub-probe -d /dev/ada0p2 > > > zfs > > >=20 > > > I cannot, however, boot from grub directly into zfs-root. After the > > > grub menu comes up, and I fall to command-prompt, listing the drives > > > shows no ZFS paths and the various menu variations I have tried do not > > > work. > > >=20 > > > Unfortunately, there is not much accurate documentation for > > > FreeBSD+ZFS+grub, and the linux solutions to the problem do not work > > > for FreeBSD. > > >=20 > > > The main problem form the grub loader / command line, is that I cannot > > > get any code loaded which is located on a ZPOOL: > > >=20 > > > menuentry 'FreeBSD-ZFS' { > > > insmod zfs > > > set root=3D'hd0,gpt2' > > > kfreebsd /boot/loader } > > >=20 > > > Fails because grub cannot find bootloader and gives "no such file" er= ror. > > > Please let me know what =C4=B1ther info I can provide to debug the pr= oblem. > > >=20 > > Syntax is: > > (DISK)/VOLUME@[SNAPSHOT]/FILE > > I think it's described somewhere in manual >=20 > No, it is not. There are examples using zfs with this syntax (but > without snapshot)s). >=20 > I'm not sure where should it go ... in "File name syntax" probably? Like this? From: Andrey Borzenkov To: grub-devel@gnu.org Subject: [PATCH] document ZFS filename syntax. Signed-off-by: Andrey Borzenkov --- docs/grub.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index 574f602..1cef528 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -2564,6 +2564,13 @@ GRUB's @dfn{root device} implicitly. So if you set t= he root device to, say, @samp{(hd1,1)} by the command @samp{set root=3D(hd1,1)} (@pxref{set}), then @code{/boot/kernel} is the same as @code{(hd1,1)/boot/kernel}. =20 +On ZFS filesystem the first path component must be +@var{volume}@samp{@@}[@var{snapshot}]. +So @samp{/rootvol@snap-129/boot/grub/grub.cfg} refers to file +@samp{/boot/grub/grub.cfg} in snapshot of volume @samp{rootvol} with name +@samp{snap-129}. Trailing @samp{@@} after volume name is mandatory even if +snapshot name is omitted. + =20 @node Block list syntax @section How to specify block lists --=20 tg: (321e011..) u/zfs_file_names (depends on: master) --Sig_/RnYdN3Q6QffsiiiuYHaLgH0 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlJBcSYACgkQR6LMutpd94yCGgCgmnkFPh2n9gNT9M5Ini+p2A5O 74IAn1KvQUn9DafVYdL/pqKBOOTojZ/G =Xh0h -----END PGP SIGNATURE----- --Sig_/RnYdN3Q6QffsiiiuYHaLgH0--