Hi Chris,
How does Grub know where the tftp server is? To get the rest of the files. How does it figure out what the tftp server address is ?
Actually GRUB uses UEFI network services to communicate with TFTP server. UEFI knows about TFTP server when obtains network information via DHCP. DHCP config file (at sever) has "next-server" parameter, which is exactly PXE (TFTP) server IP address.
List of files to obtain taken from "grub.cfg" file (downloaded by GRUB from server).
Did all those things but still end up at grub prompt.
Which architecture do you use? ARMv7 or ARMv8? If ARMv8, try to build GRUB w/o "linux" module (grub-mkimage w/o "linux" module).
Also pay your attention to "-p" option in "grub-mkimage" command. It's prefix directory of TFTP server, it should be correct. For example: - your files (grub.efi, grub.cfg) are placed in "/var/lib/tftpboot/efi/ directory - your "/etc/xinetd.d/tftp" file has parameter: server_args = /var/lib/tftpboot - your "/etc/default/tftpd-hpa" file has parameter: TFTP_DIRECTORY="/var/lib/tftpboot" - "-p" option for "grub-mkimage" has value of "efi"
Also make sure that "tftp" and "efinet" GRUB modules are in place.
Also I can advice is use Wireshark to see how TFTP packets are exchanging between GRUB and your TFTP server, maybe it will shed some light on this issue. I had the same problem back in times, but it was like 1 year ago and I don't remember all details. But my procedure described at Linaro wiki you are using was working for me great.
Basically, if you have exactly the same setup as described in my wiki page -- it should work. The only reasons it doesn't work are: 1. you have different setup. in this case you should figure out difference by you own 2. some stuff was updated (GRUB, UEFI) or use just use different repos, and some options should be changed too. I don't think that's the case though.
How does Grub know that it is in network boot mode ? How does it differentiate between being loaded from hard disk or from
network ?
I'm not 100% sure how it works (I think one need to look into GRUB sources to figure out), but here is 2 possible way how it works:
1. GRUB first try to look to hard drive for grub.cfg, if it's not found -- look at TFTP. 2. GRUB itself loaded from TFTP server, so it knows this way it should look for grub.cfg at TFTP.
Anyway, in setup described at Linaro wiki, GRUB does look for grub.cfg at TFTP server. You can see it in TFTP packets using Wireshark.
On 23 August 2014 03:55, Chris Cuthbert nd6969@hotmail.com wrote:
Hi Sam,
Did all those things but still end up at grub prompt. How does Grub know that it is in network boot mode ? How does it differentiate between being loaded from hard disk or from network ? How does it figure out what the tftp server address is ? Thanx,
Date: Fri, 22 Aug 2014 16:39:06 +0300
Subject: Re: [Linaro-uefi] UEFI PXE Boot Error From: semen.protsenko@linaro.org To: nd6969@hotmail.com CC: linaro-uefi@lists.linaro.org
Chris,
The whole sequence is described here: https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/UEFI_Network_Booting#Syn...
So GRUB should download grub.cfg file from your PC by itself (via TFTP protocol). "grub.cfg" file can be obtained by TFTP, so you should have "tftpd-hpa" server running on your PC and have "grub.cfg" file at "/var/lib/tftpboot/efi/" path. Check also that your TFTPD config file ("/etc/default/tftpd-hpa") has next entry: TFTP_DIRECTORY="/var/lib/tftpboot". And last thing: you should have xinetd configured (like it's described here: https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/UEFI_Network_Booting#xin...) and running on your machine as it's in charge of spawning TFTPD service.
On 21 August 2014 22:15, Chris Cuthbert nd6969@hotmail.com wrote:
Hi Sam,
I was able to get past this DHCP server issue but now I am stuck at GRUB2. From the wiki, it seems like when UEFI PXE boot gets the "efi/grub.efi" file and executes it, grub is then supposed to get the grub.cfg file to offer a grub menu to the user. In my case, I always end up at grub prompt and there is no grub menu showing the linux kernel. I am using GNU GRUB v2.02-beta2. When I look at my tcpdump, I don't see grub even attempting to read the grub.cfg file.
Any idea if grub is supposed to fetch the grub.cfg automatically ? Why it might not be doing it ? Thanx,
Welcome to GRUB!
GNU GRUB version 2.02~beta2
Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.
grub>
Date: Wed, 20 Aug 2014 17:11:49 +0300 Subject: Re: [Linaro-uefi] UEFI PXE Boot Error From: semen.protsenko@linaro.org To: nd6969@hotmail.com CC: linaro-uefi@lists.linaro.org
Chris,
Last time I tried UEFI PXE boot everything was working fine. Maybe ISC DHCP server was updated and changed it's behavior or you having some hardware specific issues.
Anyway, we need to know some details about your setup in order to help you:
- Linux distro and version
- DHCP server (package name and version)
- hardware details (board, SoC)
- UEFI repo (link) and branch (or tag, or commit)
On 19 August 2014 18:18, Chris Cuthbert nd6969@hotmail.com wrote:
Hi All,
I have been trying to PXE boot my ARM system using the steps in this wiki, https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/UEFI_Network_Booting, without success. If I configure the DHCP server as suggested, I get error saying that the packet does not have any information for PXE boot. If I add the "option vendor-identifier-class "PXEClient"" to the configuration, UEFI complains that there are no offers. I can see that DHCP server is replying back to the request. Tcpdump of the packet exchange below. Any idea on how I can get past this ? Thanx,
20:18:55.756473 12:12:12:12:12:12 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 389: 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 12:12:12:12:12:12 (oui Unknown), length 347 0x0000: ffff ffff ffff 1212 1212 1212 0800 4500 ..............E. 0x0010: 0177 c1ec 0000 4011 b78a 0000 0000 ffff .w....@......... 0x0020: ffff 0044 0043 0163 1960 0101 0600 64ab ...D.C.c.`....d. 0x0030: c1eb 0000 8000 0000 0000 0000 0000 0000 ................ 0x0040: 0000 0000 0000 1212 1212 1212 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0110: 0000 0000 0000 6382 5363 3501 0139 0205 ......c.Sc5..9.. 0x0120: c037 2301 0203 0405 060c 0d0f 1112 1617 .7#............. 0x0130: 1c28 292a 2b32 3336 3a3b 3c42 4361 8081 .()*+236:;<BCa.. 0x0140: 8283 8485 8687 6111 0000 0000 0000 0000 ......a......... 0x0150: 0000 0000 0000 0000 005e 0301 0300 5d02 .........^....]. 0x0160: 000b 3c20 5058 4543 6c69 656e 743a 4172 ..<.PXEClient:Ar 0x0170: 6368 3a30 3030 3131 3a55 4e44 493a 3030 ch:00011:UNDI:00 0x0180: 3330 3030 ff 3000. 20:18:55.756593 ba:b7:60:68:d6:22 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: 172.25.17.100.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 300 0x0000: ffff ffff ffff bab7 6068 d622 0800 4510 ........`h."..E. 0x0010: 0148 0000 0000 8011 7c18 ac19 1164 ffff .H......|....d.. 0x0020: ffff 0043 0044 0134 2387 0201 0600 64ab ...C.D.4#.....d. 0x0030: c1eb 0000 8000 0000 0000 ac19 1165 0a12 .............e.. 0x0040: 6836 0000 0000 1212 1212 1212 0000 0000 h6.............. 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0090: 0000 0000 0000 6566 692f 6772 7562 2e65 ......efi/grub.e 0x00a0: 6669 0000 0000 0000 0000 0000 0000 0000 fi.............. 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0110: 0000 0000 0000 6382 5363 3501 0236 04ac ......c.Sc5..6.. 0x0120: 1911 6433 0400 00a8 c001 04ff ffff 003a ..d3...........: 0x0130: 0400 0054 603b 0400 0093 a83c 0950 5845 ...T`;.....<.PXE 0x0140: 436c 6965 6e74 ff00 0000 0000 0000 0000 Client.......... 0x0150: 0000 0000 0000 ......
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-uefi