All of lore.kernel.org
 help / color / mirror / Atom feed
* PXE boot over NFS please
@ 2014-06-01 17:53 Beeblebrox
  2014-06-02  5:15 ` Andrey Borzenkov
  0 siblings, 1 reply; 14+ messages in thread
From: Beeblebrox @ 2014-06-01 17:53 UTC (permalink / raw)
  To: The development of GNU GRUB

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

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.

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

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

* Re: PXE boot over NFS please
  2014-06-01 17:53 PXE boot over NFS please Beeblebrox
@ 2014-06-02  5:15 ` Andrey Borzenkov
  2014-06-02  5:35   ` Beeblebrox
  0 siblings, 1 reply; 14+ messages in thread
From: Andrey Borzenkov @ 2014-06-02  5:15 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: zaphod

В Sun, 1 Jun 2014 20:53:27 +0300
Beeblebrox <zaphod@berentweb.com> пишет:

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

Where Linux kernel mounts its root filesystem from is hardly related to
how bootloader obtains Linux kernel. 

>                        I hope one day Grub will be able to as well.
> 

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?

> Thanks and Regards.



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

* Re: PXE boot over NFS please
  2014-06-02  5:15 ` Andrey Borzenkov
@ 2014-06-02  5:35   ` Beeblebrox
  2014-06-02  6:12     ` arvidjaar
  0 siblings, 1 reply; 14+ messages in thread
From: Beeblebrox @ 2014-06-02  5:35 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: The development of GNU GRUB, Raif S. Berent

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

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.

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

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

* Re: PXE boot over NFS please
  2014-06-02  5:35   ` Beeblebrox
@ 2014-06-02  6:12     ` arvidjaar
  2014-06-02 15:14       ` Beeblebrox
  0 siblings, 1 reply; 14+ messages in thread
From: arvidjaar @ 2014-06-02  6:12 UTC (permalink / raw)
  To: zaphod@berentweb.com; +Cc: The development of GNU GRUB

Отправлено с iPhone

> 02 июня 2014 г., в 9:35, Beeblebrox <zaphod@berentweb.com> написал(а):
> 
> 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.
> 

The code you quoted has.


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

Grub already supports HTTP. Did you try it?

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


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

* Re: PXE boot over NFS please
  2014-06-02  6:12     ` arvidjaar
@ 2014-06-02 15:14       ` Beeblebrox
  2014-06-02 15:50         ` Andrey Borzenkov
  0 siblings, 1 reply; 14+ messages in thread
From: Beeblebrox @ 2014-06-02 15:14 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

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

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.

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

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

* Re: PXE boot over NFS please
  2014-06-02 15:14       ` Beeblebrox
@ 2014-06-02 15:50         ` Andrey Borzenkov
  2014-06-02 17:36           ` Beeblebrox
  0 siblings, 1 reply; 14+ messages in thread
From: Andrey Borzenkov @ 2014-06-02 15:50 UTC (permalink / raw)
  To: zaphod; +Cc: The development of GNU GRUB

В Mon, 2 Jun 2014 18:14:31 +0300
Beeblebrox <zaphod@berentweb.com> пишет:

> 
> 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 root=http,192.168.2.1

>   set isofile="ubuntu-13.04.iso"
>   loopback loop http://192.168.2.1/tftp/$isofile

loopback loop0 ($root)/tftp/$isofile

>   linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
> noprompt noeject
>   initrd (loop)/casper/initrd.lz    }
> 
> Regards.



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

* Re: PXE boot over NFS please
  2014-06-02 15:50         ` Andrey Borzenkov
@ 2014-06-02 17:36           ` Beeblebrox
  2014-06-06 12:11             ` Beeblebrox
  0 siblings, 1 reply; 14+ messages in thread
From: Beeblebrox @ 2014-06-02 17:36 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

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

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

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

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

* Re: PXE boot over NFS please
  2014-06-02 17:36           ` Beeblebrox
@ 2014-06-06 12:11             ` Beeblebrox
  2014-06-07  4:59               ` Andrey Borzenkov
  0 siblings, 1 reply; 14+ messages in thread
From: Beeblebrox @ 2014-06-06 12:11 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

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

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

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

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

* Re: PXE boot over NFS please
  2014-06-06 12:11             ` Beeblebrox
@ 2014-06-07  4:59               ` Andrey Borzenkov
  2014-06-07  6:15                 ` Beeblebrox
  0 siblings, 1 reply; 14+ messages in thread
From: Andrey Borzenkov @ 2014-06-07  4:59 UTC (permalink / raw)
  To: zaphod; +Cc: The development of GNU GRUB

В Fri, 6 Jun 2014 15:11:22 +0300
Beeblebrox <zaphod@berentweb.com> пишет:

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

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


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

* Re: PXE boot over NFS please
  2014-06-07  4:59               ` Andrey Borzenkov
@ 2014-06-07  6:15                 ` Beeblebrox
  2014-06-07  7:24                   ` Andrey Borzenkov
  2014-06-07  7:33                   ` Beeblebrox
  0 siblings, 2 replies; 14+ messages in thread
From: Beeblebrox @ 2014-06-07  6:15 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

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

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

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

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

* Re: PXE boot over NFS please
  2014-06-07  6:15                 ` Beeblebrox
@ 2014-06-07  7:24                   ` Andrey Borzenkov
  2014-06-07  7:33                   ` Beeblebrox
  1 sibling, 0 replies; 14+ messages in thread
From: Andrey Borzenkov @ 2014-06-07  7:24 UTC (permalink / raw)
  To: zaphod; +Cc: The development of GNU GRUB

В Sat, 7 Jun 2014 09:15:51 +0300
Beeblebrox <zaphod@berentweb.com> пишет:

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

It should already be present in a grub core image built for PXE.

> insmod pxechainloader

This by itself does nothing; pxechainloader is a command. This is
mostly the same as using chainloader but keeping PXE stack alive.

> kfreebsd loader
> kfreebsd_loadenv device.hints    }
> 

What I mean, use "pxechainloader /your/freebsd/PXE-aware/bootloader".
Probably "pxechainloader ${path_to}/boot/pxeboot". I do not know how
*BSD bootloaders work, sorry.


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

* Re: PXE boot over NFS please
  2014-06-07  6:15                 ` Beeblebrox
  2014-06-07  7:24                   ` Andrey Borzenkov
@ 2014-06-07  7:33                   ` Beeblebrox
  2014-06-08  5:23                     ` Andrey Borzenkov
  2014-06-09  4:55                     ` Beeblebrox
  1 sibling, 2 replies; 14+ messages in thread
From: Beeblebrox @ 2014-06-07  7:33 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

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

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.

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

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

* Re: PXE boot over NFS please
  2014-06-07  7:33                   ` Beeblebrox
@ 2014-06-08  5:23                     ` Andrey Borzenkov
  2014-06-09  4:55                     ` Beeblebrox
  1 sibling, 0 replies; 14+ messages in thread
From: Andrey Borzenkov @ 2014-06-08  5:23 UTC (permalink / raw)
  To: zaphod; +Cc: The development of GNU GRUB

В Sat, 7 Jun 2014 10:33:29 +0300
Beeblebrox <zaphod@berentweb.com> пишет:

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

Yes, somebody reported this as well (January may be). Care to open bug
report for this?

> My TFTP root is /boot, so pxeboot file and grub folder reside in the TFTP
> root.
> Regards.



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

* Re: PXE boot over NFS please
  2014-06-07  7:33                   ` Beeblebrox
  2014-06-08  5:23                     ` Andrey Borzenkov
@ 2014-06-09  4:55                     ` Beeblebrox
  1 sibling, 0 replies; 14+ messages in thread
From: Beeblebrox @ 2014-06-09  4:55 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

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

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.

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

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

end of thread, other threads:[~2014-06-09  4:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-01 17:53 PXE boot over NFS please Beeblebrox
2014-06-02  5:15 ` Andrey Borzenkov
2014-06-02  5:35   ` Beeblebrox
2014-06-02  6:12     ` arvidjaar
2014-06-02 15:14       ` Beeblebrox
2014-06-02 15:50         ` Andrey Borzenkov
2014-06-02 17:36           ` Beeblebrox
2014-06-06 12:11             ` Beeblebrox
2014-06-07  4:59               ` Andrey Borzenkov
2014-06-07  6:15                 ` Beeblebrox
2014-06-07  7:24                   ` Andrey Borzenkov
2014-06-07  7:33                   ` Beeblebrox
2014-06-08  5:23                     ` Andrey Borzenkov
2014-06-09  4:55                     ` Beeblebrox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.