Error when using Shim (at least) 15.8 and DHCP Option 67 with non-Microsoft DHCP server
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with Shim 15.8 using a non-Microsoft DHCP server that sets only DHCP Option 67, then compare it with version 15.4 and a configuration that also sets the filename header. Done means the path from Option 67 is retained when the header is empty, including the subfolder for the grub2 request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100