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 Vladimir 'φ-coder/phcoder' Serbinenko
On 26.11.2013 11:01, Beeblebrox wrote:
 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)
This doesn't seem to be a GRUB problem at all. I use tftpd which serves
from /var/tftpd
 * 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).
I'll think how to handle it sanely. Only mknetdir needs this change
 * 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?
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?
 * Which insmod need for NFS exported folders? There's no nfs*.mod?
You're right there isn't any. Right now we have only tftp and http.
Patches are welcome
 * 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?
 
No device.map is not for this at all. For once it's not used by runtime
at all.
 Thanks for the input
 
 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 https://lists.gnu.org/mailman/listinfo/grub-devel
 




signature.asc
Description: OpenPGP digital signature
___
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: Configure grub for pxe boot and nfs-mounted root

2013-11-26 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 26.11.2013 12:26, Beeblebrox wrote:
 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
 
You misconfigured your server --net-directory is where root of tftp is.
--subdir is subdirectory of it. Yet your server has root in /boot/grub
and not subdirectory
 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
 




signature.asc
Description: OpenPGP digital signature
___
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 Vladimir 'phcoder' Serbinenko
On Nov 25, 2013 4:29 PM, Beeblebrox zap...@berentweb.com wrote:

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

paste full output with -v
 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

it's a leftover
 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 https://lists.gnu.org/mailman/listinfo/grub-devel
___
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: Configure grub for pxe boot and nfs-mounted root

2013-11-25 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 25.11.2013 17:25, Beeblebrox wrote:
 #  grub-mknetdir -v  = no output
 dmesg shows nothing
 
Found the problem. Either use -d or upgrade.
 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
 




signature.asc
Description: OpenPGP digital signature
___
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: Configure grub for pxe boot and nfs-mounted root

2013-11-25 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 26.11.2013 08:22, Beeblebrox wrote:
 Found the problem. Either use -d or upgrade.
 The -d flag did not work (gave error), so I I upgraded. Works now!
 
-d requires an argument (consult --help)
 # 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
 




signature.asc
Description: OpenPGP digital signature
___
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-24 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 24.11.2013 09:14, Beeblebrox wrote:
 d version:
 grub-mkimage --format=i386-pc-pxe --output=grub.pxe
 --prefix='(192.168.2.1)/data/amd64/boot/grub' pxe pxecmd
No, use grub-mknetdir.



signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel