1

When boot a UEFI machine with bootx64.efi(and grubx64.efi in turn) via appropriate DHCP configuration, is it possible to config the grub.cfg with http linux kernel like the following?

menuentry 'xxx' {
    linux  http://11.11.11.11/images/ubuntu/amd64/generic/bionic/daily/boot-kernel ...
    initrd http://11.11.11.11/images/ubuntu/amd64/generic/bionic/daily/boot-initrd
}

EDIT: I have done a test, turns out at least my version of the grubx64.efi does not support http kernel path. Maybe I need regenerate a grubx64.efi with network support.

2

1 Answer 1

1

I think the GRUB HTTP syntax would be like this:

menuentry 'xxx' {
    linux  (http,11.11.11.11)/images/ubuntu/amd64/generic/bionic/daily/boot-kernel ...
    initrd (http,11.11.11.11)/images/ubuntu/amd64/generic/bionic/daily/boot-initrd
}

However, you should realize that GRUB may be relying on the network support of the UEFI firmware at that point. To support boot over HTTP, the firmware needs to support UEFI specification version 2.5 or greater.

If you don't specifically need GRUB for some reason, I would recommend using the iPXE bootloader for UEFI network boot purposes: it is more network-oriented than GRUB and has documented the way to use HTTP for UEFI booting. It's also updated frequently to work around the quirks of various hardware/firmware.

6
  • cool! let me try, I can not imagine this syntax without your answer.
    – osexp2000
    Feb 8, 2021 at 6:33
  • does it support (http,11.11.11.11:8080) ? the gnu.org/software/grub/manual/grub/grub.html#Device-syntax does not describe how to set custom port number.
    – osexp2000
    Feb 8, 2021 at 7:52
  • Unfortunately it looks like the port number in GRUB HTTP code is specified as a constant HTTP_PORT which is defined simply as 80 and not configurable. So it looks like the answer is "no" at least for now.
    – telcoM
    Feb 8, 2021 at 8:14
  • iPXE seems to allow specifying port numbers, as it accepts regular URLs and the source code seems to include parsing the port number from the URLs, at a quick glance.
    – telcoM
    Feb 8, 2021 at 8:29
  • 1
    :D I have tested that (http,11.11.11.11:8080) works!
    – osexp2000
    Feb 8, 2021 at 9:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .