From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 6AA55E008D2; Thu, 26 Apr 2018 20:36:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id E17F6E00823 for ; Thu, 26 Apr 2018 20:36:49 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2018 20:36:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,333,1520924400"; d="scan'208,217";a="36534946" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by orsmga007.jf.intel.com with ESMTP; 26 Apr 2018 20:36:46 -0700 Received: from pgsmsx107.gar.corp.intel.com ([169.254.7.161]) by PGSMSX103.gar.corp.intel.com ([169.254.2.142]) with mapi id 14.03.0319.002; Fri, 27 Apr 2018 11:30:50 +0800 From: "Hussin, Mohamad Noor Alim" To: Raymond Yeung , "yocto@yoctoproject.org" Thread-Topic: PXE Boot NFS not working Thread-Index: AQHT3RibB3SjOiqCJ0iFNIV79C8ZUKQSpG5AgACjeVWAAHvGQA== Date: Fri, 27 Apr 2018 03:30:49 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmJhMzdhMzUtNzRlMC00MDM5LWIxNmUtZTEyYmQ1YTMxZWQwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiIrbDdpY1dvUHB2QlJWOHhacjN6OGpkYlJEdWt4cTR2NkJHaTRRVUNxNE9UakduRnBueDBQMWJIUThUeUlqY1dpIn0= x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.206] MIME-Version: 1.0 Subject: Re: PXE Boot NFS not working X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2018 03:36:54 -0000 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_A05DCA0C0293664FB237A9C4B0E55E4601515B9EPGSMSX107garcor_" --_000_A05DCA0C0293664FB237A9C4B0E55E4601515B9EPGSMSX107garcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 =3D 192.168.1.2 Target IP =3D 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 re= start your DHCP service. 3. Put your kernel to /path/to/tftpboot/image/ and extract your rootf= s to /srv/rootfs/. 4. Create a file in /path/to/tftpboot/pxelinux.cfg/default. The conte= nt 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=3D/dev/nfs rw nfsroot=3D192.168.1.2:/srv/rootfs,hard,tcp,intr i= p=3Ddhcp if you want to use PXE with GRUB, bootx64.efi, you need to enable UEFI ins= tead 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 r= estart your DHCP service. 3. Put your kernel to /path/to/tftpboot/image/ and extract your rootf= s 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=3D/dev/nfs rw nfsroot=3D192.168.1.2:= /srv/rootfs,hard,tcp,intr ip=3Ddhcp iii. boot 5. if you want boot automatically to NFS, create a file called grub.c= fg in /path/to/tftpboot/grub.cfg. your grub.cfg should look like this Set timeout 5 menuentry " genericx86-64" { linux image/bzImage root=3D/dev/nfs rw nfsroot=3D192.168.1.2:/srv/rootf= s,hard,tcp,intr ip=3Ddhcp initrd image/initrd } 6. When your device boot, it will download bootx64.efi and the messag= e 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 hav= e network module build-in. To build your kernel with network module, you ne= ed 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 sy= mbol 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-initramf= s-image. Maybe need to ask someone who are expert on kernel development on how to en= able 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 ; yocto@y= octoproject.org Subject: Re: PXE Boot NFS not working Follow-up to my previous post, after seeing the reply below suggesting me n= ot to use initramfs (but initrd is usable, right?). BTW, I don't use bootx= 64.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 o= rder to get my network driver part of kernel, instead of being a LKM that i= sn't there when I need it for NFS boot? ________________________________ From: Hussin, Mohamad Noor Alim > 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-A= pril/040860.html Don't use initramfs/initrd as it not working. Regards, Alim Hussin --_000_A05DCA0C0293664FB237A9C4B0E55E4601515B9EPGSMSX107garcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

Note: PXE server IP = =3D 192.168.1.2

Target IP =3D 192.168.= 1.1

 

On PXE server

1.&n= bsp;      make sure DHCP= , NFS & TFTP services are up and running.

2.&n= bsp;      change the fil= ename “pxelinux.0”; in /etc/dhcp/dhcpd.conf. Then restart your = DHCP service.

3.&n= bsp;      Put your kerne= l to /path/to/tftpboot/image/ and extract your rootfs to /srv/rootfs/.=

4.&n= bsp;      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=3D/dev/nfs rw nfsroot=3D192.168.1.2:/srv/rootfs,ha= rd,tcp,intr ip=3Ddhcp

 

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

on PXE server

1.&n= bsp;      make sure DHCP= , NFS & TFTP services are up and running.

2.&n= bsp;      change the fil= ename “bootx64.efi”; in /etc/dhcp/dhcpd.conf. Then restart your= DHCP service.

3.&n= bsp;      Put your kerne= l to /path/to/tftpboot/image/ and extract your rootfs to /srv/rootfs/.=

4.&n= bsp;      If you want to= get into GRUB,

a. &nbs= p;     comment the co= mmands from /path/to/tftpboot/grub/grub.cfg to avoid grub automatically loa= d the kernel from network.

b. &nbs= p;    On GRUB, press= “TAB” key to list available command. Or you can try use this c= ommand

  =             &nb= sp;            =             &nb= sp;            =            i.  = ;    net_bootp

  =             &nb= sp;            =             &nb= sp;            =          ii. &nbs= p;    linux (tftp,pxeserverip)/image/bzImage root=3D/dev/nfs rw nfsroot=3D= 192.168.1.2:/srv/rootfs,hard,tcp,intr ip=3Ddhcp

  =             &nb= sp;            =             &nb= sp;            =         iii. &nb= sp;    boot

5.&n= bsp;      if you want bo= ot 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=3D/dev/nfs rw nfsr= oot=3D192.168.1.2:/srv/rootfs,hard,tcp,intr ip=3Ddhcp

    initrd image/initrd

}

6.       When yo= ur 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 y= our device using *.hhdimg from USB stick. Then check loaded kernel module f= rom your device.

$ lsmod

Find the module someth= ing with network. Yes it is a little bit tricky.

 

Build your kernel in h= ost machine.

$ bitbake virtual/kern= el –c menuconfig

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

$ bitbake virtual/kern= el

 

You also can create a = kernel bundle with initramfs.  Read this https://www.yoctopro= ject.org/docs/2.5/mega-manual/mega-manual.html#building-an-initramfs-image<= /span>.

Maybe need to ask some= one who are expert on kernel development on how to enable build-in kernel m= odule.

 

 

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

 

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

<= o:p> 

  1. Is there a way t= o verify if GRUB (that I'm using) supports networking or not?  It seem= s to have very limited user commands available.
  2. How do I get int= o GRUB?  I'd been into GRUB, more like accidentally.  The reply b= elow refers to grub.cfg.  Is this cfg file stored on target, or o= n host (like pxelinux.cfg)?
  3. How do I configu= re 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?

 <= /p>


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.yoctopro= ject.org/pipermail/yocto/2018-April/040860.html

 <= /span>

Don’t use initr= amfs/initrd as it not working.

 <= /span>

 <= /span>

Regards,

Alim Hussin

 <= /span>

 

--_000_A05DCA0C0293664FB237A9C4B0E55E4601515B9EPGSMSX107garcor_--