Skip to content

Instantly share code, notes, and snippets.

@ShoGinn
Last active August 16, 2026 12:38
Show Gist options
  • Select an option

  • Save ShoGinn/e5a75126ec9780825cd39dbbce4e192d to your computer and use it in GitHub Desktop.

Select an option

Save ShoGinn/e5a75126ec9780825cd39dbbce4e192d to your computer and use it in GitHub Desktop.
Self-Hosting HP UEFI BIOS Updates via Local HTTP (Elitedesk 800 G5)

Self-Hosting HP UEFI BIOS Updates via Local HTTP

HP commercial desktops (like the EliteDesk 800 G5) support network BIOS updates from the UEFI setup screen. However, modern HP endpoints enforce HTTPS/TLS configurations that older UEFI network stacks cannot negotiate, resulting in network connection failures.

You can resolve this by mirroring HP's upstream files and hosting them over plain HTTP (Port 80) from any secondary machine on your local network.


Architecture & Request Flow

  1. Host Machine (Laptop / Server / LXC / NAS): Downloads the files from HP and serves them via HTTP on port 80.
  2. Target Machine (HP Desktop in BIOS): Connects to the host machine's local IP to fetch the manifest and flash binary.
Target HP (UEFI F10)                        Host Machine (HTTP :80)
      │                                                │
      ├──── HEAD /<SystemID>/<SystemID>.xml ──────────>│
      ├──── GET  /<SystemID>/<SystemID>.xml ──────────>│
      ├──── HEAD /<SystemID>/<BinFile>.bin  ──────────>│
      └──── GET  /<SystemID>/<BinFile>.bin  ──────────>│


Step 1: Find the System Board ID on the Target HP

Before rebooting, or directly from the BIOS setup screen:

  • In BIOS Setup: Press F10 on boot $\rightarrow$ Main / System Information $\rightarrow$ note the 4-digit System Board ID (e.g., 8595).
  • From Linux (if running before the update): Run sudo dmidecode -s baseboard-product-name.

Step 2: Download & Host Script (hp-bios-server.sh)

Run this script on a separate computer on the same local network:

#!/usr/bin/env bash
set -euo pipefail

# Require System Board ID as argument or prompt for it
SYSTEM_ID="${1:-}"
if [ -z "$SYSTEM_ID" ]; then
    read -rp "Enter Target HP System Board ID (e.g., 8595): " SYSTEM_ID
fi

if [ -z "$SYSTEM_ID" ]; then
    echo "[-] Error: System Board ID is required."
    exit 1
fi

echo "[+] Preparing repository for System Board ID: ${SYSTEM_ID}"

# 1. Create directory matching UEFI request structure: /<SystemID>/
TARGET_DIR="./hp-repo/${SYSTEM_ID}"
mkdir -p "${TARGET_DIR}"

BASE_URL="https://ftp.ext.hp.com/pub/pcbios/${SYSTEM_ID}"
XML_URL="${BASE_URL}/${SYSTEM_ID}.xml"

# 2. Fetch upstream HP XML catalog
echo "[+] Fetching upstream XML: ${XML_URL}"
if ! curl -fsSL "${XML_URL}" -o "${TARGET_DIR}/${SYSTEM_ID}.xml"; then
    echo "[-] Failed to fetch XML. Verify the System Board ID at: https://ftp.ext.hp.com/pub/pcbios/"
    exit 1
fi

# 3. Parse binary filename from the XML
BIN_FILE=$(grep -oE '[A-Za-z0-9_]+\.bin' "${TARGET_DIR}/${SYSTEM_ID}.xml" | head -n1)

if [ -z "${BIN_FILE}" ]; then
    echo "[-] Could not extract .bin filename from ${SYSTEM_ID}.xml"
    exit 1
fi

echo "[+] Latest firmware binary: ${BIN_FILE}"

# 4. Download firmware payload (.bin) and optional signature (.s12)
echo "[+] Downloading binary from ${BASE_URL}/${BIN_FILE}..."
curl -fSL "${BASE_URL}/${BIN_FILE}" -o "${TARGET_DIR}/${BIN_FILE}"

SIG_FILE="${BIN_FILE%.bin}.s12"
if curl -fsSL -I "${BASE_URL}/${SIG_FILE}" &>/dev/null; then
    echo "[+] Downloading signature file: ${SIG_FILE}..."
    curl -fsSL "${BASE_URL}/${SIG_FILE}" -o "${TARGET_DIR}/${SIG_FILE}"
fi

echo ""
echo "[✓] Files staged successfully:"
ls -la "${TARGET_DIR}"

# 5. Start HTTP server on Port 80
HOST_IP=$(hostname -I 2>/dev/null | awk '{print $1}' || echo "<YOUR_HOST_IP>")
echo ""
echo "========================================================"
echo " Serving HTTP repository at http://${HOST_IP}/"
echo " Set BIOS Network Server URL to: http://${HOST_IP}/"
echo " Press Ctrl+C to stop when update completes."
echo "========================================================"
echo ""

cd hp-repo
sudo python3 -m http.server 80

Step 3: Flash from Target HP BIOS

  1. On your second machine, run:
chmod +x hp-bios-server.sh
./hp-bios-server.sh 8595
  1. Power on the target HP desktop and press F10 to enter BIOS Setup.
  2. Navigate to Update System BIOS $\rightarrow$ Network Configuration Settings.
  3. Set:
  • Server Address Type: Custom URL or IPv4 Address
  • Server URL / Address: http://<HOST_MACHINE_IP>/
  1. Save settings and select Update System BIOS via Network.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment