All of lore.kernel.org
 help / color / mirror / Atom feed
* PXE Boot NFS not working
@ 2018-04-26  4:45 Raymond Yeung
  2018-04-26  7:26 ` Hussin, Mohamad Noor Alim
  0 siblings, 1 reply; 7+ messages in thread
From: Raymond Yeung @ 2018-04-26  4:45 UTC (permalink / raw)
  To: yocto

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

I've an Intel Xeon-D board.  I could boot up the board with PXE booting.  However, this seems to be always looking for "removable media"; if there is none, it would hang (in a .sh file).  I want to explore NFS approach.  So far, I've read up, experimented on NFS setup via pxelinux.cfg/default file.  I'm able to manually perform nfs mount from client side, but doing it via configuration file doesn't seem to work.


Now, I'm wondering if my bzImage and initrd files are built correct.  According to this article here:


https://wiki.yoctoproject.org/wiki/Poky_NFS_Root


Two requirements must be met.  First one is that the network driver must be built into the kernel rather than being a module.  Second one is to disable network init script.


Does anyone know how to do the above two items?  What recipe file(s) should I modify?


Thanks,

Raymond

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

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

* Re: PXE Boot NFS not working
  2018-04-26  4:45 PXE Boot NFS not working Raymond Yeung
@ 2018-04-26  7:26 ` Hussin, Mohamad Noor Alim
  2018-04-26 17:12   ` Raymond Yeung
  0 siblings, 1 reply; 7+ messages in thread
From: Hussin, Mohamad Noor Alim @ 2018-04-26  7:26 UTC (permalink / raw)
  To: Raymond Yeung, yocto

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

Refer to my post here https://lists.yoctoproject.org/pipermail/yocto/2018-April/040860.html

Don't use initramfs/initrd as it not working.


Regards,
Alim Hussin

From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Raymond Yeung
Sent: Thursday, April 26, 2018 12:46 PM
To: yocto@yoctoproject.org
Subject: [yocto] PXE Boot NFS not working


I've an Intel Xeon-D board.  I could boot up the board with PXE booting.  However, this seems to be always looking for "removable media"; if there is none, it would hang (in a .sh file).  I want to explore NFS approach.  So far, I've read up, experimented on NFS setup via pxelinux.cfg/default file.  I'm able to manually perform nfs mount from client side, but doing it via configuration file doesn't seem to work.



Now, I'm wondering if my bzImage and initrd files are built correct.  According to this article here:



https://wiki.yoctoproject.org/wiki/Poky_NFS_Root



Two requirements must be met.  First one is that the network driver must be built into the kernel rather than being a module.  Second one is to disable network init script.



Does anyone know how to do the above two items?  What recipe file(s) should I modify?



Thanks,

Raymond

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

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

* Re: PXE Boot NFS not working
  2018-04-26  7:26 ` Hussin, Mohamad Noor Alim
@ 2018-04-26 17:12   ` Raymond Yeung
  2018-04-27  3:30     ` Hussin, Mohamad Noor Alim
  2018-04-27  5:56     ` "Waiting for Removable Media" hang Raymond Yeung
  0 siblings, 2 replies; 7+ messages in thread
From: Raymond Yeung @ 2018-04-26 17:12 UTC (permalink / raw)
  To: Hussin, Mohamad Noor Alim, yocto

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

Follow-up to my previous post, after seeing the reply below suggesting me not to use initramfs (but initrd is usable, right?).  BTW, I don't use bootx64.efi.  Instead, I use pxelinux.0 along with the other lib***.c32 files.


  1.  Is there a way to verify if GRUB (that I'm using) supports networking or not?  It seems to have very limited user commands available.
  2.  How do I get into GRUB?  I'd been into GRUB, more like accidentally.  The reply below refers to grub.cfg.  Is this cfg file stored on target, or on host (like pxelinux.cfg)?
  3.  How do I configure my build (and what yocto tool to use, if any) in order to get my network driver part of kernel, instead of being a LKM that isn't there when I need it for NFS boot?


________________________________
From: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com>
Sent: Thursday, April 26, 2018 12:26 AM
To: Raymond Yeung; yocto@yoctoproject.org
Subject: RE: PXE Boot NFS not working


Refer to my post here https://lists.yoctoproject.org/pipermail/yocto/2018-April/040860.html



Don’t use initramfs/initrd as it not working.





Regards,

Alim Hussin




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

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

* Re: PXE Boot NFS not working
  2018-04-26 17:12   ` Raymond Yeung
@ 2018-04-27  3:30     ` Hussin, Mohamad Noor Alim
  2018-04-27  4:43       ` Raymond Yeung
  2018-04-27  5:56     ` "Waiting for Removable Media" hang Raymond Yeung
  1 sibling, 1 reply; 7+ messages in thread
From: Hussin, Mohamad Noor Alim @ 2018-04-27  3:30 UTC (permalink / raw)
  To: Raymond Yeung, yocto

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

You are using PXE with legacy BIOS as you use pxelinux.0 . To configure PXE with legacy BIOS follow these instruction
Note: PXE server IP = 192.168.1.2
Target IP = 192.168.1.1

On PXE server

1.       make sure DHCP, NFS & TFTP services are up and running.

2.       change the filename "pxelinux.0"; in /etc/dhcp/dhcpd.conf. Then restart your DHCP service.

3.       Put your kernel to /path/to/tftpboot/image/ and extract your rootfs to /srv/rootfs/.

4.       Create a file in /path/to/tftpboot/pxelinux.cfg/default. The content should like this

include menu.cfg

default vesamenu.c32

prompt 0

timeout 5

label Manual Netboot genericx86-64

menu label Netboot genericx86-64

linux image/bzImage

append root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp

if you want to use PXE with GRUB, bootx64.efi, you need to enable UEFI  instead of legacy BIOS in BIOS configuration. Follow these instruction.
on PXE server

1.       make sure DHCP, NFS & TFTP services are up and running.

2.       change the filename "bootx64.efi"; in /etc/dhcp/dhcpd.conf. Then restart your DHCP service.

3.       Put your kernel to /path/to/tftpboot/image/ and extract your rootfs to /srv/rootfs/.

4.       If you want to get into GRUB,

a.       comment the commands from /path/to/tftpboot/grub/grub.cfg to avoid grub automatically load the kernel from network.

b.      On GRUB, press "TAB" key to list available command. Or you can try use this command

                                                               i.      net_bootp

                                                             ii.      linux (tftp,pxeserverip)/image/bzImage root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp

                                                            iii.      boot

5.       if you want boot automatically to NFS, create a file called grub.cfg in /path/to/tftpboot/grub.cfg. your grub.cfg should look like this

Set timeout 5

menuentry " genericx86-64" {

    linux image/bzImage root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp

    initrd image/initrd

}

6.       When your device boot, it will download bootx64.efi and the message something like this
>>Start PXE over IPv4.

Station IP address is 192.168.1.1

Server IP address is 192.168.1.2

NBP filename is bootx64.efi

NBP filesize is 1137016 Bytes

Downloading NBP file...

NBP file downloaded successfully.

Please note that I did not use initramfs or initrd as my kernel already have network module build-in. To build your kernel with network module, you need to know which module need to build-in into your kernel. Simply boot your device using *.hhdimg from USB stick. Then check loaded kernel module from your device.
$ lsmod
Find the module something with network. Yes it is a little bit tricky.

Build your kernel in host machine.
$ bitbake virtual/kernel -c menuconfig
A menu will popup and search your kernel module using key "/". Make sure symbol module [*] indicate build-in.
$ bitbake virtual/kernel

You also can create a kernel bundle with initramfs.  Read this https://www.yoctoproject.org/docs/2.5/mega-manual/mega-manual.html#building-an-initramfs-image.
Maybe need to ask someone who are expert on kernel development on how to enable build-in kernel module.


Regards,
Alim Hussin

From: Raymond Yeung [mailto:rksyeung@hotmail.com]
Sent: Friday, April 27, 2018 1:12 AM
To: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com>; yocto@yoctoproject.org
Subject: Re: PXE Boot NFS not working


Follow-up to my previous post, after seeing the reply below suggesting me not to use initramfs (but initrd is usable, right?).  BTW, I don't use bootx64.efi.  Instead, I use pxelinux.0 along with the other lib***.c32 files.



  1.  Is there a way to verify if GRUB (that I'm using) supports networking or not?  It seems to have very limited user commands available.
  2.  How do I get into GRUB?  I'd been into GRUB, more like accidentally.  The reply below refers to grub.cfg.  Is this cfg file stored on target, or on host (like pxelinux.cfg)?
  3.  How do I configure my build (and what yocto tool to use, if any) in order to get my network driver part of kernel, instead of being a LKM that isn't there when I need it for NFS boot?

________________________________
From: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com<mailto:mohamad.noor.alim.hussin@intel.com>>
Sent: Thursday, April 26, 2018 12:26 AM
To: Raymond Yeung; yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Subject: RE: PXE Boot NFS not working


Refer to my post here https://lists.yoctoproject.org/pipermail/yocto/2018-April/040860.html



Don't use initramfs/initrd as it not working.





Regards,

Alim Hussin





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

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

* Re: PXE Boot NFS not working
  2018-04-27  3:30     ` Hussin, Mohamad Noor Alim
@ 2018-04-27  4:43       ` Raymond Yeung
  2018-04-27  6:57         ` Hussin, Mohamad Noor Alim
  0 siblings, 1 reply; 7+ messages in thread
From: Raymond Yeung @ 2018-04-27  4:43 UTC (permalink / raw)
  To: Hussin, Mohamad Noor Alim, yocto

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

Thanks a lot Alim for the detail step-by-step, for both modes.  I'd like to stay with legacy mode with pxelinux.0 for now.  I'm doing pretty much the same as what you described below, with exceptions -


  1.  I'm not using vesamenu.c32.  Instead menu.32 is used, though I don't think that would be an issue.
  2.  I use "kernel image/bzImage" instead of "linux image/bzImage".  Still this shouldn't be an issue.
  3.  With the "append" line, I've a question - what is the significance of the options "hard, tcp, intr"?  I currently don't use them.


Since my last email this morning, I'd made some progress -


  1.  I figured out how to reconfigure the kernel with bitbake menuconfig to change my Ethernet driver from .ko to part of kernel.
  2.  I now have a confusing situation, due to Avahi-daemon in the mix.  PXEBoot would request IP address via DHCP.  Then when this NFS boot runs, it too uses DHCP, and allocates a different IP address.  I suppose this is fine, so long as I've enough IP address to spare.  However, Avahi-daemon also request IP address and get the board yet another IP address.  I've yet to figure out how to turn off Avahi-daemon.  And NFS boot still doesn't work (I don't see the mount point with "df -h").
  3.  Client side uses NFS v4.1 while server side uses v3.  Would this be a problem?  I suppose there must be backward compatibility built into NFS.


Also, in the "Append" line of pxelinux.cfg/default, I add nfsrootdebug.  What sort of NFS debugs should I see?  I only see two NFS logs, and 4 RPC calls.  Is there anyway to turn up the verbosity so I know how NFS client fails?


Until I get some more insights to above, I'd proceed to investigate the other issue - why my kernel initialization would need to wait for any "removable media" indefinitely, and see if I could fix/change this.


Thanks,

Raymond



________________________________
From: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com>
Sent: Thursday, April 26, 2018 8:30 PM
To: Raymond Yeung; yocto@yoctoproject.org
Subject: RE: PXE Boot NFS not working


You are using PXE with legacy BIOS as you use pxelinux.0 . To configure PXE with legacy BIOS follow these instruction

Note: PXE server IP = 192.168.1.2

Target IP = 192.168.1.1



On PXE server

1.       make sure DHCP, NFS & TFTP services are up and running.

2.       change the filename “pxelinux.0”; in /etc/dhcp/dhcpd.conf. Then restart your DHCP service.

3.       Put your kernel to /path/to/tftpboot/image/ and extract your rootfs to /srv/rootfs/.

4.       Create a file in /path/to/tftpboot/pxelinux.cfg/default. The content should like this

include menu.cfg

default vesamenu.c32

prompt 0

timeout 5

label Manual Netboot genericx86-64

menu label Netboot genericx86-64

linux image/bzImage

append root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp



if you want to use PXE with GRUB, bootx64.efi, you need to enable UEFI  instead of legacy BIOS in BIOS configuration. Follow these instruction.

on PXE server

1.       make sure DHCP, NFS & TFTP services are up and running.

2.       change the filename “bootx64.efi”; in /etc/dhcp/dhcpd.conf. Then restart your DHCP service.

3.       Put your kernel to /path/to/tftpboot/image/ and extract your rootfs to /srv/rootfs/.

4.       If you want to get into GRUB,

a.       comment the commands from /path/to/tftpboot/grub/grub.cfg to avoid grub automatically load the kernel from network.

b.      On GRUB, press “TAB” key to list available command. Or you can try use this command

                                                               i.      net_bootp

                                                             ii.      linux (tftp,pxeserverip)/image/bzImage root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp

                                                            iii.      boot

5.       if you want boot automatically to NFS, create a file called grub.cfg in /path/to/tftpboot/grub.cfg. your grub.cfg should look like this

Set timeout 5

menuentry " genericx86-64" {

    linux image/bzImage root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp

    initrd image/initrd

}

6.       When your device boot, it will download bootx64.efi and the message something like this
>>Start PXE over IPv4.

Station IP address is 192.168.1.1

Server IP address is 192.168.1.2

NBP filename is bootx64.efi

NBP filesize is 1137016 Bytes

Downloading NBP file...

NBP file downloaded successfully.



Please note that I did not use initramfs or initrd as my kernel already have network module build-in. To build your kernel with network module, you need to know which module need to build-in into your kernel. Simply boot your device using *.hhdimg from USB stick. Then check loaded kernel module from your device.

$ lsmod

Find the module something with network. Yes it is a little bit tricky.



Build your kernel in host machine.

$ bitbake virtual/kernel –c menuconfig

A menu will popup and search your kernel module using key “/”. Make sure symbol module [*] indicate build-in.

$ bitbake virtual/kernel



You also can create a kernel bundle with initramfs.  Read this https://www.yoctoproject.org/docs/2.5/mega-manual/mega-manual.html#building-an-initramfs-image.

Maybe need to ask someone who are expert on kernel development on how to enable build-in kernel module.





Regards,

Alim Hussin



From: Raymond Yeung [mailto:rksyeung@hotmail.com]
Sent: Friday, April 27, 2018 1:12 AM
To: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com>; yocto@yoctoproject.org
Subject: Re: PXE Boot NFS not working



Follow-up to my previous post, after seeing the reply below suggesting me not to use initramfs (but initrd is usable, right?).  BTW, I don't use bootx64.efi.  Instead, I use pxelinux.0 along with the other lib***.c32 files.



  1.  Is there a way to verify if GRUB (that I'm using) supports networking or not?  It seems to have very limited user commands available.
  2.  How do I get into GRUB?  I'd been into GRUB, more like accidentally.  The reply below refers to grub.cfg.  Is this cfg file stored on target, or on host (like pxelinux.cfg)?
  3.  How do I configure my build (and what yocto tool to use, if any) in order to get my network driver part of kernel, instead of being a LKM that isn't there when I need it for NFS boot?



________________________________

From: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com<mailto:mohamad.noor.alim.hussin@intel.com>>
Sent: Thursday, April 26, 2018 12:26 AM
To: Raymond Yeung; yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Subject: RE: PXE Boot NFS not working



Refer to my post here https://lists.yoctoproject.org/pipermail/yocto/2018-April/040860.html



Don’t use initramfs/initrd as it not working.





Regards,

Alim Hussin





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

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

* "Waiting for Removable Media" hang
  2018-04-26 17:12   ` Raymond Yeung
  2018-04-27  3:30     ` Hussin, Mohamad Noor Alim
@ 2018-04-27  5:56     ` Raymond Yeung
  1 sibling, 0 replies; 7+ messages in thread
From: Raymond Yeung @ 2018-04-27  5:56 UTC (permalink / raw)
  To: yocto

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

I use Krogoth (released 4/2016) Camelback Mountain BSP, trying to do network boot.  Initialization hangs indefinitely with "Waiting for Removable Media".  This is a big issue for us, because we need to deal with the diskless situation.


It looks like this issue was here some 7-8 years ago.  It was deemed fixed then:


http://poky.yoctoproject.narkive.com/2tXZ1euZ/patch-0-1-fix-for-endless-waiting-for-removable-media-problem


Then, in 2016, someone ran into something similar:  https://lists.yoctoproject.org/pipermail/poky/2016-September/010706.html


Anyone knows if this is fixed in later releases (e.g. end of 2017)?


Raymond

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

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

* Re: PXE Boot NFS not working
  2018-04-27  4:43       ` Raymond Yeung
@ 2018-04-27  6:57         ` Hussin, Mohamad Noor Alim
  0 siblings, 0 replies; 7+ messages in thread
From: Hussin, Mohamad Noor Alim @ 2018-04-27  6:57 UTC (permalink / raw)
  To: Raymond Yeung, yocto

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

Regarding to your question on legacy BIOS.

1.       vesamenu.c32 or menu.32 are graphic library to display PXE menu. Normally if you don't provide these files, you will not able to see PXE menu.

2.       Use kernel or linux parameter is depend on your GRUB bootloader command. You can try to load the kernel without initrd/initramfs/rootfs to make sure your kernel able to load from network. After you able to load the kernel, you will hit kernel panic as kernel unable to find rootfs.

3.       3. "hard,tcp,intr" they are nfs parameter. If your server side use nfs v3 the you need to specify "nfsroot=192.168.1.2:/srv/rootfs,nfsvers=3".

4.       Make sure you only have one DHCP service running. If you use router, turn off the DHCP service on your router. Another way just put static IP address for your board in dhcpd.conf. if you want to have another DHCP server running then you need to use proxyDHCP on your PXE server.

a.       Example for configure static IP in DHCP server.

host myboard {

hardware ethernet 00:0A:A1:B2:C3:;

fixed-address 192.168.1.1;

}

5.       Your kernel wait for "removable media"? Are you include initramfs/initrd? Actually you can remove initramfs/initrd if you want to use NFS boot. Can you check LED on Ethernet port. If blink the your network is up. Try to ping to your target device to make sure your network is working.

Regards,
Alim Hussin

From: Raymond Yeung [mailto:rksyeung@hotmail.com]
Sent: Friday, April 27, 2018 12:43 PM
To: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com>; yocto@yoctoproject.org
Subject: Re: PXE Boot NFS not working


Thanks a lot Alim for the detail step-by-step, for both modes.  I'd like to stay with legacy mode with pxelinux.0 for now.  I'm doing pretty much the same as what you described below, with exceptions -



  1.  I'm not using vesamenu.c32.  Instead menu.32 is used, though I don't think that would be an issue.
  2.  I use "kernel image/bzImage" instead of "linux image/bzImage".  Still this shouldn't be an issue.
  3.  With the "append" line, I've a question - what is the significance of the options "hard, tcp, intr"?  I currently don't use them.


Since my last email this morning, I'd made some progress -



  1.  I figured out how to reconfigure the kernel with bitbake menuconfig to change my Ethernet driver from .ko to part of kernel.
  2.  I now have a confusing situation, due to Avahi-daemon in the mix.  PXEBoot would request IP address via DHCP.  Then when this NFS boot runs, it too uses DHCP, and allocates a different IP address.  I suppose this is fine, so long as I've enough IP address to spare.  However, Avahi-daemon also request IP address and get the board yet another IP address.  I've yet to figure out how to turn off Avahi-daemon.  And NFS boot still doesn't work (I don't see the mount point with "df -h").
  3.  Client side uses NFS v4.1 while server side uses v3.  Would this be a problem?  I suppose there must be backward compatibility built into NFS.


Also, in the "Append" line of pxelinux.cfg/default, I add nfsrootdebug.  What sort of NFS debugs should I see?  I only see two NFS logs, and 4 RPC calls.  Is there anyway to turn up the verbosity so I know how NFS client fails?



Until I get some more insights to above, I'd proceed to investigate the other issue - why my kernel initialization would need to wait for any "removable media" indefinitely, and see if I could fix/change this.



Thanks,

Raymond





________________________________
From: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com<mailto:mohamad.noor.alim.hussin@intel.com>>
Sent: Thursday, April 26, 2018 8:30 PM
To: Raymond Yeung; yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Subject: RE: PXE Boot NFS not working


You are using PXE with legacy BIOS as you use pxelinux.0 . To configure PXE with legacy BIOS follow these instruction

Note: PXE server IP = 192.168.1.2

Target IP = 192.168.1.1



On PXE server

1.       make sure DHCP, NFS & TFTP services are up and running.

2.       change the filename "pxelinux.0"; in /etc/dhcp/dhcpd.conf. Then restart your DHCP service.

3.       Put your kernel to /path/to/tftpboot/image/ and extract your rootfs to /srv/rootfs/.

4.       Create a file in /path/to/tftpboot/pxelinux.cfg/default. The content should like this

include menu.cfg

default vesamenu.c32

prompt 0

timeout 5

label Manual Netboot genericx86-64

menu label Netboot genericx86-64

linux image/bzImage

append root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp



if you want to use PXE with GRUB, bootx64.efi, you need to enable UEFI  instead of legacy BIOS in BIOS configuration. Follow these instruction.

on PXE server

1.       make sure DHCP, NFS & TFTP services are up and running.

2.       change the filename "bootx64.efi"; in /etc/dhcp/dhcpd.conf. Then restart your DHCP service.

3.       Put your kernel to /path/to/tftpboot/image/ and extract your rootfs to /srv/rootfs/.

4.       If you want to get into GRUB,

a.       comment the commands from /path/to/tftpboot/grub/grub.cfg to avoid grub automatically load the kernel from network.

b.      On GRUB, press "TAB" key to list available command. Or you can try use this command

                                                               i.      net_bootp

                                                             ii.      linux (tftp,pxeserverip)/image/bzImage root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp

                                                            iii.      boot

5.       if you want boot automatically to NFS, create a file called grub.cfg in /path/to/tftpboot/grub.cfg. your grub.cfg should look like this

Set timeout 5

menuentry " genericx86-64" {

    linux image/bzImage root=/dev/nfs rw nfsroot=192.168.1.2:/srv/rootfs,hard,tcp,intr ip=dhcp

    initrd image/initrd

}

6.       When your device boot, it will download bootx64.efi and the message something like this
>>Start PXE over IPv4.

Station IP address is 192.168.1.1

Server IP address is 192.168.1.2

NBP filename is bootx64.efi

NBP filesize is 1137016 Bytes

Downloading NBP file...

NBP file downloaded successfully.



Please note that I did not use initramfs or initrd as my kernel already have network module build-in. To build your kernel with network module, you need to know which module need to build-in into your kernel. Simply boot your device using *.hhdimg from USB stick. Then check loaded kernel module from your device.

$ lsmod

Find the module something with network. Yes it is a little bit tricky.



Build your kernel in host machine.

$ bitbake virtual/kernel -c menuconfig

A menu will popup and search your kernel module using key "/". Make sure symbol module [*] indicate build-in.

$ bitbake virtual/kernel



You also can create a kernel bundle with initramfs.  Read this https://www.yoctoproject.org/docs/2.5/mega-manual/mega-manual.html#building-an-initramfs-image.

Maybe need to ask someone who are expert on kernel development on how to enable build-in kernel module.





Regards,

Alim Hussin



From: Raymond Yeung [mailto:rksyeung@hotmail.com]
Sent: Friday, April 27, 2018 1:12 AM
To: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com<mailto:mohamad.noor.alim.hussin@intel.com>>; yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Subject: Re: PXE Boot NFS not working



Follow-up to my previous post, after seeing the reply below suggesting me not to use initramfs (but initrd is usable, right?).  BTW, I don't use bootx64.efi.  Instead, I use pxelinux.0 along with the other lib***.c32 files.



  1.  Is there a way to verify if GRUB (that I'm using) supports networking or not?  It seems to have very limited user commands available.
  2.  How do I get into GRUB?  I'd been into GRUB, more like accidentally.  The reply below refers to grub.cfg.  Is this cfg file stored on target, or on host (like pxelinux.cfg)?
  3.  How do I configure my build (and what yocto tool to use, if any) in order to get my network driver part of kernel, instead of being a LKM that isn't there when I need it for NFS boot?



________________________________

From: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com<mailto:mohamad.noor.alim.hussin@intel.com>>
Sent: Thursday, April 26, 2018 12:26 AM
To: Raymond Yeung; yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Subject: RE: PXE Boot NFS not working



Refer to my post here https://lists.yoctoproject.org/pipermail/yocto/2018-April/040860.html



Don't use initramfs/initrd as it not working.





Regards,

Alim Hussin





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

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

end of thread, other threads:[~2018-04-27 14:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26  4:45 PXE Boot NFS not working Raymond Yeung
2018-04-26  7:26 ` Hussin, Mohamad Noor Alim
2018-04-26 17:12   ` Raymond Yeung
2018-04-27  3:30     ` Hussin, Mohamad Noor Alim
2018-04-27  4:43       ` Raymond Yeung
2018-04-27  6:57         ` Hussin, Mohamad Noor Alim
2018-04-27  5:56     ` "Waiting for Removable Media" hang Raymond Yeung

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.