pxeboot using HTTP, not httpBoot

i have VMs that i want to use with UEFI, and i am trying to use HTTP to download the kernel and initrd. i get the error in the attached screenshot.

for BIOS based pxeboot, i specify lpxelinux.0 as the boot file in DHCP, which adds the ability to pull down the kernel and initrd using HTTP in the grub config. the lpxelinux.0 version of the boot file is different than the pxelinux.0, and HTTP is one of the extended capabilities.

an example BIOS pxeboot menu option to liveboot using HTTP:
Code:
LABEL httpboot
  MENU LABEL Fedora Live Boot via ^HTTP
  KERNEL http://www.bpk2.com/httpBoot/vmlinuz
  INITRD http://www.bpk2.com/httpBoot/initrd.img
  APPEND root=live:http://www.bpk2.com/F42wks/LiveOS/squashfs.img boot=live rd.live.image quiet rd.luks=0 rd.md=0 rd.dm=0 ip=dhcp vga=795
with UEFI, the boot file is bootx64.efi which seems to have issues or constraints around using HTTP to download the kernel and initrd.

an example UEFI pxeboot menu option to live boot using HTTP:
Code:
menuentry 'Live Boot Fedora 42 via HTTP' --class fedora --class gnu-linux --class gnu --class os {
        linux http://www.bpk2.com/httpBoot/vmlinuz root=live:http://www.bpk2.com/F42wks/LiveOS/squashfs.img boot=live rd.live.image quiet rd.luks=0 rd.md=0 rd.dm=0 ip=dhcp
        initrd http://www.bpk2.com/httpBoot/initrd.img
}
it does not matter if i use linux/initrd or linuxefi/initrdefi to specify the HTTP url to get the kernel and initrd from, they both wind up with the error shown. is there a way to use HTTP to download the kernel and initrd?

note, this is not true httpBoot, as it does still use TFTP for the grub menu, etc, but it does really speed up PXE booting by using HTTP and not TFTP for the kernel and initrd downloads. separately, i am working on a true httpBoot setup, but not everything supports httpBoot, and i still have a learning curve to accomplish on getting that all setup. in the meantime, liveboot and builds using PXE and HTTP would be done a lot faster if i can get this working. any ideas?
Screenshot from 2026-12-04 09-41-16.png
 
I don't have anything specific to offer, sorry, but can you chain-load from that PXE to iPXE (https://ipxe.org/docs) and have that do the download for you? really odd that whatever UEFI is shipping with your VM host is having trouble but if these were physical boxes I'd not trust the firmware and instead boot to iPXE and then have that do stuff for you.

At the very least it's something that you can compare against what you already have and perhaps even unblock you /shrug
 

Andrey Petrov

Smack-Fu Master, in training
4
Your screenshot says the download itself worked. "big file signature isn't implemented yet" comes from GRUB's verifier code, and it fires when GRUB has opened the file but doesn't know how big it is. Over HTTP that size comes from the Content-Length header. If the server sends Transfer-Encoding: chunked instead, the size stays unknown. And if I remember the parser right, GRUB matches "Content-Length: " case-sensitively, so a proxy that lowercases headers has the same effect.

The verifiers only step in when something wants to check the kernel: shim under Secure Boot, and I think also a TPM if the VM has one. lpxelinux on BIOS does neither, which would explain why the same URLs work there.

Quick check: curl -sI the vmlinuz URL and look at the headers. No Content-Length means something is streaming the file, like a reverse proxy, on-the-fly compression, or an app serving the directory. Plain static files from nginx or Apache send it. For a fast A/B test, turn Secure Boot off in the VM's firmware. If it boots then, that's your answer.

The "load the kernel first" line is only the initrd command failing after linux did.
 
  • Like
Reactions: continuum
@Andrey Petrov for the win!!!

i am running HAProxy to load balance my web servers, and it was in fact lower case transforming the headers. i do also run Squid proxies, but they do not do this, and i dont proxy traffic to my own network. for HAProxy, i wound up adding some directives in the config:
Code:
global
...
   h1-case-adjust content-length Content-Length

defaults
...
   option h1-case-adjust-bogus-client
this tells HAProxy to serve those headers in the case sensitivity that i dictate.

this case sensitivity issue in the parser seems to violate the HTTP/2 standard. is this a "bug" that should be opened?
 
oh, and i forgot to mention that using HTTP requires some syntax changes in the pxeboot menu. this
Code:
menuentry 'Live Boot Fedora 42 via HTTP' --class fedora --class gnu-linux --class gnu --class os {
        linux http://www.bpk2.com/httpBoot/vmlinuz root=live:http://www.bpk2.com/F42wks/LiveOS/squashfs.img boot=live rd.live.image quiet rd.luks=0 rd.md=0 rd.dm=0 ip=dhcp
        initrd http://www.bpk2.com/httpBoot/initrd.img
}
becomes:
Code:
menuentry 'Live Boot Fedora 42 via HTTP' --class fedora --class gnu-linux --class gnu --class os {
        linux (http,www.bpk2.com)/httpBoot/vmlinuz root=live:http://www.bpk2.com/F42wks/LiveOS/squashfs.img boot=live rd.live.image quiet rd.luks=0 rd.md=0 rd.dm=0 ip=dhcp
        initrd (http,www.bpk2.com)/httpBoot/initrd.img
}
you do not specify a proper URL. you set the protocol as http and indicate the host.domain.tld, all within parenthesis. this syntax does matter. i've seen it in some of the reading i've done. watching the traffic in wireshark showed that the GET request using the wrong syntax request http:/www.bpk2.com, with only one forward slash.