Bug#1016873: grub2: enable "http" module for netboot
Ansgar
ansgar at debian.org
Mon Aug 8 17:54:41 BST 2022
Source: grub2
Version: 2.06-3
Severity: normal
Control: found -1 2.04-20
Hi,
I'm trying to netboot Debian via HTTP (on UEFI). grub2 seems to not
find its grub.cfg and the http server does not see any tried to
download it either.
I only get the grub rescue shell and running "set" shows no network
configurations (no net_* variables are set to something meaningful,
unlike when booting via PXE).
I tried with grubnetx64.efi.signed from both stable and
testing/unstable, chainloaded via shimx64.efi.signed.
Ubuntu's grub has at least the following changes which seem related:
+---
| grub2 (2.06-2ubuntu1) jammy; urgency=medium
| * Merge from Debian unstable; remaining changes:
| [...]
| - build-efi-images: Add http to netboot images
| [...]
| - Added patches:
| [...]
| + rhboot-f34-efinet-also-use-the-firmware-acceleration-for-http.patch
+---
The first change should be adding "http" to NET_MODULES in "build-efi-images":
+---
| NET_MODULES="$CD_MODULES
| http
| tftp
| "
+---[ debian/build-efi-images ]
This seems generally useful even when not booting via http.
I'm not sure if the second patch is relevant and what its upstream
status is, but I've attached it
(rhboot-f34-efinet-also-use-the-firmware-acceleration-for-http.patch
extracted from grub2_2.06-2ubuntu7.dsc). It seems to change various
`net_ls_*` commands to use the EFI version of the command when booted
over http (instead of only when booted over https and opa).
It would be nice if http boot worked.
Ansgar
-------------- next part --------------
From: Peter Jones <pjones at redhat.com>
Date: Mon, 30 Jul 2018 14:06:42 -0400
Subject: efinet: also use the firmware acceleration for http
Signed-off-by: Peter Jones <pjones at redhat.com>
Patch-Name: rhboot-f34-efinet-also-use-the-firmware-acceleration-for-http.patch
---
grub-core/net/efi/net.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grub-core/net/efi/net.c b/grub-core/net/efi/net.c
index 9b7a218..b2fe4db 100644
--- a/grub-core/net/efi/net.c
+++ b/grub-core/net/efi/net.c
@@ -1336,7 +1336,9 @@ grub_efi_net_boot_from_https (void)
&& (subtype == GRUB_EFI_URI_DEVICE_PATH_SUBTYPE))
{
grub_efi_uri_device_path_t *uri_dp = (grub_efi_uri_device_path_t *) dp;
- return (grub_strncmp ((const char*)uri_dp->uri, "https://", sizeof ("https://") - 1) == 0) ? 1 : 0;
+ grub_dprintf ("efinet", "url:%s\n", (const char *)uri_dp->uri);
+ return (grub_strncmp ((const char *)uri_dp->uri, "https://", sizeof ("https://") - 1) == 0 ||
+ grub_strncmp ((const char *)uri_dp->uri, "http://", sizeof ("http://") - 1) == 0);
}
if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp))
More information about the Pkg-grub-devel
mailing list