Well spotted Heinrich. I'd hypothesized that something was shutting down the network stack, but didn't yet no where to look, and overlooked grub_net_fini_hw() message! With that hint, I went ahead and tried commenting out[*] the registration of that callback, and voila, the ReadFile2 initramfs loading from TFTP worked:
loader/efi/linux.c:348: Providing initrd via LOAD_FILE2_PROTOCOL
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Exiting boot services...
But I'm not sure of the correct way to address it. Perhaps the kernel's efi stub needs to own network device shutdown to do this properly? I'm happy to bring this discussion up on the mailing list. But, for jammy, seems like disabling ReadFile2 initramfs for !riscv64 would be the safest approach at this point.
Well spotted Heinrich. I'd hypothesized that something was shutting down the network stack, but didn't yet no where to look, and overlooked grub_net_fini_hw() message! With that hint, I went ahead and tried commenting out[*] the registration of that callback, and voila, the ReadFile2 initramfs loading from TFTP worked:
loader/ efi/linux. c:348: Providing initrd via LOAD_FILE2_PROTOCOL INITRD_ MEDIA_GUID device path
EFI stub: Loaded initrd from LINUX_EFI_
EFI stub: Exiting boot services...
But I'm not sure of the correct way to address it. Perhaps the kernel's efi stub needs to own network device shutdown to do this properly? I'm happy to bring this discussion up on the mailing list. But, for jammy, seems like disabling ReadFile2 initramfs for !riscv64 would be the safest approach at this point.
[*] 2.06/grub- core/net/ net.c ======= ======= ======= ======= ======= ======= ======= ======= ==== 2.06.orig/ grub-core/ net/net. c 2.06/grub- core/net/ net.c
Index: grub2-unsigned-
=======
--- grub2-unsigned-
+++ grub2-unsigned-
@@ -1818,11 +1818,11 @@ grub_net_fini_hw (int noreturn __attribu
return GRUB_ERR_NONE;
}
-static grub_err_t restore_ hw (void)
+/*static grub_err_t
grub_net_
{
return GRUB_ERR_NONE;
-}
+ }*/
static int search_ through (char *config, char *suffix,
grub_config_
@@ -2048,9 +2048,9 @@ GRUB_MOD_INIT(net)
grub_dns_init ();
grub_net_open = grub_net_open_real; register_ preboot_ hook (grub_net_fini_hw, register_ preboot_ hook (grub_net_fini_hw,
grub_net_ restore_ hw, PREBOOT_ HOOK_PRIO_ DISK); PREBOOT_ HOOK_PRIO_ DISK);* / net_poll_ cards_idle = grub_net_ poll_cards_ idle_real;
- fini_hnd = grub_loader_
+ /* fini_hnd = grub_loader_
- GRUB_LOADER_
+ GRUB_LOADER_
grub_
#ifdef GRUB_MACHINE_EFI