grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* Re: grub2 boot root-on-zfs errors
@ 2013-11-04  6:13 Beeblebrox
  2013-11-05  7:35 ` Beeblebrox
  0 siblings, 1 reply; 60+ messages in thread
From: Beeblebrox @ 2013-11-04  6:13 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: The development of GNU GRUB

>> /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 headers we use option -Dfloat=__grub_poison and
>-Ddouble=__grub_poison to check that we don't use any float/double.
>Unfortunately such stupidity is more widespread that it should be. I'll
>remove poisonin of float/double in trunk.

Hi thanks for the answer. I know nothing at all about "headers", so
may I ask what theprobable cause for this problem on my system might
be? I mean is it Hardware or Software related? From what I read, it
has to do with compiler (gcc46 or clang) behavior. I would like to
correct this if such a thing is possible.

Thanks again.


^ permalink raw reply	[flat|nested] 60+ messages in thread
* Re: grub2 boot root-on-zfs errors
@ 2013-11-24  9:14 Beeblebrox
  2013-11-24 15:08 ` Andrey Borzenkov
  0 siblings, 1 reply; 60+ messages in thread
From: Beeblebrox @ 2013-11-24  9:14 UTC (permalink / raw)
  To: The development of GNU GRUB

* 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: elf_x86_64_fbsd elf_i386_fbsd
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: [efiemu64.o] Error 1 (ignored)
gmake[3]: Leaving directory `/asp/git/grub/grub-core'

* I proceeded with "gmake install" and previous error now causes a problem:
 /usr/bin/install -c -m 644 all_video.mod gdb.mod testspeed.mod tr.mod
progress.mod gcry_arcfour.mod gcry_blowfish.mod gcry_camellia.mod
gcry_cast5.mod gcry_crc.mod gcry_des.mod gcry_dsa.mod gcry_idea.mod
gcry_md4.mod gcry_md5.mod gcry_rfc2268.mod gcry_rijndael.mod
gcry_rmd160.mod gcry_rsa.mod gcry_seed.mod gcry_serpent.mod
gcry_sha1.mod gcry_sha256.mod gcry_sha512.mod gcry_tiger.mod
gcry_twofish.mod gcry_whirlpool.mod modinfo.sh efiemu32.o ./efiemu64.o
'/usr/local/lib/grub/i386-pc'
install: ./efiemu64.o: No such file or directory
gmake[4]: *** [install-platformDATA] Error 71
gmake[4]: Leaving directory `/asp/git/grub/grub-core'
gmake[3]: *** [install-am] Error 2
gmake[3]: Leaving directory `/asp/git/grub/grub-core'
gmake[2]: *** [install] Error 2


^ permalink raw reply	[flat|nested] 60+ messages in thread
* Re: grub2 boot root-on-zfs errors
@ 2013-11-22  7:09 Beeblebrox
  2013-11-22  7:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-22  7:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 2 replies; 60+ messages in thread
From: Beeblebrox @ 2013-11-22  7:09 UTC (permalink / raw)
  To: The development of GNU GRUB

@ 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 fails as below. I cannot seem to get the compiler to
use gcc46 which is on my system - it insists on using clang.

cc -DHAVE_CONFIG_H -I.  -Wall -W -I./include -DGRUB_UTIL=1
-DGRUB_FILE=\"grub-core/osdep/platform_unix.c\" -I. -I. -I. -I.
-I./include -I./include -I./grub-core/lib/libgcrypt-grub/include
-I./grub-core/lib/libgcrypt-grub/src/ -I./grub-core/gnulib
-I./grub-core/gnulib  -I/usr/local/include -Wall -W -Wshadow
-Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes
-Wchar-subscripts -Wcomment -Wdeprecated-declarations
-Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal
-Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit
-Wimplicit-function-declaration -Wimplicit-int -Winit-self
-Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces
-Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar
-Wnonnull -Woverflow -Wparentheses -Wpointer-arith
-Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow
-Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef
-Wunknown-pragmas -Wunused -Wunused-function -Wunused-label
-Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros
-Wvolatile-register-var -Wwrite-strings -Wnested-externs
-Wstrict-prototypes -Wpointer-sign -Wcast-align -Wno-undef
-Wno-sign-compare -Wno-unused -Wno-unused-parameter
-Wno-redundant-decls -Wno-unreachable-code -Wno-conversion
-Wno-old-style-definition   -MT
grub-core/osdep/grub_mkrescue-platform_unix.o -MD -MP -MF
grub-core/osdep/.deps-util/grub_mkrescue-platform_unix.Tpo -c -o
grub-core/osdep/grub_mkrescue-platform_unix.o `test -f
'grub-core/osdep/platform_unix.c' || echo
'./'`grub-core/osdep/platform_unix.c
In file included from grub-core/osdep/platform_unix.c:2:
grub-core/osdep/unix/platform.c:34:28: error: use of undeclared
identifier 'PATH_MAX'
  char *ret = xmalloc (2 * PATH_MAX);
                           ^
grub-core/osdep/unix/platform.c:35:25: error: use of undeclared
identifier 'PATH_MAX'
  char *end = ret + 2 * PATH_MAX - 1;
                        ^
2 errors generated.
gmake[2]: *** [grub-core/osdep/grub_mkrescue-platform_unix.o] Error 1
gmake[2]: Leaving directory `/asp/git/grub'


^ permalink raw reply	[flat|nested] 60+ messages in thread
* Re: grub2 boot root-on-zfs errors
@ 2013-11-10 17:50 Beeblebrox
  2013-11-10 19:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
       [not found] ` <CAPSTskuZ2nHt6iKHfgFfWeBxpRyuqPmyXHd3AYCr1muaua+H7w@mail.gmail.com>
  0 siblings, 2 replies; 60+ messages in thread
From: Beeblebrox @ 2013-11-10 17:50 UTC (permalink / raw)
  To: The development of GNU GRUB

@ 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 no install errors. I forgot to set
USE_GCC=4.6 in the gmake line, and grub was compiled with clang, as
far as I could tell - thought you might find that interesting.

I am at commit 9612ebc00ef5f186e9084b60ceeb1606d34f1d23
Date:   Sat Nov 9 21:29:11 2013 +0100

Will advise results of testing.

Thanks and Regards.


^ permalink raw reply	[flat|nested] 60+ messages in thread
* grub2 boot root-on-zfs errors
@ 2013-10-31 10:37 Beeblebrox
  2013-10-31 11:40 ` Beeblebrox
                   ` (3 more replies)
  0 siblings, 4 replies; 60+ messages in thread
From: Beeblebrox @ 2013-10-31 10:37 UTC (permalink / raw)
  To: The development of GNU GRUB

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 answered by the port maintainer for me:
"FreeBSD includes an older version of Flex in the base system. You
will need that the compilation should use the version installed in
/usr/local/bin instead. Either by putting this directory in your $PATH
earlier than /usr/bin or by specifying the location on the command
line."
Was solved by editing $PATH to look in /usr/local/bin first.

The new problem is that after autogen and configure complete without
errors, gmake fails (gcc version is 4.6):
gcc -DHAVE_CONFIG_H -I.   -Wall -W -I./include -DGRUB_UTIL=1
-DGRUB_LIBDIR=\"/usr/local/lib/grub\"
-DLOCALEDIR=\"/usr/local/share/locale\"
-DGRUB_FILE=\"grub_script.yy.c\" -I. -I. -I. -I. -I./include
-I./include -I./grub-core/lib/libgcrypt-grub/include
-I./grub-core/lib/libgcrypt-grub/src/  -I./grub-core/lib/minilzo
-I./grub-core/lib/xzembed -DMINILZO_HAVE_CONFIG_H
-I/usr/local/include  -Wall -W -Wshadow -Wold-style-definition
-Wpointer-arith -Wundef -Wextra -Wattributes -Wcast-align
-Wchar-subscripts -Wcomment -Wdeprecated-declarations
-Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal
-Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit
-Wimplicit-function-declaration -Wimplicit-int -Winit-self
-Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces
-Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar
-Wnonnull -Woverflow -Wparentheses -Wpointer-arith
-Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow
-Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef
-Wunknown-pragmas -Wunused -Wunused-function -Wunused-label
-Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros
-Wvolatile-register-var -Wwrite-strings -Wnested-externs
-Wstrict-prototypes -Wpointer-sign -Werror  -fno-builtin -Wno-undef
             -MT libgrubmods_a-grub_script.yy.o -MD -MP -MF
.deps-util/libgrubmods_a-grub_script.yy.Tpo -c -o
libgrubmods_a-grub_script.yy.o `test -f 'grub_script.yy.c' || echo
'./'`grub_script.yy.c
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
gmake[2]: Leaving directory `/asp/git/grub'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/asp/git/grub'
gmake: *** [all] Error 2

Any ideas how to move forward? I assume I'm on the right branch:
bzr info -v .
Standalone tree (format: 2a)
Related branches:   parent branch:
http://bzr.savannah.gnu.org/r/grub/trunk/grub/
Branch history:       5210 revisions       1946 days old
   first revision: Wed 2008-07-02 19:22:35 +0000
  latest revision: Sat 2013-09-28 03:06:04 +0200
Repository:        7726 revisions


^ permalink raw reply	[flat|nested] 60+ messages in thread
* grub2 boot root-on-zfs errors
@ 2013-09-28 11:56 Beeblebrox
  2013-09-28 14:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 60+ messages in thread
From: Beeblebrox @ 2013-09-28 11:56 UTC (permalink / raw)
  To: The development of GNU GRUB

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

>> it is used only to build user level utilites
What are those utilities, like zfsinfo in grub command-line?


^ permalink raw reply	[flat|nested] 60+ messages in thread
* grub2 boot root-on-zfs errors
@ 2013-09-28  8:48 Beeblebrox
  2013-09-28 11:06 ` Andrey Borzenkov
  0 siblings, 1 reply; 60+ messages in thread
From: Beeblebrox @ 2013-09-28  8:48 UTC (permalink / raw)
  To: The development of GNU GRUB

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
With devmapper support: No (need libdevmapper header)
With memory debugging: No
With disk cache statistics: No
With boot time statistics: No
efiemu runtime: No (cannot compile with -m64 -mcmodel=large
-mno-red-zone -nostdlib)
grub-mkfont: Yes
grub-mount: No (need FUSE library)
starfield theme: No (No DejaVu found)
With libzfs support: No (need zfs library)
Build-time grub-mkfont: No (no fonts)
Without unifont (no build-time grub-mkfont)
With liblzma from -llzma (support for XZ-compressed mips images)
------------------------------------------------

Other notes as information for any future reader:
*  I had to instal devel/bzr (the main bazaar port) since *BSD does
not have any git->bzr translator. The only tool at the date of this
message is bzr->git, which requires the base bzr port to be installed
anyway.
* devel/autogen needs to be installed
* I had to disable line 6014 in config, because it gives incorrect error:
# as_fn_error $? "flex is too old. GRUB requires 2.5.35 or above" "$LINENO" 5
flex --version  =>  flex version 2.5.4,  PORTVERSION=    2.5.37
FreeBSD-9.2-stable_amd64


^ permalink raw reply	[flat|nested] 60+ messages in thread
* grub2 boot root-on-zfs errors
@ 2013-09-25  6:58 Beeblebrox
  2013-09-25  8:06 ` Andrey Borzenkov
  0 siblings, 1 reply; 60+ messages in thread
From: Beeblebrox @ 2013-09-25  6:58 UTC (permalink / raw)
  To: The development of GNU GRUB

@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 root as dataset, (tank0/root) then from what
Andrey has written, entry should be:
(hd0,gpt2)/root@/boot/kernel/kernel ?
or is it (hd0,gpt2)/@root/boot/kernel/kernel ?
whereas if there is no separate root dataset and root resides directly
on tank0 dataset, entry becomes:
(hd0,gpt2)/@/boot/kernel/kernel ?

>> grub 2.00 is not enough for version 5000. You need current trunk
In order to correctly install a binary in FreeBSD, I must first create
a custom port and a Makefile for it. To do so, I need the source code
to be in tar.bz format. Is there a tar format available, or should I
checkout http://bzr.savannah.gnu.org/r/grub/trunk/grub and tar the
result?

Thanks again for your patience.


^ permalink raw reply	[flat|nested] 60+ messages in thread
* grub2 boot root-on-zfs errors
@ 2013-09-23 18:59 Beeblebrox
  2013-09-23 19:24 ` Massimo Maggi
                   ` (2 more replies)
  0 siblings, 3 replies; 60+ messages in thread
From: Beeblebrox @ 2013-09-23 18:59 UTC (permalink / raw)
  To: The development of GNU GRUB

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

Unfortunately, there is not much accurate documentation for
FreeBSD+ZFS+grub, and the linux solutions to the problem do not work
for FreeBSD.

The main problem form the grub loader / command line, is that I cannot
get any code loaded which is located on a ZPOOL:

menuentry 'FreeBSD-ZFS' {
    insmod zfs
    set root='hd0,gpt2'
    kfreebsd /boot/loader      }

Fails because grub cannot find bootloader and gives "no such file" error.
Please let me know what ıther info I can provide to debug the problem.


^ permalink raw reply	[flat|nested] 60+ messages in thread
* grub2 boot root-on-zfs errors
@ 2013-08-30  7:23 Raif S. Berent
  2013-09-05  7:31 ` Beeblebrox
  2013-09-23  9:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 2 replies; 60+ messages in thread
From: Raif S. Berent @ 2013-08-30  7:23 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

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 problems with
recognizing FreeBSD's zpools. As an example of why I think this:

# grub-probe /dev/ada0p2 (partition where zpool resides)
grub-probe: error: cannot find a device for /dev/ada0p2 (is /dev mounted?).

# ls /dev/ada0*
/dev/ada0   /dev/ada0p1  /dev/ada0p2  /dev/ada0p3

Regards.

[-- Attachment #2: Type: text/html, Size: 715 bytes --]

^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2013-11-25 22:12 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-04  6:13 grub2 boot root-on-zfs errors Beeblebrox
2013-11-05  7:35 ` Beeblebrox
2013-11-05  8:49   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-05  9:43   ` Beeblebrox
2013-11-09 15:31     ` Beeblebrox
2013-11-09 15:37       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 10:28       ` Beeblebrox
2013-11-10 10:41         ` Andrey Borzenkov
2013-11-10 14:47           ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 12:08         ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-08 14:12   ` Vladimir 'φ-coder/phcoder' Serbinenko
  -- strict thread matches above, loose matches on Subject: below --
2013-11-24  9:14 Beeblebrox
2013-11-24 15:08 ` Andrey Borzenkov
2013-11-25 11:08   ` Beeblebrox
2013-11-25 11:14     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-25 17:29     ` Andrey Borzenkov
2013-11-25 22:12     ` Vladimir 'phcoder' Serbinenko
2013-11-22  7:09 Beeblebrox
2013-11-22  7:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-22  7:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-22 13:16   ` Colin Watson
2013-11-22 13:30     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-25 16:54       ` Colin Watson
2013-11-10 17:50 Beeblebrox
2013-11-10 19:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found] ` <CAPSTskuZ2nHt6iKHfgFfWeBxpRyuqPmyXHd3AYCr1muaua+H7w@mail.gmail.com>
2013-11-22 15:22   ` Beeblebrox
2013-11-22 17:01     ` Beeblebrox
2013-11-23  1:09       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-23 12:54       ` Beeblebrox
2013-11-23 13:10         ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-23 13:50         ` Beeblebrox
2013-11-23 17:58           ` Beeblebrox
2013-10-31 10:37 Beeblebrox
2013-10-31 11:40 ` Beeblebrox
2013-10-31 16:24 ` Andrey Borzenkov
2013-10-31 16:36   ` Beeblebrox
2013-10-31 17:32 ` Andrey Borzenkov
2013-10-31 18:04   ` Beeblebrox
2013-11-02  7:58     ` Beeblebrox
2013-11-02 14:55       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-31 19:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-28 11:56 Beeblebrox
2013-09-28 14:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-28  8:48 Beeblebrox
2013-09-28 11:06 ` Andrey Borzenkov
2013-09-25  6:58 Beeblebrox
2013-09-25  8:06 ` Andrey Borzenkov
2013-09-25 10:33   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-23 18:59 Beeblebrox
2013-09-23 19:24 ` Massimo Maggi
2013-09-23 19:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-24  3:56   ` Andrey Borzenkov
2013-09-24 11:01     ` Andrey Borzenkov
2013-09-24 11:12       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-24 15:49 ` Beeblebrox
2013-09-24 16:01   ` Andrey Borzenkov
2013-09-24 16:11   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-08-30  7:23 Raif S. Berent
2013-09-05  7:31 ` Beeblebrox
2013-09-23  9:09 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).