* Re: Configure grub for pxe boot and nfs-mounted root
@ 2013-11-26 10:01 Beeblebrox
2013-11-26 10:10 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-26 11:26 ` Beeblebrox
0 siblings, 2 replies; 12+ messages in thread
From: Beeblebrox @ 2013-11-26 10:01 UTC (permalink / raw)
To: The development of GNU GRUB
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Configure grub for pxe boot and nfs-mounted root
2013-11-26 10:01 Configure grub for pxe boot and nfs-mounted root Beeblebrox
@ 2013-11-26 10:10 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-26 11:26 ` Beeblebrox
1 sibling, 0 replies; 12+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-26 10:10 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 2051 bytes --]
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
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Configure grub for pxe boot and nfs-mounted root
2013-11-26 10:01 Configure grub for pxe boot and nfs-mounted root Beeblebrox
2013-11-26 10:10 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-26 11:26 ` Beeblebrox
2013-11-26 11:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 1 reply; 12+ messages in thread
From: Beeblebrox @ 2013-11-26 11:26 UTC (permalink / raw)
To: The development of GNU GRUB
>> 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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Configure grub for pxe boot and nfs-mounted root
2013-11-26 11:26 ` Beeblebrox
@ 2013-11-26 11:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 12+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-26 11:57 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]
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
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Configure grub for pxe boot and nfs-mounted root
@ 2013-11-25 15:29 Beeblebrox
2013-11-25 15:32 ` Vladimir 'phcoder' Serbinenko
0 siblings, 1 reply; 12+ messages in thread
From: Beeblebrox @ 2013-11-25 15:29 UTC (permalink / raw)
To: The development of GNU GRUB
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Configure grub for pxe boot and nfs-mounted root
@ 2013-11-24 8:14 Beeblebrox
2013-11-24 8:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-25 16:25 ` Beeblebrox
0 siblings, 2 replies; 12+ messages in thread
From: Beeblebrox @ 2013-11-24 8:14 UTC (permalink / raw)
To: The development of GNU GRUB
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-11-26 11:57 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-26 10:01 Configure grub for pxe boot and nfs-mounted root Beeblebrox
2013-11-26 10:10 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-26 11:26 ` Beeblebrox
2013-11-26 11:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
-- strict thread matches above, loose matches on Subject: below --
2013-11-25 15:29 Beeblebrox
2013-11-25 15:32 ` Vladimir 'phcoder' Serbinenko
2013-11-24 8:14 Beeblebrox
2013-11-24 8:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-25 16:25 ` Beeblebrox
2013-11-25 18:18 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-26 7:22 ` Beeblebrox
2013-11-26 7:56 ` 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).