-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using Shim (at least) 15.8 and DHCP Option 67 with non-Microsoft DHCP server #710
Comments
As you know, DHCP OFFER or ACK option 66 and 67 will provide the exact shim.efi location. To make sure IPFire DHCP server can generate the correct option 67, would you please capture and show the content of option 67 by using Wireshark(for example) when sending OFFER or ACK message out ? Typically grub.efi located in the same directory where shim.efi resides. |
In your Wireshark, the Read Request(line 109) of TFTP reveals that the option 67 in OFFER message sent from IPFire server has successfully received and offered the subfolder |
No, the firmware is the same. Also, many of our customers run into this problem after updating to the new shim version and they using the same environment as before. Same hardware and so on. So, we think that this is a bug in shim and not a problem with firmware as "all" firmware seems to behaves like this. This is the case in VMs and on hardware. |
@dennis-tseng99 Perhaps, I can clarify this by provide you this snippets. When the bootfilename is empty, as in the screenshot shown, the grub is requested in the wrong directory. It should be requested in the directory given in the option 67. When we set the bootfilename explicitly in the header with the same value as option 67, shim will request the grub correctly. Can you confirm that this is a bug in the shim or by design? |
@MarkusSpier Some DHCP clients can work with opt-67 correctly, but some legal clients do NOT conform the DHCP standard who only read boot file name(BOOTP header) and skip option 67, specific in grub2:
For debug purpose, you could print ImagePath and PathName in read_image() to make sure shim can get the correct opt-67 to get grub. |
When attempting to boot Shim version 15.8 via DHCP and Option 67, an error occurs. In conjunction with a non-Microsoft DHCP server, the path is set incorrectly.
For example, if you set the path in Option 67 to: <some_directory>\shim_x64.efi so that it should look for grub2 in a subfolder, an error occurs. Grub2 is incorrectly requested directly from the root directory without the subfolder.
The error seems to occur because, with Option 67 set, the filename from the header is still used. If this is empty, subsequent requests are always made without the subfolder!
Since Microsoft DHCP apparently also sets the header by default when setting Option 67, this error is not observed here. However, if you use, for example, IPFire DHCP and only set Option 67 (here "option bootfile-name"), the header (here "filename") remains empty.
Actually, Shim should use the path set in Option 67 and not the one from the header in this scenario!
This error does not occur in an older version (15.4). It must have been introduced between 15.4 and 15.8.
Is this error known and will it be fixed in the next version?
Example in Microsoft DHCP:
Example in IPFire DHCP:
If you set here only the option 67, the error occurs. If you set also the header (filename) it works (like in this image)
The text was updated successfully, but these errors were encountered: