Re: grub2 boot root-on-zfs errors

2013-11-25 Thread Beeblebrox
Hello. I have built and installed Grub from trunk (lbeit without docs and efiemu, which I don't need). I have also installed the boot code and have booted from grub. Here are my results: * grub-probe correctly identifies partitions as ZFS. * grub-mkconfig correctly generates a config file and has

Re: grub2 boot root-on-zfs errors

2013-11-25 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 25.11.2013 12:08, Beeblebrox wrote: * At boot time, grub menu comes up, and starts to boot normally into the ZFS pool. However boot stops at mounting root because no such file system, and BTX (the FreeBSD loader) is very unresponsive. What do you mean by BTX? The standard GRUB entries for

Re: grub2 boot root-on-zfs errors

2013-11-25 Thread Colin Watson
On Fri, Nov 22, 2013 at 02:30:28PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 22.11.2013 14:16, Colin Watson wrote: This will not be sufficient to build on GNU/Hurd (get_ofpathname isn't directly relevant to that platform, but that function will be compiled there anyway). We

Re: grub2 boot root-on-zfs errors

2013-11-25 Thread Andrey Borzenkov
В Mon, 25 Nov 2013 13:08:45 +0200 Beeblebrox zap...@berentweb.com пишет: * grub-mkconfig does not detect an ubuntu linux (btrfs) install on separate HDD. Detection of other systems is implemented outside of grub2; it is done by os-prober. grub-mkconfig will launch os-prober if it is found and

Re: grub2 boot root-on-zfs errors

2013-11-25 Thread Vladimir 'phcoder' Serbinenko
paste your grub.cfg to give context On Nov 25, 2013 12:09 PM, Beeblebrox zap...@berentweb.com wrote: Hello. I have built and installed Grub from trunk (lbeit without docs and efiemu, which I don't need). I have also installed the boot code and have booted from grub. Here are my results: *

Re: grub2 boot root-on-zfs errors

2013-11-24 Thread Beeblebrox
* Is there a way to compile without docs? This does not work: ./configure --disable-werror --disable-nls --disable-docs * I disabled the docs section manually in grub/Makefile. gmake completed but still with warning: /usr/bin/ld: unrecognised emulation mode: elf_x86_64 Supported emulations:

Re: grub2 boot root-on-zfs errors

2013-11-24 Thread Andrey Borzenkov
В Sun, 24 Nov 2013 11:14:11 +0200 Beeblebrox zap...@berentweb.com пишет: * Is there a way to compile without docs? This does not work: ./configure --disable-werror --disable-nls --disable-docs * I disabled the docs section manually in grub/Makefile. gmake completed but still with warning:

Re: grub2 boot root-on-zfs errors

2013-11-23 Thread Beeblebrox
Applied the diff but got error elsewhere. Git repo on 1bba40f57813c2ccf790e6aca8b96292634b04ca Date: Sat Nov 23 12:39:21 2013 +0100 FreeBSD 11.0-CURRENT_amd64 config.status: creating grub-shell chmod a+x grub-shell (for x in tests/util/grub-shell-tester.in ; do cat ./$x; done) | ./config.status

Re: grub2 boot root-on-zfs errors

2013-11-23 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 23.11.2013 13:54, Beeblebrox wrote: Applied the diff but got error elsewhere. Git repo on 1bba40f57813c2ccf790e6aca8b96292634b04ca Advance to e67566ce0a925342d0a988ec196710e204a1d900 or later Date: Sat Nov 23 12:39:21 2013 +0100 FreeBSD 11.0-CURRENT_amd64 config.status: creating

Re: grub2 boot root-on-zfs errors

2013-11-23 Thread Beeblebrox
More progress, but other problem. Compile passed through previous error but breaks when building docs (which I really don't need). Breaks at: Making all in docs gmake[2]: Entering directory `/asp/git/grub/docs' Updating ./version.texi restore=: backupdir=.am$$ \ am__cwd=`pwd`

Re: grub2 boot root-on-zfs errors

2013-11-23 Thread Beeblebrox
It seems I made a mistake in my previous post. I should have included a previous warning code as well (just in case.)Correction as to where compile breaks: cc -DHAVE_CONFIG_H -I../grub-core/efiemu/runtime -DGRUB_FILE=\efiemu/runtime/efiemu.S\ -I. -I. -I.. -I.. -I../include -I../include

Re: grub2 boot root-on-zfs errors

2013-11-22 Thread Colin Watson
On Fri, Nov 22, 2013 at 08:30:14AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 22.11.2013 08:09, Beeblebrox wrote: grub-core/osdep/unix/platform.c:34:28: error: use of undeclared identifier 'PATH_MAX' char *ret = xmalloc (2 * PATH_MAX); Please try diff --git

Re: grub2 boot root-on-zfs errors

2013-11-22 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 22.11.2013 14:16, Colin Watson wrote: On Fri, Nov 22, 2013 at 08:30:14AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 22.11.2013 08:09, Beeblebrox wrote: grub-core/osdep/unix/platform.c:34:28: error: use of undeclared identifier 'PATH_MAX' char *ret = xmalloc (2 * PATH_MAX);

Re: grub2 boot root-on-zfs errors

2013-11-22 Thread Beeblebrox
config.log re-sent as link, as requested by mail list admin (file too large) https://drive.google.com/file/d/0Bxs_eepbMt6qejJBZVQyZngtdTA/edit?usp=sharing Regards. ___ Grub-devel mailing list Grub-devel@gnu.org

Re: grub2 boot root-on-zfs errors

2013-11-22 Thread Beeblebrox
The patched file is giving me an error. I tried patching several times, but keep getting same error. Most likely some stupid error on my part: grub-core/osdep/unix/platform.c:43:4: error: expected expression FILE *fp = fdopen (fd, r); ^ grub-core/osdep/unix/platform.c:44:20: error: expected

Re: grub2 boot root-on-zfs errors

2013-11-22 Thread Vladimir 'φ-coder/phcoder' Serbinenko
40 pid = grub_util_exec_pipe ((const char * []){ ofpathname, dev, NULL }, fd); 41 if (!pid) 42 Why did you remove the whole chunk of code here? Please use ptach command to apply patches, not some manual way. 43 FILE *fp = fdopen (fd, r); 44 get_ofpathname (const char *dev) 45 if

Re: grub2 boot root-on-zfs errors

2013-11-21 Thread Beeblebrox
@ Vladimir: Please attach your config.log Enclosed as requested (for latest run) A new problem: I updated the git repo to latest and tried to re-build. Build was started with: ./autogen.sh USE_GCC=any --disable-werror ./configure USE_GCC=any --disable-werror gmake USE_GCC=any However, compile

Re: grub2 boot root-on-zfs errors

2013-11-21 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 22.11.2013 08:09, Beeblebrox wrote: @ Vladimir: Please attach your config.log Enclosed as requested (for latest run) No you didn't. No config.log is attached. Please send it. A new problem: I updated the git repo to latest and tried to re-build. Build was started with: ./autogen.sh

Re: grub2 boot root-on-zfs errors

2013-11-21 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 22.11.2013 08:09, Beeblebrox wrote: grub-core/osdep/unix/platform.c:34:28: error: use of undeclared identifier 'PATH_MAX' char *ret = xmalloc (2 * PATH_MAX); Please try diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c index 65c93f1..a527a1c 100644 ---

Re: grub2 boot root-on-zfs errors

2013-11-10 Thread Beeblebrox
Did you rerun ./autogen.sh? I ran gmake clean and cleaned all conig folders, then re-started from scratch. What is the value of your target_os ? Build, host target are all the same. I tried setting all 3 as i386-freebsd for one of my runs, but that did not work. Otherwise, I did not set it

Re: grub2 boot root-on-zfs errors

2013-11-10 Thread Andrey Borzenkov
В Sun, 10 Nov 2013 12:28:50 +0200 Beeblebrox zap...@berentweb.com пишет: Did you rerun ./autogen.sh? I ran gmake clean and cleaned all conig folders, then re-started from scratch. It would be more clean to start in new directory. If you build inside source tree, use git clean -d -x -f

Re: grub2 boot root-on-zfs errors

2013-11-10 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 10.11.2013 11:28, Beeblebrox wrote: Did you rerun ./autogen.sh? I ran gmake clean and cleaned all conig folders, then re-started from scratch. What is the value of your target_os ? Build, host target are all the same. I tried setting all 3 as i386-freebsd for one of my runs, but

Re: grub2 boot root-on-zfs errors

2013-11-10 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 10.11.2013 11:41, Andrey Borzenkov wrote: В Sun, 10 Nov 2013 12:28:50 +0200 Beeblebrox zap...@berentweb.com пишет: Did you rerun ./autogen.sh? I ran gmake clean and cleaned all conig folders, then re-started from scratch. It would be more clean to start in new directory. If you

Re: grub2 boot root-on-zfs errors

2013-11-10 Thread Beeblebrox
@ Vladimir: This is not quite what I asked. Please attach your config.log Apologies, I did not see that request. Anyway, I ran per your suggestion: $ ./autogen.sh --disable-werror --target i386-freebsd $ ./configure --disable-werror --target i386-freebsd $ gmake Compile completed cleanly, and

Re: grub2 boot root-on-zfs errors

2013-11-10 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 10.11.2013 18:50, Beeblebrox wrote: @ Vladimir: This is not quite what I asked. Please attach your config.log Apologies, I did not see that request. I meant the value of host_os in config.log. Anyway, I ran per your suggestion: $ ./autogen.sh --disable-werror --target i386-freebsd

Re: grub2 boot root-on-zfs errors

2013-11-09 Thread Beeblebrox
As of today, Nov/9/13, I have updated the git repo to latest version. The error persists: /usr/bin/ld: unrecognised emulation mode: elf_i386 Supported emulations: elf_x86_64_fbsd elf_i386_fbsd cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [disk.module]

Re: grub2 boot root-on-zfs errors

2013-11-09 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 09.11.2013 16:31, Beeblebrox wrote: As of today, Nov/9/13, I have updated the git repo to latest version. The error persists: /usr/bin/ld: unrecognised emulation mode: elf_i386 Supported emulations: elf_x86_64_fbsd elf_i386_fbsd cc: error: linker command failed with exit code 1 (use -v

Re: grub2 boot root-on-zfs errors

2013-11-08 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 05.11.2013 08:35, Beeblebrox wrote: Another slight problem. Updated the GIT repo to latest, $ gmake clean /autogen.sh --disable-werror ./configure --disable-werror $ gmake = /usr/bin/ld: unrecognised emulation mode: elf_i386 Supported emulations: elf_x86_64_fbsd elf_i386_fbsd

Re: grub2 boot root-on-zfs errors

2013-11-05 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 05.11.2013 08:35, Beeblebrox wrote: Another slight problem. Updated the GIT repo to latest, $ gmake clean /autogen.sh --disable-werror ./configure --disable-werror $ gmake = /usr/bin/ld: unrecognised emulation mode: elf_i386 Supported emulations: elf_x86_64_fbsd elf_i386_fbsd

Re: grub2 boot root-on-zfs errors

2013-11-05 Thread Beeblebrox
Unrelated. float and double poisoning is OS-independent. Thank you - I really appreciate that information. Is there anything you would like me to do re Supported emulations: elf_x86_64_fbsd elf_i386_fbsd Or will you be pushing a code revision into trunk? Regards.

Re: grub2 boot root-on-zfs errors

2013-11-04 Thread Beeblebrox
Another slight problem. Updated the GIT repo to latest, $ gmake clean /autogen.sh --disable-werror ./configure --disable-werror $ gmake = /usr/bin/ld: unrecognised emulation mode: elf_i386 Supported emulations: elf_x86_64_fbsd elf_i386_fbsd gmake[3]: *** [disk.module] Error 1 gmake[3]: Leaving

Re: grub2 boot root-on-zfs errors

2013-11-03 Thread Beeblebrox
/usr/include/machine/_types.h:65: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__double_t' /usr/include/machine/_types.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__float_t' You system headers do something stupid: they use float/double in standalone

Re: grub2 boot root-on-zfs errors

2013-11-02 Thread Beeblebrox
Per your suggestion, I ran: $ ./autogen.sh --disable-werror $ ./configure --disable-werror $ gmake = breaks with below. (also tried with $ gmake -Wno-error). Where to go from here? gmake all-am gmake[3]: Entering directory `/asp/git/grub/grub-core' gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W

Re: grub2 boot root-on-zfs errors

2013-11-02 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 02.11.2013 08:58, Beeblebrox wrote: /usr/include/machine/_types.h:65: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__double_t' /usr/include/machine/_types.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__float_t' You system headers do something

Re: grub2 boot root-on-zfs errors

2013-10-31 Thread Beeblebrox
switched local repo to git (git://git.savannah.gnu.org/grub.git) Compile error persists as advised in previous mail ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: grub2 boot root-on-zfs errors

2013-10-31 Thread Andrey Borzenkov
В Thu, 31 Oct 2013 12:37:41 +0200 Beeblebrox zap...@berentweb.com пишет: I did not have time to play around with trunk/grub for a while so was not able to follow-up on the discussion. Continuing from last month's topic: Flex version 2.5.4 is less than 2.3.35. 2.5 is 2.3 The problem was

Re: grub2 boot root-on-zfs errors

2013-10-31 Thread Beeblebrox
What are sizes of size_t and int on your platform? My system is amd4 running FreeBSD-9.2 If you require more information please instruct code to run from CLI for that. ___ Grub-devel mailing list Grub-devel@gnu.org

Re: grub2 boot root-on-zfs errors

2013-10-31 Thread Andrey Borzenkov
В Thu, 31 Oct 2013 12:37:41 +0200 Beeblebrox zap...@berentweb.com пишет: I did not have time to play around with trunk/grub for a while so was not able to follow-up on the discussion. Continuing from last month's topic: Flex version 2.5.4 is less than 2.3.35. 2.5 is 2.3 Yes, my

Re: grub2 boot root-on-zfs errors

2013-10-31 Thread Beeblebrox
cc1: warnings being treated as errors grub_script.yy.c: In function 'yy_scan_bytes': grub_script.yy.c:2298: warning: comparison between signed and unsigned It is a flex bug which is hidden on platforms where sizeof(size_t) sizeof(int). Nothing I can do about flex, so then I just wait for

Re: grub2 boot root-on-zfs errors

2013-10-31 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 31.10.2013 11:37, Beeblebrox wrote: cc1: warnings being treated as errors grub_script.yy.c: In function 'yy_scan_bytes': grub_script.yy.c:2298: warning: comparison between signed and unsigned gmake[2]: *** [libgrubmods_a-grub_script.yy.o] Error 1 Buggy flex needs --disable-werror.

grub2 boot root-on-zfs errors

2013-09-28 Thread Beeblebrox
I had tried to build from source several months back, and had a discussion on the FreeBSD mail list about the issue. The problem was that the config is set as no_libzfs_support. What is the way to correct this (need zfs library)?) GRUB2 will be compiled with following components: Platform: i386-pc

Re: grub2 boot root-on-zfs errors

2013-09-28 Thread Andrey Borzenkov
В Sat, 28 Sep 2013 11:48:54 +0300 Beeblebrox zap...@berentweb.com пишет: I had tried to build from source several months back, and had a discussion on the FreeBSD mail list about the issue. The problem was that the config is set as no_libzfs_support. What is the way to correct this (need zfs

grub2 boot root-on-zfs errors

2013-09-28 Thread Beeblebrox
I dare to guess - install zfs library. My system is FreeBSD - separate zfs library is a linuxism, since in FreeBSD zfs is part of base source (/usr/src) and vannot be installed as a separate package unlike in linux. If you mean here that grub has separate zfslib source code, I have not found

Re: grub2 boot root-on-zfs errors

2013-09-28 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 28.09.2013 13:56, Beeblebrox wrote: I dare to guess - install zfs library. My system is FreeBSD - separate zfs library is a linuxism, since in FreeBSD zfs is part of base source (/usr/src) and vannot be installed as a separate package unlike in linux. Look at config.log. We check that

grub2 boot root-on-zfs errors

2013-09-25 Thread Beeblebrox
@Andrey: Should not it be (hd0,gpt2)/bsds@/boot/kernel/kernel Tried that also, same error @Vladimir: Please reread what Andrey said. poolname is not part of the path. Somehow, I missed Andrey's answer... I don't understand however, how poolname is not part of path. If we have tank0 as pool and

Re: grub2 boot root-on-zfs errors

2013-09-25 Thread Andrey Borzenkov
В Wed, 25 Sep 2013 09:58:47 +0300 Beeblebrox zap...@berentweb.com пишет: @Andrey: Should not it be (hd0,gpt2)/bsds@/boot/kernel/kernel Tried that also, same error @Vladimir: Please reread what Andrey said. poolname is not part of the path. Somehow, I missed Andrey's answer... I don't

Re: grub2 boot root-on-zfs errors

2013-09-25 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 25.09.2013 10:06, Andrey Borzenkov wrote: Andrey has written, entry should be: (hd0,gpt2)/root@/boot/kernel/kernel ? I'm not sure now. Could you try (hd0,gpt2)tank0/root@/boot/kernel/kernel It's (hd0,gpt2)/root@/boot/kernel/kernel signature.asc Description: OpenPGP digital signature

Re: grub2 boot root-on-zfs errors

2013-09-24 Thread Andrey Borzenkov
В Tue, 24 Sep 2013 07:56:36 +0400 Andrey Borzenkov arvidj...@gmail.com пишет: В Mon, 23 Sep 2013 21:28:41 +0200 Vladimir 'φ-coder/phcoder' Serbinenko phco...@gmail.com пишет: On 23.09.2013 20:59, Beeblebrox wrote: This doesn't demonstrate anything else than that you didn't use tools

Re: grub2 boot root-on-zfs errors

2013-09-24 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 24.09.2013 13:01, Andrey Borzenkov wrote: Like this? From: Andrey Borzenkov arvidj...@gmail.com To: grub-devel@gnu.org Subject: [PATCH] document ZFS filename syntax. Go ahead signature.asc Description: OpenPGP digital signature ___ Grub-devel

grub2 boot root-on-zfs errors

2013-09-24 Thread Beeblebrox
Massimo: should be written as (hd0,gpt2)/mydataset/@/myfolder/myfile. Yes, of course - I made the mistake because I was in a hurry writing the mail. My current corrected menu choices are: menuentry Test1-BSD-ZFS Direct-Boot { insmod zfs search -s -l bsds set root='hd0,gpt2'

Re: grub2 boot root-on-zfs errors

2013-09-24 Thread Andrey Borzenkov
В Tue, 24 Sep 2013 18:49:33 +0300 Beeblebrox zap...@berentweb.com пишет: Massimo: should be written as (hd0,gpt2)/mydataset/@/myfolder/myfile. Yes, of course - I made the mistake because I was in a hurry writing the mail. My current corrected menu choices are: menuentry Test1-BSD-ZFS

Re: grub2 boot root-on-zfs errors

2013-09-24 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 24.09.2013 17:49, Beeblebrox wrote: Neither of the above entries work. Neither of them is correct. Please reread what Andrey said. poolname is not part of the path. Also grub 2.00 is not enough for version 5000. You need current trunk signature.asc Description: OpenPGP digital signature

Re: grub2 boot root-on-zfs errors

2013-09-23 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 30.08.2013 09:23, Raif S. Berent wrote: My system is FreeBSD_9.2-stable_amd64_HDD-layout=GPT grub version=grub2-2.00_1, and grub is on its own partition (/boot/grub) zpool version: 5000, with root on the zpool FreeBSD's bootloader is able to boot this pool, while various grub2 attempts

grub2 boot root-on-zfs errors

2013-09-23 Thread Beeblebrox
This doesn't demonstrate anything else than that you didn't use tools correctly. It's: grub-probe -d /dev/ada0p2 Thank you very much - I ran the command you instructed and see that the FS is identified correctly. $ grub-probe -d /dev/ada0p2 zfs I cannot, however, boot from grub directly into

Re: grub2 boot root-on-zfs errors

2013-09-23 Thread Massimo Maggi
2013/9/23 Beeblebrox zap...@berentweb.com menuentry 'FreeBSD-ZFS' { insmod zfs set root='hd0,gpt2' kfreebsd /boot/loader } Fails because grub cannot find bootloader and gives no such file error. You didn't specify the dataset (or snapshot) which has the /boot/loader file

Re: grub2 boot root-on-zfs errors

2013-09-23 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 23.09.2013 20:59, Beeblebrox wrote: This doesn't demonstrate anything else than that you didn't use tools correctly. It's: grub-probe -d /dev/ada0p2 Thank you very much - I ran the command you instructed and see that the FS is identified correctly. $ grub-probe -d /dev/ada0p2 zfs I

Re: grub2 boot root-on-zfs errors

2013-09-23 Thread Andrey Borzenkov
В Mon, 23 Sep 2013 21:28:41 +0200 Vladimir 'φ-coder/phcoder' Serbinenko phco...@gmail.com пишет: On 23.09.2013 20:59, Beeblebrox wrote: This doesn't demonstrate anything else than that you didn't use tools correctly. It's: grub-probe -d /dev/ada0p2 Thank you very much - I ran the

Re: grub2 boot root-on-zfs errors

2013-09-05 Thread Beeblebrox
Where would be the correct place (forum, list, etc) to get help on this issue? (getting grub2 to recognize and boot from FreeBSD ZFS zpools) Regards. On Fri, Aug 30, 2013 at 10:23 AM, Raif S. Berent r...@berentweb.com wrote: My system is FreeBSD_9.2-stable_amd64_HDD-layout=GPT grub

grub2 boot root-on-zfs errors

2013-08-30 Thread Raif S. Berent
My system is FreeBSD_9.2-stable_amd64_HDD-layout=GPT grub version=grub2-2.00_1, and grub is on its own partition (/boot/grub) zpool version: 5000, with root on the zpool FreeBSD's bootloader is able to boot this pool, while various grub2 attempts have failed. I think the reason is that grub2 has