Re: PXE boot over NFS please
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 boot over NFS please
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
В Sat, 7 Jun 2014 09:15:51 +0300 Beeblebrox zap...@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. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: PXE boot over NFS please
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
Re: PXE boot over NFS please
В Sat, 7 Jun 2014 10:33:29 +0300 Beeblebrox zap...@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. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: PXE boot over NFS please
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
В Fri, 6 Jun 2014 15:11:22 +0300 Beeblebrox zap...@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. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: PXE boot over NFS please
Отправлено с iPhone 02 июня 2014 г., в 9:35, Beeblebrox zap...@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. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: PXE boot over NFS please
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
В Mon, 2 Jun 2014 18:14:31 +0300 Beeblebrox zap...@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. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: PXE boot over NFS please
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
Re: PXE boot over NFS please
В Sun, 1 Jun 2014 20:53:27 +0300 Beeblebrox zap...@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. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: PXE boot over NFS please
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