UEFI PXE boot fails after upgrading to 1.5.10.2149 — HTTP-to-HTTPS redirect causes "Permission denied" with older iPXE binary
Summary
After upgrading FOG from 1.5.10.1903 to 1.5.10.2149, UEFI PXE boot stopped working on at least one client.
The binaries generated by the new installer did not boot correctly on the affected machine. After restoring the previous /tftpboot binaries, the client successfully loaded ipxe.efi, but iPXE failed when chaining to FOG with:
The issue was resolved only after restoring an Apache rewrite exception that allows /fog/service/ endpoints to remain accessible over HTTP.
I would like to understand whether this is:
- A bug or regression in FOG
1.5.10.2149;
- An incorrect DHCP/PXE configuration on my side;
- A compatibility limitation in the affected clients' UEFI firmware;
- Or an unsupported configuration because HTTPS is now expected for the entire iPXE flow.
Environment
- FOG server type: Normal/Master server
- Previous FOG version:
1.5.10.1903
- Current FOG version:
1.5.10.2149
- Previous database schema:
274
- Current database schema:
277
- Operating system: Debian GNU/Linux 13 (Trixie)
- Kernel:
6.12.100+deb13-amd64
- Apache:
2.4.68
- PHP:
8.4, using PHP-FPM
- MariaDB:
11.8.6
- TFTP server:
tftpd-hpa
- DHCP server: External; FOG does not provide DHCP
- FOG server address:
<FOG_SERVER_IP>
- FOG hostname:
<FOG_HOSTNAME>
- Network interface:
bond0, 802.3ad/LACP with four 1 Gbps interfaces
- Client boot mode: UEFI
- DHCP boot file used for the affected client:
ipxe.efi
The external DHCP server provides the FOG server address as the next server/option 66 and ipxe.efi as the UEFI boot filename/option 67.
Upgrade procedure
The server operating system was fully upgraded before updating FOG.
FOG was then upgraded from a clean checkout of the official stable branch:
Version: 1.5.10.2149
Schema: 277
Commit: df82a454981637c82ce84c869ee676947ba7c44a
The installer completed successfully, updated the database, rebuilt the iPXE binaries, and restarted all FOG services.
After the upgrade:
- Apache was active;
- MariaDB was active;
- TFTP was active;
- NFS was active;
- All FOG services were active;
systemctl --failed reported no failed units;
ipxe.efi could be downloaded successfully over TFTP;
- File and directory permissions were correct.
Initial behavior with the newly generated binaries
The installer rebuilt all PXE binaries. Their hashes changed compared with the pre-upgrade files, including:
ipxe.efi
snponly.efi
snp.efi
intel.efi
realtek.efi
undionly.kpxe
On the affected UEFI machine, the newly generated ipxe.efi did not complete the boot process. From the client's perspective, it appeared that ipxe.efi could not be loaded or executed correctly.
I restored /tftpboot from the backup created immediately before the upgrade.
The restored UEFI binary identifies itself as:
After restoring it, the client loaded iPXE but failed with:
TFTP and filesystem validation
The TFTP path and files had the following permissions:
drwxr-xr-x 755 fogproject:fogproject /tftpboot
-rw-r--r-- 644 fogproject:fogproject /tftpboot/ipxe.efi
-rw-r--r-- 644 fogproject:fogproject /tftpboot/default.ipxe
The following binaries were downloaded successfully through TFTP, and the downloaded hashes matched the files on disk:
ipxe.efi
snponly.efi
undionly.kpxe
Therefore, the Permission denied message was not caused by Unix permissions or TFTP access.
Certificate validation
I also restored and validated the pre-upgrade FOG certificates.
The following checks passed:
- The FOG CA was valid;
- The server certificate was signed by that CA;
- The server certificate matched the private key;
- The server IP address was present in the certificate SAN;
- The FOG hostname was present in the certificate SAN;
- The certificate was within its validity period;
- A TLS connection using the FOG CA verified successfully;
- Apache configuration validation returned
Syntax OK.
Example:
openssl verify -CAfile ca.cert.pem srvpublic.crt
srvpublic.crt: OK
A curl request using the FOG CA, without disabling TLS verification, also succeeded.
Relevant default.ipxe behavior
The restored default.ipxe chains to FOG over HTTP:
#!ipxe
set arch ${buildarch}
params
param mac0 ${net0/mac}
param arch ${arch}
param platform ${platform}
param product ${product}
param manufacturer ${product}
param ipxever ${version}
param filename ${filename}
param sysuuid ${uuid}
chain http://<FOG_SERVER_IP>/fog/service/ipxe/boot.php##params
Apache behavior after the upgrade
After the upgrade, the port 80 virtual host contained:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
RewriteRule /management/other/ca.cert.der$ - [L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R,L]
The affected client repeatedly produced this Apache access log entry:
<FOG_SERVER_IP>:80 <CLIENT_IP> - - "POST /fog/service/ipxe/boot.php HTTP/1.1" 302 ... "iPXE/1.21.1+ (g5de5d)"
There was no subsequent HTTPS request from that iPXE client.
From the client side, the result was:
Testing the same endpoint confirmed that Apache returned an HTTP 302 redirect:
POST http://<FOG_SERVER_IP>/fog/service/ipxe/boot.php
HTTP/1.1 302 Found
Location: https://<FOG_SERVER_IP>//fog/service/ipxe/boot.php
Notice that the generated redirect also contained a double slash before fog:
https://<FOG_SERVER_IP>//fog/service/ipxe/boot.php
I do not know whether the double slash is relevant to iPXE, but it may be worth checking.
Pre-upgrade Apache configuration
Before the upgrade, the port 80 virtual host had an additional condition:
RewriteCond %{REQUEST_URI} !^/fog/service/
RewriteCond %{HTTPS} off
RewriteRule ^/?(.*)$ https://%{HTTP_HOST}/$1 [R,L]
This prevented requests under /fog/service/ from being redirected to HTTPS.
The FOG installer replaced the virtual host and removed that condition.
Workaround
Restoring the pre-upgrade rewrite condition resolved the problem:
RewriteCond %{REQUEST_URI} !^/fog/service/
RewriteCond %{HTTPS} off
RewriteRule ^/?(.*)$ https://%{HTTP_HOST}/$1 [R,L]
After reloading Apache, the same iPXE request returned:
The response began correctly with:
#!ipxe
set fog-ip <FOG_SERVER_IP>
set fog-webroot fog
The client then booted successfully.
The FOG management interface remains available over HTTPS.
Questions
-
Is redirecting /fog/service/ipxe/boot.php from HTTP to HTTPS the intended behavior in FOG 1.5.10.2149?
-
Should the current stable installer preserve or generate an HTTP exception for /fog/service/ or /fog/service/ipxe/?
-
Is an older iPXE build such as iPXE/1.21.1+ (g5de5d) expected to follow this HTTP-to-HTTPS redirect?
-
Does FOG now require clients to use only the newly generated iPXE 2.x binaries for HTTPS boot?
-
For UEFI clients, should external DHCP provide ipxe.efi, snponly.efi, or another binary?
-
Could this indicate a UEFI compatibility problem with the newly generated ipxe.efi rather than an Apache configuration problem?
-
Should the redirect rule use the following form to avoid the double slash?
RewriteRule ^/?(.*)$ https://%{HTTP_HOST}/$1 [R,L]
Instead of:
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R,L]
-
Is excluding the entire /fog/service/ path from HTTPS redirection considered safe and supported, or should the exception be limited to /fog/service/ipxe/?
Additional observation
Before restoring the old binaries, Apache recorded successful HTTPS requests from the newer iPXE build:
iPXE/2.0.0+ (g766fa)
POST /fog/service/ipxe/boot.php HTTP/1.1 200
GET /fog/service/ipxe/bg.png HTTP/1.1 200
This suggests that the newer binary can use HTTPS successfully, while the older 1.21.1 binary fails after the HTTP redirect.
However, the newer ipxe.efi did not boot correctly on the affected UEFI client, which is why I restored the older binary.
I can provide packet captures, complete Apache virtual host files, iPXE screenshots, and hashes of the generated binaries if needed.
UEFI PXE boot fails after upgrading to 1.5.10.2149 — HTTP-to-HTTPS redirect causes "Permission denied" with older iPXE binary
Summary
After upgrading FOG from
1.5.10.1903to1.5.10.2149, UEFI PXE boot stopped working on at least one client.The binaries generated by the new installer did not boot correctly on the affected machine. After restoring the previous
/tftpbootbinaries, the client successfully loadedipxe.efi, but iPXE failed when chaining to FOG with:The issue was resolved only after restoring an Apache rewrite exception that allows
/fog/service/endpoints to remain accessible over HTTP.I would like to understand whether this is:
1.5.10.2149;Environment
1.5.10.19031.5.10.21492742776.12.100+deb13-amd642.4.688.4, using PHP-FPM11.8.6tftpd-hpa<FOG_SERVER_IP><FOG_HOSTNAME>bond0, 802.3ad/LACP with four 1 Gbps interfacesipxe.efiThe external DHCP server provides the FOG server address as the next server/option 66 and
ipxe.efias the UEFI boot filename/option 67.Upgrade procedure
The server operating system was fully upgraded before updating FOG.
FOG was then upgraded from a clean checkout of the official
stablebranch:The installer completed successfully, updated the database, rebuilt the iPXE binaries, and restarted all FOG services.
After the upgrade:
systemctl --failedreported no failed units;ipxe.eficould be downloaded successfully over TFTP;Initial behavior with the newly generated binaries
The installer rebuilt all PXE binaries. Their hashes changed compared with the pre-upgrade files, including:
ipxe.efisnponly.efisnp.efiintel.efirealtek.efiundionly.kpxeOn the affected UEFI machine, the newly generated
ipxe.efidid not complete the boot process. From the client's perspective, it appeared thatipxe.eficould not be loaded or executed correctly.I restored
/tftpbootfrom the backup created immediately before the upgrade.The restored UEFI binary identifies itself as:
After restoring it, the client loaded iPXE but failed with:
TFTP and filesystem validation
The TFTP path and files had the following permissions:
The following binaries were downloaded successfully through TFTP, and the downloaded hashes matched the files on disk:
Therefore, the
Permission deniedmessage was not caused by Unix permissions or TFTP access.Certificate validation
I also restored and validated the pre-upgrade FOG certificates.
The following checks passed:
Syntax OK.Example:
A
curlrequest using the FOG CA, without disabling TLS verification, also succeeded.Relevant
default.ipxebehaviorThe restored
default.ipxechains to FOG over HTTP:Apache behavior after the upgrade
After the upgrade, the port 80 virtual host contained:
The affected client repeatedly produced this Apache access log entry:
There was no subsequent HTTPS request from that iPXE client.
From the client side, the result was:
Testing the same endpoint confirmed that Apache returned an HTTP
302redirect:Notice that the generated redirect also contained a double slash before
fog:I do not know whether the double slash is relevant to iPXE, but it may be worth checking.
Pre-upgrade Apache configuration
Before the upgrade, the port 80 virtual host had an additional condition:
This prevented requests under
/fog/service/from being redirected to HTTPS.The FOG installer replaced the virtual host and removed that condition.
Workaround
Restoring the pre-upgrade rewrite condition resolved the problem:
After reloading Apache, the same iPXE request returned:
The response began correctly with:
The client then booted successfully.
The FOG management interface remains available over HTTPS.
Questions
Is redirecting
/fog/service/ipxe/boot.phpfrom HTTP to HTTPS the intended behavior in FOG1.5.10.2149?Should the current stable installer preserve or generate an HTTP exception for
/fog/service/or/fog/service/ipxe/?Is an older iPXE build such as
iPXE/1.21.1+ (g5de5d)expected to follow this HTTP-to-HTTPS redirect?Does FOG now require clients to use only the newly generated iPXE 2.x binaries for HTTPS boot?
For UEFI clients, should external DHCP provide
ipxe.efi,snponly.efi, or another binary?Could this indicate a UEFI compatibility problem with the newly generated
ipxe.efirather than an Apache configuration problem?Should the redirect rule use the following form to avoid the double slash?
Instead of:
Is excluding the entire
/fog/service/path from HTTPS redirection considered safe and supported, or should the exception be limited to/fog/service/ipxe/?Additional observation
Before restoring the old binaries, Apache recorded successful HTTPS requests from the newer iPXE build:
This suggests that the newer binary can use HTTPS successfully, while the older
1.21.1binary fails after the HTTP redirect.However, the newer
ipxe.efidid not boot correctly on the affected UEFI client, which is why I restored the older binary.I can provide packet captures, complete Apache virtual host files, iPXE screenshots, and hashes of the generated binaries if needed.