<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Thanks William.  I think I need to backtrack at least 1 step from the files used.  I've been stuck at tftp of 1st stage boot loader (e.g. pxelinux.0, or grub).  If I set it up to use pxelinux.0, on client side, I only
 saw successful download of this file, and then it failed due to "Boot option loading failed".  On the server side, I didn't see any more access beyond this tftp.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">If I set it up to use bootx64.efi, I could see the client side boot to grub and then got stuck there.  Again, no further activity on server side beyond such tftp.  The client side doesn't seem to even come back for more
 files (e.g. the pxelinux.cfg/default).  Below is my /etc/dhcp/dhcpd.conf.  Please someone review to see if I did something wrong.  The DHCP server has 192.168.1.1 IP address, same as TFTP server; they both are on the same machine.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p><span style="font-family: "Courier New", monospace;">authoritative;</span></p>
<p><span style="font-family: "Courier New", monospace;">allow booting;</span></p>
<p><span style="font-family: "Courier New", monospace;">allow bootp;</span></p>
<p><span style="font-family: "Courier New", monospace;">default-lease-time 3600;</span></p>
<p><span style="font-family: "Courier New", monospace;">max-lease-time 7200;</span></p>
<p><br>
</p>
<p><span style="font-family: "Courier New", monospace;">subnet 192.168.1.0 netmask 255.255.255.0 {</span></p>
<p><span style="font-family: "Courier New", monospace;">  range 192.168.1.10 192.168.1.20;</span></p>
<p><span style="font-family: "Courier New", monospace;">  next-server 192.168.1.1;</span></p>
<p><span style="font-family: "Courier New", monospace;">#  filename "pxelinux.0";</span></p>
<p><span style="font-family: "Courier New", monospace;">  filename "bootx64.efi";</span></p>
<p><span style="font-family: "Courier New", monospace;">}</span></p>
<p><br>
</p>
<p><span style="font-family: "Courier New", monospace;">option space PXE;</span></p>
<p><span style="font-family: "Courier New", monospace;">option PXE.discovery-control code 6 = unsigned integer 8;</span></p>
<p><br>
</p>
<p><span style="font-family: "Courier New", monospace;">class "PXE" {</span></p>
<p><span style="font-family: "Courier New", monospace;">#   match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";  </span><br>
</p>
<p><span style="font-family: "Courier New", monospace;">    option vendor-class-identifier "PXEClient";</span><br>
</p>
<p><span style="font-family: "Courier New", monospace;">    option tftp-server-name "192.168.1.1";</span><br>
</p>
<p><span style="font-family: "Courier New", monospace;">    option bootfile-name "bootx64.efi";</span><br>
</p>
<p><span style="font-family: "Courier New", monospace;">    vendor-option-space PXE;</span></p>
<p><span style="font-family: "Courier New", monospace;">    option PXE.discovery-control 11;</span></p>
<p><span style="font-family: "Courier New", monospace;">}</span></p>
<p><br>
</p>
<p>Thanks,</p>
<p>Raymond</p>
<p><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> William Mills <wmills@ti.com><br>
<b>Sent:</b> Thursday, April 19, 2018 1:56 PM<br>
<b>To:</b> Raymond Yeung; yocto@yoctoproject.org<br>
<b>Subject:</b> Re: [yocto] Linux Files needed for PXE network boot</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Robert,<br>
<br>
I assume no one responded to you because you did not supply enough<br>
information to understand your situation.  (You don't specify what HW<br>
you are using, version of Yocto Project, what DHCP server, etc.)<br>
<br>
>From the second message I can tell you are using a X86_64 based<br>
platform.  Is this a commercial PC or a developer board (Minnow etc)?<br>
<br>
If I were you I would focus on the UEFI mode as you are closer there.<br>
<br>
I am not an X86 UEFI expect but ...<br>
<br>
<br>
On 04/18/2018 09:38 PM, Raymond Yeung wrote:<br>
> Another thing I haven't tried is to set up NFS.  Can we simply specify<br>
> ONE file (similar to .hddimg) that could be tftp over to target, and<br>
> expect it to boot up?  Could this be the cause of my problem?<br>
><br>
<br>
Yes, Grub should be able to go back to the TFTP server to get more files.<br>
<br>
Alternatively, yes, it is possible (but a bit ugly) to create one file<br>
for the TFTP server that has everything.<br>
<br>
It has been 4 years ago now but I did play with Minnow board UEFI and<br>
GRUB via netboot.<br>
<br>
What I got working was a single fat Grub binary with kernel and initram<br>
disk included.  I did this because the UEFI on minnow at that time had<br>
trouble using the ethernet from grub but could reliably transfer a large<br>
file before the handoff.  I would hope this is now fixed on minnow and<br>
commercial PCs would not have this issue.<br>
<br>
Anyway if you want to see what I did the files are here:<br>
<a href="http://arago-project.org/files/short-term/misc/make-netbootia32.tar.bz2" id="LPlnk857112" previewremoved="true">http://arago-project.org/files/short-term/misc/make-netbootia32.tar.bz2</a><br>
<br>
I would not recommend using these binaries (They are 32bit UEFI and old)<br>
but you can see what I did looking at the README.txt file.<br>
<br>
> <br>
> <br>
> ------------------------------------------------------------------------<br>
> *From:* Raymond Yeung <rksyeung@hotmail.com><br>
> *Sent:* Wednesday, April 18, 2018 6:33 PM<br>
> *To:* yocto@yoctoproject.org<br>
> *Subject:* Re: Linux Files needed for PXE network boot<br>
>  <br>
> <br>
> I've yet to receive any response to my post below.  I've gone through<br>
> fair amount of experimentation to get my board downloaded successfully<br>
> the first-stage boot loader.  I'd tried pxelinux.0 for legacy BIOS and<br>
> bootx64.efi (also generated in build process) to work with UEFI on<br>
> client side.  However, no luck going any further so far.  Debugging the<br>
> client side is rather cryptic (black box).<br>
> <br>
> <br>
> I'm just wondering if it's because of a missing kick-start file<br>
> (ks.conf)?  I've tried "kernel images/<kernel>.hddimg" (was careful in<br>
> specifying the path relative /tftpboot root directory), also<br>
> bzImage.bin, and the combo of vmlinuz + initrd files.  Neither one of<br>
> the works so far.  When I tried UEFI with bootx64.efi, the client side<br>
> stops at GRUB, complaining "error: no such device:<br>
> ()/EFI/BOOT/grub.cfg."  When I tried legacy BIOS with pxelinux.0, I got<br>
> "PXE-E16: No offer received.  ERROR: Boot option loading failed".<br>
> <br>
> <br>
> Any idea anyone?<br>
> <br>
> <br>
<br>
I believe the () in ()/EFI/BOOT/grub.cfg should have been (tftp) to make<br>
grub go back to the TFTP server for the config file.  Something is not<br>
right in your setup or UEFI to Grub hand-off.  Can you get a Grub shell<br>
prompt?  If so you should be able to debug from there.<br>
<br>
Again see the README.txt in the file I referenced above.  It shows how I<br>
configured grub.<br>
<br>
> <br>
> ------------------------------------------------------------------------<br>
> *From:* Raymond Yeung <rksyeung@hotmail.com><br>
> *Sent:* Monday, April 16, 2018 12:42 PM<br>
> *To:* yocto@yoctoproject.org<br>
> *Subject:* Linux Files needed for PXE network boot<br>
>  <br>
> I've a .hddimg image bootable from USB thumb drive.  As part of the<br>
> boot-up, I also could invoke "Serial Install" to transfer such an image<br>
> to SSD, such that in the next round, I could boot from SSD instead.<br>
> <br>
> What are the files and where do I get them (relative to where I find<br>
> .hddimg) from the build tree, and install them on the tftp server, in<br>
> order to support PXE network booting?  Also, what mechanism do people<br>
> use to transfer this after PXE boot into the SSD, making it bootable?<br>
> <br>
> Raymond<br>
> <br>
> <br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>