configure options when building from source

2017-05-14 Thread Beeblebrox
Hello, building Grub from source on FreeBSD with
./autogen.sh --disable-efiemu --disable-nls
./configure  --disable-efiemu --disable-nls

The resulting config is below
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
grub-mkfont: Yes
grub-mount: No (need FUSE library)
starfield theme: No (No DejaVu found)
With libzfs support: Yes
Build-time grub-mkfont: No (no fonts)
Without unifont (no build-time grub-mkfont)
With liblzma from -llzma (support for XZ-compressed mips images)

I was unable to find documentation regarding config, so How can I:

* Enable grub-mount, grub-mkfont, unifont ?
All requirements (fuse, dejavu, fonts) are on the system. Is there a flag I 
must use? Most probably the path searched by Grub is different than on Linux. 
Where should I correct those?

* For starfield do I need to download a sepaarate repo?

* I install Grub as "gmake install DESTDIR=/usr/local/opt"
But trying for example "# grub-kbdcomp" I get:
-> cannot open /usr/local/share/grub/grub-mkconfig_lib: No such file or 
directory

* I need to generate mknetdir for pxe with UEFI option as well. Above config 
does not seem to have UEFI capability enabled - am I wrong?

Thanks & Regards
-- 
FreeBSD_amd64_12-Current_RadeonKMS
Please CC my email when responding, mail from list is not delivered.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Live-ISO's over PXE+HTTP using loopback

2015-02-16 Thread Beeblebrox
I got the Gparted ISO to boot, although in a bit roun-about way:

menuentry 'Gparted i386' {
  set root=http,192.168.2.100
  set isofile=gparted-live-0.19.0-beta1-3-i486.iso
  loopback loop0 ($root)$isofile
  linux (loop0)/live/vmlinuz boot=live config noswap noprompt verbose noeject 
fetch=http://192.168.2.100/gparted-live-0.19.0-beta1-3-i486.iso
  initrd (loop0)/live/initrd.img  }

I did not use these, since the ISO boots witout them: toram=filesystem.squashfs 
fromiso=gparted-live-0.19.0-beta1-3-i486.iso

Just to confirm I've got this in my head correctly: It's not possible to 
partially load a live-CD.iso with the PXE method, unless using NFS or other 
block device. In absence of NFS/cifs or such, the entire iso must be loaded 
into RAM. Am I correct with this statement?

Yet, A similar ISO (Debian based) with below config fails due to no netboot or 
nfsmount, and does not try to fetch the ISO from the http server like it does 
in the above case. This ISO also has its own grub menu. Would it be possible to 
fetch the ISO then chainload to the grub inside the ISO? I'm probably 
overlooking something when asking this question...

menuentry Inquisitor 3.1B-amd64 {
  set root=http,192.168.2.100
  set isofile=inq-live-3.1beta2-amd64-debian.iso
  loopback loop0 ($root)$path$isofile
  linux (loop0)/live/vmlinuz-2.6.26-2-amd64 boot=live config noswap noprompt 
verbose noeject noautologin union=aufs 
fetch=http://192.168.2.100/pub/tftp/rescue/inq-live-3.1beta2-amd64-debian.iso 
toram=filesystem.squashfs
  initrd (loop0)/live/initrd.img-2.6.26-2-amd64  }

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Live-ISO's over PXE+HTTP using loopback

2015-02-15 Thread Beeblebrox
Hi.
I'm trying to boot several live ISO's using my PXE-boot server and Grub 
loopback. ISO's are fetched by Grub from an HTTP server on the same host.
* I can boot the kernels of all live ISO's through PXE+HTTP transfer.
* Boot process fails at mount-root stage, where rootfs will obviously be 
mounted from the ISO.  Error message is usually similar could not find the 
ISO or unable to find medium containing a live file system.
* A sample menu entry I'm using (thanks to previous answers from this list):
  menuentry Debian-testing-i386-lxde.iso --class gnu-linux --class gnu 
--class os {
  set root=http,192.168.2.100
  set isofile=debian-testing-i386-lxde.iso
  loopback loop0 ($root)/iso/$isofile
  linux (loop0)/install.386/vmlinuz
  initrd (loop0)/install.386/initrd.gz

As the first step of solving this problem: Is ISO modification the only choice, 
or is it possible to boot a normal ISO by passing the correct parameters to 
grub.cfg? I think the problem could be that ramdisk fails to be created when 
PXE is involved.

Regards
-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Live-ISO's over PXE+HTTP using loopback

2015-02-15 Thread Beeblebrox
Hi Andrei, thanks for the answer.

 You need to tell your kernel/initrd where to find ISO and it should be
 able to fetch data from it via HTTP.

I was advised on debian-live, if ISO contains httpfs, you can boot by pointing 
the live initramfs to the iso location on your web server; essentially the 
same thing you stated.

That's done by params in the linux line then? Something like this?
  loopback loop0 ($root)$path$isofile
  linux (loop0)/casper/vmlinuz.efi boot=casper fromiso=$isofile httpfs=$loop0
  initrd (loop0)/casper/initrd.lz  }

This is not working though, so:
* Should fromiso= be full path ($root)$path$isofile?
* For httpfs=, can loop0 be used or should I revert to ($root)$path$isofile?
* Any other suggestions in above syntax appreciated.

Thanks and Regards.

-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Grub kfreebsd with pxe nfs

2014-10-26 Thread Beeblebrox
I have two separate issues involving the {kfreebsd} code in grub.cfg:

* First is, code snippet to get mount_root to use NFS V3 instead of V2. The 
code for this in FreeBSD's /boot/loader.conf is: {boot-nfsroot-options=“nfsv3”}

The comparable grub.cfg code should be as below, but does not work (mount_root 
hangs for some time, then falls back to V2)
{set kfreebsd.boot.nfsroot.options=nfsv3}

* Second issue is, how to over-ride the {option root-path 
192.168.2.1:/data/amd64} code defined by dhcp? This is needed for example 
when I want to boot a i386 version of FreeBSD rather than amd64. As above, this 
does not work correctly:
{set kfreebsd.vfs.root.mountfrom=nfs:192.168.2.1:/data/amd64/alt_root/path}

Also, which file in the grub code can I look through to get a list of options 
supported by the kfreebsd operator?

-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Grub kfreebsd with pxe nfs

2014-10-26 Thread Beeblebrox

  * First is, code snippet to get mount_root to use NFS V3 instead of
  V2. grub.cfg code should be as below, but does not work

 This should be kFreeBSD 
Still does not work with 
{set kFreeBSD.boot.nfsroot.options=nfsv3}
mount_root this time does not hang, but resulting mounted root is still V2

* grub.cfg does not accept kFreeBSD for all parameters, and needs mixed syntax. 
Example:
menuentry 'FreeBSD 11_amd64' {
   kfreebsd kernel/kernel
# NOT kFreeBSD kernel/kernel
   set FreeBSD.acpi_load=YES
   kfreebsd_loadenv device.hints
# NOT kFreeBSD_loadenv device.hints
   kfreebsd_module kernel/if_sis.ko
# NOT kFreeBSD_module kernel/if_sis.ko

* I disabled these 3 params:
   # set kFreeBSD.vfs.root.mountfrom=nfs:192.168.2.1:/data/amd64
   # set kFreeBSD.vfs.root.mountfrom.options=ro
   # set kFreeBSD.boot.nfsroot.options=nfsv3
And saw that FreeBSD boots normally through grub. This means that the {set 
kFreeBSD.*} settings are very likely being ignored as boot settings. The 
mount_root is successful because FreeBSD executes what is passed from dhcp.

Regards.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


grub-core compile error on FreeBSD

2014-10-14 Thread Beeblebrox
Git repo is at latest head. compile fails due to missing field 'components' 
initializer:

gmake[2]: Entering directory '/asp/git/grub/grub-core'
gmake  all-am
gmake[3]: Entering directory '/asp/git/grub/grub-core'
cc -DHAVE_CONFIG_H -I. -I..  -Wall -W -I../include -I../include  
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem 
/usr/lib/include -DGRUB_FILE=\loader/i386/pc/linux.c\ -I. -I. -I.. -I.. 
-I../include -I../include -I../grub-core/lib/libgcrypt-grub/src/ -Os -Wall 
-W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment 
-Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal 
-Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit 
-Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces 
-Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type 
-Wsequence-point -Wshadow -Wsign-compare
-Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function 
-Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable 
-Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls 
-Wmissing-prototypes -Wmissing-declarations
 -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast 
-Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla 
-Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros 
-Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs 
-Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 
-freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm 
-fno-asynchronous-unwind-tables -fno-stack-protector -Werror -ffreestanding 
  -MT loader/i386/pc/linux16_module-linux.o -MD -MP -MF 
loader/i386/pc/.deps-core/linux16_module-linux.Tpo -c -o 
loader/i386/pc/linux16_module-linux.o `test -f 'loader/i386/pc/linux.c' || echo 
'./'`loader/i386/pc/linux.c
loader/i386/pc/linux.c:391:54: error: missing field 'components' initializer
  [-Werror,-Wmissing-field-initializers]
  struct grub_linux_initrd_context initrd_ctx = { 0, };
 ^
1 error generated.
Makefile:33097: recipe for target 'loader/i386/pc/linux16_module-linux.o' failed
gmake[3]: *** [loader/i386/pc/linux16_module-linux.o] Error 1
gmake[3]: Leaving directory '/asp/git/grub/grub-core'
Makefile:22888: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/asp/git/grub/grub-core'
Makefile:11537: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory '/asp/git/grub'
Makefile:3933: recipe for target 'all' failed
gmake: *** [all] Error 2

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub-core compile error on FreeBSD

2014-10-14 Thread Beeblebrox
 And your compiler and version is ... ?

What I posted previously was from (clang version 3.4.1)

When I use gcc (gcc version 4.8.3) by invoking USE_GCC=any, the error is:

gcc -DHAVE_CONFIG_H -I. -I..  -Wall -W -I../include -I../include  
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -DGRUB_FILE=\net/http.c\ 
-I. -I. -I.. -I.. -I../include -I../include 
-I../grub-core/lib/libgcrypt-grub/src/ -Os -Wall -W -Wshadow 
-Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations 
-Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args 
-Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration 
-Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar 
-Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch 
-Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label 
-Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings 
-Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes 
-Wmissing-declarations  -Wextra -Wattributes -Wendif-labels -Winit-self 
-Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnu
 ll -Woverflow -Wvla -Wpointer-to-int-cast
-Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign 
-Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd 
-mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 
-freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm 
-fno-asynchronous-unwind-tables -Qn -fno-stack-protector -Wtrampolines -Werror  
   -ffreestanding   -MT
net/http_module-http.o -MD -MP -MF net/.deps-core/http_module-http.Tpo -c -o 
net/http_module-http.o `test -f 'net/http.c' || echo './'`net/http.c
In file included from ../include/grub/misc.h:24:0,
 from net/http.c:19:
../include/grub/types.h:22:20: fatal error: config.h: No such file or directory
 #include config.h
^
compilation terminated.
Makefile:30997: recipe for target 'net/http_module-http.o' failed
gmake[3]: *** [net/http_module-http.o] Error 1
gmake[3]: Leaving directory '/asp/git/grub/grub-core'
Makefile:22888: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/asp/git/grub/grub-core'
Makefile:11537: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory '/asp/git/grub'
Makefile:3933: recipe for target 'all' failed
gmake: *** [all] Error 2

-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub-core compile error on FreeBSD

2014-10-14 Thread Beeblebrox
Hi Andrey,
 Could you test current master, it should fix it.

Compiles  installs very nicely now.
Used clang compiler (did not invoke USE_GCC=any)

Thanks  regards.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Two grub problems on FreeBSD

2014-08-14 Thread Beeblebrox

1. gettext is consistently problematic on Freebsd:
# grub-mkconfig -o output.file =
grub-mkconfig: gettext_print: not found

2. grub no longer recognizes latest version of zfs file systems
# grub-probe -d dev/ada1p1 =
grub-probe: error: unknown filesystem.

-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Two grub problems on FreeBSD

2014-08-14 Thread Beeblebrox

 Fixed but how did you manage to not have grub-probe?
Sorry, what?
Did you mean gnu_gettext? (it's installed)
 
  2. grub no longer recognizes latest version of zfs file systems
  # grub-probe -d dev/ada1p1 =
  grub-probe: error: unknown filesystem.

 Do you mean - it recognized it before but does not recognize now? When
 was this before then?
Yes, that's what I mean. Before was about 3-4 months ago.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Two grub problems on FreeBSD

2014-08-14 Thread Beeblebrox

 So please try to bisect grub to find which commit broke it. The last
 commit related to zfs was Wed Dec 18 23:39:49 2013 so it must be
 something else (or something changed in your environment - compiler,
 linker ...)

That's not the issue - the commit that broke it was a zpool upgrade some 3-4 
moths ago. Since then, there has been a second zpool upgrade as well. This 
means the grub code is two versions behind the latest zfs version on FreeBSD's 
head.

It's not grub code that broke, it's zfs code that moved ahead... grub-probe 
could no longer detect the fs after my upgrade of the zpool.

-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Chainloadig from grub2 to isolinux

2014-08-07 Thread Beeblebrox

 yes,but a local repo takes care of that. (and that repo can be the contents 
 of the cd)
 extracting the kernel, initrd, cmdline and rootfs (I have done it with a 
 gparted iso))

All that work is just so not worth it. I'd rather do something else with my 
time.

 It is a monster, to extract each live.iso then copy the kernel and the 
 initrd, then find out the correct parameters and loopmout it.

My thoughts exactly, tuxracer. It's why I made the suggestion (post 7 of this 
thread) for a wiki page showing grub.cfg entries using loopback for each 
individual distro. It would be incumbent upon the distro maintainers to test 
and submit the proper loopback menu entry, since they are the ones maintaining 
the distro (did someone say concrete proposals?)

 There is no sane way to use isolinux cfg from iso simply because it's not 
 designed to handle iso scenario, only real CD one.

I'm happy to have that cleared up...

 If you use loopback.cfg as intended it will all work.
loopback.cfg contains the linux/initrd entries relevant to each distro's iso 
(or at least that's what the wiki page shows). That's exactly the problem - 
each iso has different settings for linux/initrd entries, and if you get them 
wrong, it really does not matter what file the entry was placed in.

Also as confirmed by ben, it's apparently not going to work on a number of 
Debian-based iso's. Usually the solution is to include casper in the CD to make 
this happen AFAIK.

May I suggest one more thing? I have mail delivery turned off for this list, 
and I must remember to check the mail-list web page in order to follow my 
threads. A solution would be to use nabble, where one can mark the threads to 
be followed. Posts to those threads will then be automatically delivered via 
email. There's about a half hour delay between a mail list and delivery to 
nabble, but it's better than a delay of several days.

Regards.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE-Grub has no menu - File not found

2014-07-02 Thread Beeblebrox
I solved the problems and I just wanted to update the thread on how it
was done.

1. With my folder dhcp/tftp structure, the way to issue the mknetdir is
by including the sub-directory flag. This works:
cd /jail_or_vm/root/folder  grub-mknetdir --net-directory=./boot
--subdir=grub

2.  For direct-booting FreeBSD from Grub (without BTX chainload), the
FreeBSD kernel must be build with BOOTP options. This is because BTX
apparently natively includes this code while Grub does not. Rebuild
kernel after enabling:

options BOOTP   # Needed for non-btx PXE
options BOOTP_NFSROOT   # Needed for non-btx PXE

Regards.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Chainloadig from grub2 to isolinux

2014-07-02 Thread Beeblebrox
Is there a method to chainload from grub2 - grub_older
and grub2 - isolinux?

Most live-cd's use an isolinux configuration with many menu items
embedded in the isolinux layer.

Instead of spending time trying to guess at these, a chainload boot
would be most helpful.

Thanks and Regards.

-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Chainloadig from grub2 to isolinux

2014-07-02 Thread Beeblebrox
 GRUB has isolinux config parser.

Is there any link to usage with examples? The Grub manual does not
mention it  all I could find was from osdetect.cfg:
syslinux_configfile -i /isolinux/isolinux.cfg

Which still isn't much to go on.
-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Chainloadig from grub2 to isolinux

2014-07-02 Thread Beeblebrox
I got it partially working. The background image changes to Debian, but
it displays press any key to continue.. then drops back to the main
Grub menu. So what am I doing wrong here?

menuentry Debian-Jesse-i386-lxde --class gnu-linux --class gnu
--class os { 
  set thtp=http,192.168.2.100
  set isofile=($thtp)/pub/tftp/debian/debian-testing-i386-lxde-CD-1.iso
  search --set=root --file $isofile
  loopback loop $isofile
  set root=(loop)
  syslinux_configfile -i (loop)/isolinux/isolinux.cfg -r (loop)
  #linux (loop)/install.386/vmlinuz
  #initrd (loop)/install.386/initrd.gz  }

Thanks a lot  Regards.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE-Grub has no menu - File not found

2014-06-27 Thread Beeblebrox

 How did you create your netboot directory and grub image? Your grub
 requests /boot/grub/i386-pc/normal.mod, *NOT* grub/i386-pc/normal.mod.
 It has wrong prefix.

my tftp  dhcp are running in a jail (consider it like a VM) and the
jail(VM)'s root (data/amd64) is NFS exported so that it can be mounted
as  / ro .

My settings for tftp  dhcp:
tftp: -s /boot
dhcp for Grub: filename grub/i386-pc/core.0;
dhcp for btx: filename pxeboot;

As far as boot sequence goes, the tftp + dhcp combined path as
/boot/grub/i386-pc/core.0 should be correct? Netboot dir made as:
cd /data/amd64  grub-mknetdir --net-directory=./

Regards.

-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE-Grub has no menu - File not found

2014-06-24 Thread Beeblebrox
Is it possible my findings below show that PXE booting on grub2 (trunk)
when compiled and running on FreeBSD is broken?

* When isc-dhcpd.conf has grub/i386-pc/core.0 as filename, wireshark
  shows abort due to file not found: grub/i386-pc/normal.mod.
* From linux laptop, tfpt 192.168.2.1 then
tftp get grub/i386-pc/normal.mod = 
file downloads without problem. Also, any other file in the (-s) path of tftp 
server gets downloaded.
* When isc-dhcpd.conf has pxeboot as filename (the BTX equivalent of
  core.0), BTX menu gets displayed, allowing next step for boot.

-- 
FreeBSD_amd64_11-Current_RadeonKMS

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE-Grub has no menu - File not found

2014-06-23 Thread Beeblebrox
I just now updated to latest in trunk, then deleted the gub/i386-pc
folder and reinstalled with grub-mknetdir --net-directory=/path/to

At first the PXE-boot process breaks with
Error message: File not found, because the i386-pc folder has perm
700 root:wheel. Only after chmod 755 does that error go away. But, the
grub boot process is now showing a new message when it fails:
error: Access violation \ Entering rescue mode... \ grub rescue

I ran wireshark during grub-pxe to see where the process was failing.
Does the below finding mean anything?
90 7.084908000 192.168.2.1 (tftp root) 192.168.2.34 (pxe client) TFTP 
63 Error Code, Code: Access violation, Message: Access violation 
Source File: //boot/grub/i386-pc/normal.mod
Opcode: Error Code (5)
Error code: Access violation (2)

ls -la i386-pc/normal.mod  -r--r--r-- 1 root  wheel
I wanted to make sure that file permission was not the reason so I
did chmod -R 777 i386-pc. This gave the same violation error.

Also, why does grub-mknetdir create a 700 folder? Is the folder user
supposed to be _dhcp or some other daemon?

Regards.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE boot over NFS please

2014-06-08 Thread Beeblebrox
Hi.
It looks like a PR was in fact filed: https://savannah.gnu.org/bugs/?41447
Is there anything I should add to it? Seems prety complete.

Before my other reported problem, I had gotten FreeBSD to boot with this
entry. If I can figure out how to load kernel module from grub, I won't
need to chainload to BTX.

menuentry 'FreeBSD amd64' --class freebsd --class bsd --class os {
   kfreebsd kernel/kernel
   kfreebsd_loadenv device.hints
   set kFreeBSD.boot.nfsroot.server=192.168.2.1
   set kFreeBSD.boot.nfsroot.path=/data/amd64
   set kFreeBSD.vfs.root.mountfrom=nfs:192.168.2.1:/data/amd64
  }

It hangs at NFS mount stage however, because the NIC driver is not in the
kernel and must be loaded separately in order for NFS mount to proceed.

What is the grub syntax for loading a FreeBSD kernel module?
FreeBSD's loader.conf syntax is:   if_msk_load=YES.
This unfortunately did not work:   set kFreeBSD.if_msk_load=YES

Regards.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE-Grub has no menu - File not found

2014-06-08 Thread Beeblebrox
Hi Andrey,

Hard to tell without knowing what previous version was. I'm afraid in
 this case your only possibility is to bisect (man git-bisect) to find
 commit that broke things.


I went all the way back to Jan 2014 to find a working build as starting
point (git branch name  git reset --hard rev). None of them worked.
The last working Grub binary was from mid-March (I can tell from the folder
creation dates on the system).

I had also been forced to switch from Grub to BTX on the main system about
a month ago, because Grub was not able to boot my ZFS system (I had to go
through a complex rescue).

It makes me wonder whether there is some error injected into the Grub
compile by FreeBSD-11? Does not make much sense, but I thought it might be
worth considering. Are there any compile flags worth trying?

MESSAGE FROM ./autogen.sh USE_GCC=any --disable-efiemu
/usr/local/share/aclocal/path_dps.m4:202: warning: underquoted definition
of AC_PATH
_GNUSTEP
/usr/local/share/aclocal/path_dps.m4:202:   run info Automake 'Extending
aclocal'
/usr/local/share/aclocal/path_dps.m4:202:   or see
http://www.gnu.org/software/autom
/automake.html#Extending-aclocal
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: configure.ac: AM_GNU_GETTEXT is used, but not
AM_GNU_GETTEXT_VERSIO
autoreconf-2.69: configure.ac: not using Libtool

RESULT OF ./configure USE_GCC=any --disable-efiemu
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 (explicitly disabled)
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)

Then gmake runs and completes without error.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE boot over NFS please

2014-06-07 Thread Beeblebrox

 Did you try pxechainloader instead? It should leave working PXE
 environment.


Ah, very interesting. I have that file in the grub folder, but how / where
is it invoked from? dhcp.conf has:
{next-server 192.168.2.1;
filename grub/i386-pc/core.0;}
You are NOT suggesting modification to this I presume?

Therefore I should place it in grub.cfg? The below example did not work
either unfortunately. It gets to the BTX loader but no PXE devices are
available (same as before)
menuentry 'FreeBSD amd64' --class freebsd --class bsd --class os {
insmod pxe
insmod pxechainloader
kfreebsd loader
kfreebsd_loadenv device.hints}

Thanks  Regards.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE boot over NFS please

2014-06-07 Thread Beeblebrox
I was just preparing this email when yours arrived.
The example below does not work either - client just reboots.
The module in my grub/i386-pc folder is named pxechain, so I have corrected
the insmod to that.

menuentry 'FreeBSD amd64' --class freebsd --class bsd --class os {
insmod pxechain
pxechainloader (pxeboot NOR loader)   }

Same result from grub command line:
grub pxechainloader pxeboot
grub boot
REBOOTS
My TFTP root is /boot, so pxeboot file and grub folder reside in the TFTP
root.
Regards.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


PXE-Grub has no menu - File not found

2014-06-07 Thread Beeblebrox
I just updated my git repo (git log shows Apr 20 16:12:41), then
re-compiled and reinstalled Grub. I then cd'ed to my TFTP root and ran
grub-mknetdir --net-directory=./ This completed without problem and
displayed message to direct TFTP to core.0 with correct path.

PXE Booting process now fails as:
Client gets IP address,
Welcome to GRUB message displayed, then

error: file not found.
Entering rescue mode...
grub rescue 

TFTP log shows:
 tftp: client does not accept options
RRQ from 192.168.2.34 filename grub/i386-pc/core.0
RRQ from 192.168.2.34 filename /boot/grub/i386-pc/normal.mod

$tftproot/boot/grub/i386-pc/grub.cfg has
source boot/grub/grub.cfg

What did this break?
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE boot over NFS please

2014-06-06 Thread Beeblebrox

 I must also boot FreeBSD on NFS via TFTP (not HTTP), but this won't work:
 menuentry 'FreeBSD chainload BTX' {
kfreebsd  boot/loader

or kfreebsd boot/pxeboot  }


This is because the BTX loader has not been booted in PXE mode and has no
record of available PXE devices. Booting into boot/pxeboot also does not
work.

I would prefer to be able to chainload into BTX for the BSD items, because
there are too many settings under boot/loader.conf of BSD that may cause
difficulties or incompatibility for direct-boot from grub.cfg.

Any idea how to do this?
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE boot over NFS please

2014-06-02 Thread Beeblebrox
Hello.
It seems I misunderstood the article I had referenced. I emailed the author
of that article for clarification and his response (partially) is below. My
apologies to the members of the list for this mistake I have made.

Actually, the kernel there is being loaded by TFTP, although HTTP can also
be used.
   label xubuntu
   #define XUDIR HTTPURL/images/xubuntu/casper
   menu label XUbuntu
   kernel XUDIR/vmlinuz
   append boot=casper netboot=nfs nfsroot=NFSROOT/images/xubuntu
   initrd XUDIR/initrd.lz

The kernel line uses HTTPURL, which is just the path to the kernel file
on the web server.  The appended options tell that kernel to use the NFS
filesystem, which provides access to the rest of the XUbuntu install CD
files.

This section serves as an example of network-mounting the filesystem,
rather than copying an image of a filesystem into memory on the target
computer and running it from there.  It starts faster because the image
does not have to be copied, and can run on computers with less RAM because
the whole filesystem does not occupy memory.

Grub already supports HTTP. Did you try it?


Not yet. I was planning on getting around to that, but I had wanted to
clarify the NFS option first. Can you advise what the syntax is for HTTP
booting the kernel with loopback? Like this for example?

menuentry 'Ubuntu 13.04.iso' {
  set root='http://192.168.2.1/tftp'
  set isofile=ubuntu-13.04.iso
  loopback loop http://192.168.2.1/tftp/$isofile
  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
noprompt noeject
  initrd (loop)/casper/initrd.lz}

Regards.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE boot over NFS please

2014-06-02 Thread Beeblebrox

 set root=http,192.168.2.1
 loopback loop0 ($root)/tftp/$isofile


Thank you - that was very useful and solves the iso-boot problem.

I must also boot FreeBSD on NFS via TFTP (not HTTP), but this won't work:
menuentry 'FreeBSD chainload BTX' {
   kfreebsd  boot/loader  }

It's probably because this is a PXE setup and not HDD. If one wishes to
chainload to FreeBSD's BTX, I think one would have to actually call
boot/pxeboot in order to allow BTX to become aware of the PXE structure.

That means we are left with direct-boot. What are the necessary additions /
modifications for below? 192.168.2.1:/data/amd64 is the NFS export which
will be mounted as root. TFTP path is /boot, so any  all files under
that folder are visible.

menuentry 'FreeBSD over TFTP  root on NFS' --class freebsd --class bsd
--class os {
   set kFreeBSD.vfs.root.mountfrom=nfs:192.168.2.1:/data/amd64
   set kFreeBSD.vfs.root.mountfrom.options=ro
   kfreebsd $path/kernel
   kfreebsd_loadenv $path/device.hints   }

Thanks  Regards.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


PXE boot over NFS please

2014-06-01 Thread Beeblebrox
In a previous discussion on this list, I was advised grub does not boot
over NFS, and that it must use TFTP only.

I had asked the questionn because of this article [
http://www.wonkity.com/~wblock/docs/html/pxe.html) where it states:

gpxelinux.0 from the SYSLINUX project will be used as a PXE boot loader

XUbuntu With NFS: This menu entry sets the netboot and nfsroot options.
label xubuntu \   menu label XUbuntu \   kernel
images/xubuntu/casper/vmlinuz \ append boot=casper netboot=nfs \
nfsroot=192.168.1.1:/usr/tftpboot/images/xubuntu \  initrd
images/xubuntu/casper/initrd.lz

I just wanted to advise that, although I have not tried it, SysLinux seems
able to boot over NFS. I hope one day Grub will be able to as well.

Thanks and Regards.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: PXE boot over NFS please

2014-06-01 Thread Beeblebrox
Hello Andrey,

The linked article, under the Advanced Options title (just past middle of
page) covers two interesting aspects of non-tftp transfer alternatives.
One is Faster Transfers With HTTP,
The other is NFS.

Neither method / description has anything to do with issue of mount_nfs
after the kernel has been loaded.

 Implementing NFS client in grub is a lot of work for very little gain,
 especially if you are speaking about PXE which mandates working tftp
 server. What exact functionality is missing right now?

The advantage of using http or nfs compared to tftp is transfer speed, as
summarized on the page:

TFTP is not particularly fast when transferring the 200M or larger
compressed filesystems used by some bootable utilities. Newer utilities can
often retrieve their filesystem images by HTTP, which is much faster. One
target system took three minutes to load the sysrcd.dat file by TFTP. With
HTTP, it took only 18 seconds.

The article describes NFS as an alternative to HTTP, with conceivably
similar file transfer speed.

Of course, the grub developers may have decided that grub is a boot loader
and not a PXE oriented project; which is of course fine. As stated, I just
wanted to get your view(s) on the described alternative boot method.

Regards.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Configure grub for pxe boot and nfs-mounted root

2013-11-26 Thread Beeblebrox
Since I got grub's pxe set to go, I have started to try the ideas  solutions.
* Answer to my first question from previous post (I don't see a way
where tftp-server would be able to serve-up the grub menu if it were
in say /data/tftp path?): This seems not possible. TFTPD cannot chroot
(-s) unless the folder structure is inside the jail. Setting to
different NFS path gives folder not found error from tftpd. (posted
for informational purposes)
* grub-mknetdir creates 700 permission folder structure. It needs to
be changed to 755 in order for tftpd to serve core.0 (744 is
insufficient).
* grub-mknetdir folder is /data/amd64//boot/grub. I created a grub.cfg
under there AND under i386-pc. The client shows welcome to grub
message, then falls to file not found. Was I supposed to pass the
grub.cfg location when I ran grub-mknetdir?
* Which insmod need for NFS exported folders? There's no nfs*.mod?
* Since I have 3 separate NFS exports which grub will choose from on
the menu, is it possible to create a device.map file with something
like:
(hd0,0) 192.168.2.1:/data/amd64
(hd0,1) 192.168.2.1:/data/i386
(hd0,2) 192.168.2.1:/data/isos
That way, I could do and change  set root='hd0,1 or 2 or 3' for each
menu entry? Or is the device.map deprecated?

Thanks for the input

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Configure grub for pxe boot and nfs-mounted root

2013-11-26 Thread Beeblebrox
 This doesn't seem to be a GRUB problem at all. I use tftpd which serves
from /var/tftpd
You are right, it is not a GRUB problem; it's a folder structure error
in the way I approached the problem.

 boot/grub ($prefix) is where grub.cfg goes. Judging from your first
 question, is it possible you serve from a different folder than you think 
 you do?
No, the dhcp-tftp chain is correct. Because /data/amd64 is a jail
(like a chroot) and the chroot is where dhcp and tftpd are running, I
thought maybe the correct sytax should be grub-mknetdir
--net-directory=/ --subdir=boot/grub, then copy the files to
boot/grub under the chroot folder. No difference, however and client
drops to grub rescue. /var/log/xferlog shows:
in.tftpd[41762]: RRQ from 192.168.2.34 filename i386-pc/core.0
in.tftpd[41762]: tftp: client does not accept options
in.tftpd[41763]: RRQ from 192.168.2.34 filename i386-pc/core.0
in.tftpd[41764]: RRQ from 192.168.2.34 filename /boot/grub/i386-pc/normal.mod
in.tftpd[41764]: sending NAK (1, File not found) to 192.168.2.34

grub rescue set
cmdpath=(tftp,192.168.2.1)i386-pc
prefix=(tftp,192.168.2.1)/boot/grub
root=tftp,192.168.2.1
net_pxe_boot_file=i386-pc/core.0

I changed the dhcp-tftpd configuration from prefix /boot/grub/i386-pc,
to test whether the problem lay in tftpd's inability to rad giles from
folders one level up (cd ..). Same result.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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 the correct
path, insmod code for zfs-booting.
* grub-mkconfig does not detect an ubuntu linux (btrfs) install on separate HDD.
* 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. This
is probably because I have newcons installed as patch in
FreeBSD-current (11).
* Modified grub.cfg to include menu item having kfreebsd
//@/boot/loader for chain-loading into BTX. Chain-load method
successfully boots into zfs-based root and mounts all FS. Difference
between direct-boot and chainload seems to be access to zpool.cache,
which is actually different and maybe even a little buggy at this date
in 11 (I had some problems with automatically bringing up non-root
zpools and had to make some modifications in order to get it working)

Advise if any other info is required.
Thanks and Regards.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Configure grub for pxe boot and nfs-mounted root

2013-11-25 Thread Beeblebrox
I tried as suggested,
# grub-mknetdir --net-directory=/data/tftp --subdir=boot
And no files were plced in /data/tftp/boot

I did not see the relevance, but I also tried,
# grub-mknetdir --net-directory=/data/tftp --subdir=boot /dev/ada0
grub-mknetdir: Too many arguments
Try 'grub-mknetdir --help' or 'grub-mknetdir --usage' for more information.

What am I doing wrong? Do I need to start NFS services and set
net-directory=192.168.2.1:/data/tftp?
I do not understand the meaning of install_device from man page:
SYNOPSIS
   grub-mknetdir [OPTION] install_device

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Configure grub for pxe boot and nfs-mounted root

2013-11-25 Thread Beeblebrox
#  grub-mknetdir -v  = no output
dmesg shows nothing

ls -la /usr/local/bin/grub-mknetdir
-rwxr-xr-x  1 root  wheel  444009 Nov 24 17:53 grub-mknetdir*

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH v2] Explicitly check for linking format to use for efiemu64 module

2013-11-25 Thread Beeblebrox
 Or just update to current trunk, I committed this patch.

Updated to trunk, it all works  gets compiled.
Still have to manually clean out the docs references in Makefile however.

Thanks for the swift work.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Configure grub for pxe boot and nfs-mounted root

2013-11-25 Thread Beeblebrox
 Found the problem. Either use -d or upgrade.
The -d flag did not work (gave error), so I I upgraded. Works now!

# grub-mknetdir  --net-directory=/data/tftp --subdir=boot
Netboot directory for i386-pc created. Configure your DHCP server to
point to /data/tftp/boot/i386-pc/core.0

The DHCP message (where to point) is also very helpful and important.
A big hank-you to all of you.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH v2] Explicitly check for linking format to use for efiemu64 module

2013-11-25 Thread Beeblebrox
 Did earlier versions grub.texi compiled?
Yes, earlier versions of grub.texi did compile.

 Setup build tree outside of git checkout and just copy
 grub.texi over; it is self contained.
It's OK, I don't need it really. Unless you need me to test and get
back to you with results.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH v2] Explicitly check for linking format to use for efiemu64 module

2013-11-25 Thread Beeblebrox
OK, I'll try it. But I need clarification:

* Should I copy the repo and do a git rollback on the copy?
* Easier to copy only grub/docs to another folder, but how do I start
the build then? The Makefile in grub/docs will fail just as when run
from top-level.

 just copy grub.texi over
From my current repo, or an older ver?

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Configure grub for pxe boot and nfs-mounted root

2013-11-24 Thread Beeblebrox
Using grub-trunk. My PXE boot environment is a little different:

* FreeBSD_amd64 jail on /data/amd64, serving dhcp  tftp from jail.
NFS-related (rpcbind, nfsd, mountd) being served from host (trivial
detail). Jail IP is 192.168.2.1
* Once PXE client obtains IP, the tftp-server needs to find Grub's
grub.pxe, which will then bring up the menu defined in grub.cfg
* grub.cfg will have 3 different NFS-exported destinations as boot
choices, which have same IP as jail (nfs:/192.168.2.1:/data/*):
+ /data/amd64 for FreeBSD_amd64
+ /data/i386 for FreeBSD_i386
+ /data/tftp for various *.iso images for booting with loopback

My questions are:
1. I assume that since dhcp and tftp are being served from /data/amd64
jail, I must place the grub folder under that path in order for
tftp-server to find it. I don't see a way where tftp-server would be
able to serve-up the grub menu if it were in say /data/tftp path?
2. Do I need to run the code below, is the syntax correct, or is this
for old version:
grub-mkimage --format=i386-pc-pxe --output=grub.pxe
--prefix='(192.168.2.1)/data/amd64/boot/grub' pxe pxecmd
3. Recall that the grub folder will be residing on /data/amd64 or
/data/tftp. Waht is  the grub.cfg entry for /data/i386? Will this
work?
menuentry FreeBSD_i386 {
 set root='ip=:eth0:dhcp nfsroot=192.168.2.1:/data/i386'
 kfreebsd /boot/loader }

Thank you for any input.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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 --file=grub-shell-tester:-
config.status: creating grub-shell-tester
chmod a+x grub-shell-tester
cc -o garbage-gen  -DGRUB_FILE=\util/garbage-gen.c\ -I. -I. -I. -I.
-I./include -I./include -I./grub-core/lib/libgcrypt-grub/include
-I./grub-core/lib/libgcrypt-grub/src/  util/garbage-gen.c
util/garbage-gen.c:35:18: error: variable has incomplete type 'struct timeval'
  struct timeval tv;
 ^
util/garbage-gen.c:35:10: note: forward declaration of 'struct timeval'
  struct timeval tv;
 ^
util/garbage-gen.c:36:3: warning: implicit declaration of function
'gettimeofday' is invalid
  in C99 [-Wimplicit-function-declaration]
  gettimeofday (tv, NULL);
  ^
1 warning and 1 error generated.
gmake[2]: *** [garbage-gen] Error 1

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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`  CDPATH=${ZSH_VERSION+.}:  cd .  \
rm -rf $backupdir  mkdir $backupdir  \
if (/usr/local/bin/makeinfo --version) /dev/null 21; then \
  for f in grub.info grub.info-[0-9] grub.info-[0-9][0-9] grub.i[0-9]
grub.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
  done; \
else :; fi  \
cd $am__cwd; \
if /usr/local/bin/makeinfo   -I . \
 -o grub.info grub.texi; \
then \
  rc=0; \
  CDPATH=${ZSH_VERSION+.}:  cd .; \
else \
  rc=$?; \
  CDPATH=${ZSH_VERSION+.}:  cd .  \
  $restore $backupdir/* `echo ./grub.info | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
Bus error (core dumped)
Bus error (core dumped)
gmake[2]: *** [grub.info] Error 138
gmake[2]: Leaving directory `/asp/git/grub/docs'
gmake[1]: *** [all-recursive] Error 1

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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 -I../grub-core/lib/libgcrypt-grub/include
-I../grub-core/lib/libgcrypt-grub/src/ -m64 -Wall -Werror -nostdlib
-O2 -mcmodel=large -mno-red-zone -c -o efiemu64_s.o
efiemu/runtime/efiemu.S || exit 1; \
fi
rm -f efiemu64.o; \
if test x0 = x1; then \
  rm -f efiemu64.o.bin; \
  cc -m64 -Wl,-r -nostdlib -o efiemu64.o.bin efiemu64_c.o efiemu64_s.o
|| exit 1; \
   -felf64 -nu -nd efiemu64.o.bin efiemu64.o || exit 1; \
  rm -f efiemu64.o.bin; \
else \
  cc -m64 -Wl,-melf_x86_64 -nostdlib -Wl,-r -o efiemu64.o efiemu64_c.o
efiemu64_s.o || exit 1; \
  if test ! -z ; then  efiemu64.o || (rm -f efiemu64.o; exit 1); fi; \
fi
/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'
gmake[2]: Leaving directory `/asp/git/grub/grub-core'
Making all in po
gmake[2]: Entering directory `/asp/git/grub/po'
gmake[2]: Leaving directory `/asp/git/grub/po'
Making all in docs
gmake[2]: Entering directory `/asp/git/grub/docs'
Updating ./version.texi
restore=:  backupdir=.am$$  \
am__cwd=`pwd`  CDPATH=${ZSH_VERSION+.}:  cd .  \
rm -rf $backupdir  mkdir $backupdir  \
if (/usr/local/bin/makeinfo --version) /dev/null 21; then \
  for f in grub.info grub.info-[0-9] grub.info-[0-9][0-9] grub.i[0-9]
grub.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
  done; \
else :; fi  \
cd $am__cwd; \
if /usr/local/bin/makeinfo   -I . \
 -o grub.info grub.texi; \
then \
  rc=0; \
  CDPATH=${ZSH_VERSION+.}:  cd .; \
else \
  rc=$?; \
  CDPATH=${ZSH_VERSION+.}:  cd .  \
  $restore $backupdir/* `echo ./grub.info | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
Bus error (core dumped)
Bus error (core dumped)
gmake[2]: *** [grub.info] Error 138
gmake[2]: Leaving directory `/asp/git/grub/docs'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/asp/git/grub'
gmake: *** [all] Error 2

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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
https://lists.gnu.org/mailman/listinfo/grub-devel


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 expression
   get_ofpathname (const char *dev)
   ^
grub-core/osdep/unix/platform.c:48:18: error: use of undeclared identifier
  'fp'
   while (!feof (fp))
 ^
/usr/include/stdio.h:489:43: note: expanded from macro 'feof'
#define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p))
 ^
/usr/include/stdio.h:483:23: note: expanded from macro '__sfeof'
#define __sfeof(p)  (((p)-_flags  __SEOF) != 0)
   ^
In file included from grub-core/osdep/platform_unix.c:2:
grub-core/osdep/unix/platform.c:48:18: error: use of undeclared identifier
  'fp'
/usr/include/stdio.h:489:55: note: expanded from macro 'feof'
#define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p))
 ^
In file included from grub-core/osdep/platform_unix.c:2:
grub-core/osdep/unix/platform.c:56:53: error: use of undeclared identifier
  'fp'
  r = fread (ret + offset, 1, alloced - offset, fp);
^
grub-core/osdep/unix/platform.c:60:12: error: use of undeclared identifier
  'fp'
   fclose (fp);


Patched section currently looks like:
31   static char *
32   get_ofpathname (const char *dev)
33   {
34size_t alloced = 4096;
35   char *ret = xmalloc (alloced);
36   size_t offset = 0;
37int fd;
38   pid_t pid;
39
40   pid = grub_util_exec_pipe ((const char * []){ ofpathname, dev,
NULL }, fd);
41   if (!pid)
42
43   FILE *fp = fdopen (fd, r);
44   get_ofpathname (const char *dev)
45   if (!fp)
46 goto fail;
47
48   while (!feof (fp))
49 {
50   size_t r;
51if (alloced == offset)
52   {
53 alloced *= 2;
54 ret = xrealloc (ret, alloced);
55   }
56  r = fread (ret + offset, 1, alloced - offset, fp);
57  offset += r;
58}
59
60   fclose (fp);

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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 in the configure command, as I expect the
build should be able to identify the target on its own. Is this
incorrect?

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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] Error 1
gmake[3]: Leaving directory `/asp/git/grub/grub-core'


On 11/5/13, Beeblebrox zap...@berentweb.com wrote:
 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.


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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 directory `/asp/git/grub/grub-core'

The ./configure file should have detected xkfreebsd, but seems it did
not. What is the command-line syntax I can run for x$host_kernel to
make sure that correct platform is detected? $ ./configure only shows:
GRUB2 will be compiled with following components:
Platform: i386-pc
Whereas, it might be useful if it also displayed result of O/S check.
If the wrong OS is being detected by config, it might also explain why
I ran into float/double standalone headers error previously.

Regards.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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 -I../include -I../include
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC
-DGRUB_TARGET_CPU_I386=1 -m32 -nostdinc -isystem /usr/include
-DGRUB_FILE=\gnulib/regex.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/posix_wrap
-I../grub-core/gnulib -I../grub-core/gnulib
-I/usr/local/include  -Os -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 -g -Wredundant-decls
-Wmissing-prototypes -Wmissing-declarations -falign-jumps=1
-falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2
-mno-3dnow -m32 -fno-stack-protector -mno-stack-arg-probe
-Wtrampolines  -mrtd -mregparm=3 -freg-struct-return
-Dfloat=__grub_poison -Ddouble=__grub_poison -fno-builtin -fno-builtin
-Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter
-Wno-redundant-decls -Wno-unreachable-code -Wno-conversion
-Wno-old-style-definition -Wno-unsafe-loop-optimizations
  -MT gnulib/libgnulib_a-regex.o -MD -MP -MF
gnulib/.deps-core/libgnulib_a-regex.Tpo -c -o
gnulib/libgnulib_a-regex.o `test -f 'gnulib/regex.c' || echo
'./'`gnulib/regex.c
In file included from /usr/include/sys/_types.h:33,
 from /usr/include/stdarg.h:35,
 from ../include/grub/misc.h:23,
 from ../grub-core/lib/posix_wrap/sys/types.h:22,
 from ../grub-core/gnulib/regex.h:24,
 from gnulib/regex.c:67:
/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'
gmake[3]: *** [gnulib/libgnulib_a-regex.o] Error 1
gmake[3]: Leaving directory `/asp/git/grub/grub-core'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/asp/git/grub/grub-core'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/asp/git/grub'
gmake: *** [all] Error 2

___
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 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 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
https://lists.gnu.org/mailman/listinfo/grub-devel


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 the fix? Then
grub-on-zfs-amd64 also waits for upstream. Whatever you suggest...

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


trunk download choices

2013-09-26 Thread Beeblebrox
How can I checkout/download grub trunk?
Is bzr the only option (http://bzr.savannah.gnu.org/r/grub/trunk/grub/)?
Or is there any other alternative including svn, git, tarball?

An alternative, even if not the latest version of what is in trunk,
would be acceptable.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/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'
kfreebsd (hd0,gpt2)/bsds/@/boot/kernel/kernel
kfreebsd_module_elf (hd0,gpt2)/bsds/@/boot/kernel/opensolaris.ko
kfreebsd_module_elf (hd0,gpt2)/bsds/@/boot/kernel/zfs.ko
kfreebsd_module (hd0,gpt2)/bsds/@/boot/zfs/zpool.cache
type=/boot/zfs/zpool.cache
kfreebsd_loadenv (hd0,gpt2)/bsds/@/boot/device.hints
set kFreeBSD.vfs.root.mountfrom=zfs:bsds
}
menuentry 'Test2-BSD-ZFS ChainloadBTX' {
insmod zfs
set root='hd0,gpt2'
kfreebsd (hd0,gpt2)/bsds/@/boot/loader
}

Neither of the above entries work. My root zpool is named bsds and
the zfs is the same as the root pool. In other words, zfs list =
bsds   /
bsds/usr   /usr
bsds/var   /var
etc...
I have also tried (unsuccessfully) the above with
set root='hd0,gpt2'
kfreebsd /@/boot/loader  OR
kfreebsd (hd0,gpt2)/@/boot/loader  OR
kfreebsd (hd0,gpt2)//@/boot/loader
All give unknown filesystem message. When I drop to grub
command-propmt, and try:
zfsinfo (hd0,gpt2)  = error: couldn't find a valid label
I did not try the other 2 zfs-related commands because I do not know
how to use them.

Finally, The grub version on the HDD is from Ubuntu-Raring (2.0). I
should and want to re-code grub from the FreeBSD side, but I am
hesitant since I don't want to fail and work to re-install the
bootloader. FreeBSD's grub is also 2.0. The grub-mkconfig command
however, generates a completely different grub.cfg. The currently
installed (ubuntu) grub does not recognize the t command and neither
the root ID c2955d0d7dd8618b (no such device)
menuentry 'FreeBSD' --class freebsd --class bsd --class os
$menuentry_id_option 'kfreebsd-simple-c2955d0d7dd8618b' {
tinsmod part_gpt
tinsmod zfs
tif [ x$feature_platform_search_hint = xy ]; then
t  search --no-floppy --fs-uuid --set=root  c2955d0d7dd8618b
telse
t  search --no-floppy --fs-uuid --set=root c2955d0d7dd8618b
tfi
echo'Loading kernel of FreeBSD kernel ...'
kfreebsd//@/boot/kernel/kernel
kfreebsd_loadenv//@/boot/device.hints
tinsmod part_gpt
tinsmod zfs
tif [ x$feature_platform_search_hint = xy ]; then
t  search --no-floppy --fs-uuid --set=root  c2955d0d7dd8618b
telse
t  search --no-floppy --fs-uuid --set=root c2955d0d7dd8618b
tfi
kfreebsd_module_elf//@/boot/kernel/opensolaris.ko

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub2 boot freedos kernel.sys

2013-09-05 Thread Beeblebrox
After giving some further thought to this concept, I am now of the
opinion that it might be a bad idea. The reason is, the USB connection
might get closed-out during the flash by the BIOS, whereas when loaded
into RAM (as ramdisk) there is no chance of the BIOS closing off the
connection.
So flashing the bios from dos-booted USB drive is probably risky.
Thanks and regards.

On Sat, Aug 31, 2013 at 7:42 AM, Andrey Borzenkov arvidj...@gmail.com wrote:
 В Wed, 28 Aug 2013 12:04:31 +0300
 Beeblebrox zap...@berentweb.com пишет:

 I would like to know if the following is possible:

 * USB thumb drive has grub-1.98 on hd(0,1) gpt layout (boot-bios is hd0,2)
 * hd(0,1)/boot/freedos has files
 autoexec.bat, command.com, config.sys, kernel.sys, sys.com
 Un-tarred from freedos FDOEM.144 and copied into folder
 * Boot into USB drive's grub2 boot menu and try to boot freedos by:
 menuentry DOS kernel {
root=UUID=8D40-EC8D
chainloader --ebx=0x0180 (hd0,1)/boot/freedos/kernel.sys
boot  }
 gives err msg: wrong signature. Probably expected, since files being
 booted are for a virtual floppy, but I also tried it with the files from
 ke386f32 .zip as well.

 Q: Is what I'm trying to do possible?
 I don't want to boot into a ram-limited 1.44 or 2.88 virtual floppy. My
 purpose for this is to be able to make mobo BIOS-updates (place BIOS
 dosflash.exe + bios.rom files on USB drive, boot into grub2 - chainload to
 dos, mount thumbdrive in dos to make files visible, run dosflash.exe)


 If I understand correctly what you are trying to do, the following
 should work:

 http://sourceforge.net/apps/mediawiki/freedos/index.php?title=USB

 It describes how to create bootable FreeDOS USB stick using grub
 legacy which should be trivially extrapolated to grub2.

 I asked this question on the freedos mail list, but they could not help
 much because of insufficient grub2 expertise. The feasibility of the
 concept is described here:
 http://www.novell.com/coolsolutions/feature/3612.html
 I would appreciate some help on how to get this done, or if someone has
 ideas on how to flash the BIOS using the grub2 menu, that would also work.
 Regards.


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Fwd: grub2 boot freedos kernel.sys

2013-08-30 Thread Beeblebrox
I would like to know if the following is possible:

* USB thumb drive has grub-1.98 on hd(0,1) gpt layout (boot-bios is hd0,2)
* hd(0,1)/boot/freedos has files
autoexec.bat, command.com, config.sys, kernel.sys, sys.com
Un-tarred from freedos FDOEM.144 and copied into folder
* Boot into USB drive's grub2 boot menu and try to boot freedos by:
menuentry DOS kernel {
   root=UUID=8D40-EC8D
   chainloader (hd0,1)/boot/freedos/kernel.sys
   boot  }
gives err msg: wrong signature. Probably expected, since files being
booted are for a virtual floppy, but I also tried it with the files from
ke386f32 .zip as well.

Q: Is what I'm trying to do possible?
I don't want to boot into a ram-limited 1.44 or 2.88 virtual floppy. My
purpose for this is to be able to make mobo BIOS-updates (place BIOS
dosflash.exe + bios.rom files on USB drive, boot into grub2 - chainload to
dos, mount thumbdrive in dos to make files visible, run dosflash.exe)

I asked this question on the freedos mail list, but they could not help
much because of insufficient grub2 expertise. The feasibility of the
concept is described here:
http://www.novell.com/coolsolutions/feature/3612.html
I would appreciate some help on how to get this done, or if someone has
ideas on how to flash the BIOS using the grub2 menu, that would also work.
Thanks.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


grub2 boot freedos kernel.sys

2013-08-30 Thread Beeblebrox
Len  Vladimir:

I just sent a repeat of the first message by mistake - please disregard.

 You are trying to make it way too complicated. DOS doesn't like
complicated.

I'm fine with that. I just went about it in that manner because I was not
very sure how to get this done and more or less fumbling around.

 I think the most practical thing to do would be to make a bootable USB
key and use that along with the USBASPI.SYS driver to get access to the
rest of the USB key after booting DOS.

You of course mean by this that I would have to have a dedicated USB drive
just for this task - is that correct? I really don't want to have a USB
dedicated and limited to upgrading of BIOS.

* You can always modify FreeDOS to* * suit your needs

*
*Just to confirm: What I am trying to get done is possible then? Not that I
want to make things complicated, I just want to be able to use a
grub2-bootlader USB to multi-boot various tools (including BIOS flash
utility from dos).
*
*Sadly, flashrom does not work on my hardware as yet.
*
*Thanks again.
*
*
*
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


grub2 boot freedos kernel.sys

2013-08-28 Thread Beeblebrox
I would like to know if the following is possible:

* USB thumb drive has grub-1.98 on hd(0,1) gpt layout (boot-bios is hd0,2)
* hd(0,1)/boot/freedos has files
autoexec.bat, command.com, config.sys, kernel.sys, sys.com
Un-tarred from freedos FDOEM.144 and copied into folder
* Boot into USB drive's grub2 boot menu and try to boot freedos by:
menuentry DOS kernel {
   root=UUID=8D40-EC8D
   chainloader --ebx=0x0180 (hd0,1)/boot/freedos/kernel.sys
   boot  }
gives err msg: wrong signature. Probably expected, since files being
booted are for a virtual floppy, but I also tried it with the files from
ke386f32 .zip as well.

Q: Is what I'm trying to do possible?
I don't want to boot into a ram-limited 1.44 or 2.88 virtual floppy. My
purpose for this is to be able to make mobo BIOS-updates (place BIOS
dosflash.exe + bios.rom files on USB drive, boot into grub2 - chainload to
dos, mount thumbdrive in dos to make files visible, run dosflash.exe)

I asked this question on the freedos mail list, but they could not help
much because of insufficient grub2 expertise. The feasibility of the
concept is described here:
http://www.novell.com/coolsolutions/feature/3612.html
I would appreciate some help on how to get this done, or if someone has
ideas on how to flash the BIOS using the grub2 menu, that would also work.
Regards.
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel