Compare commits

..
Author SHA1 Message Date
MickLesk 0a3a3004f1 Alpine VM: find the cloud image under its 3.25 name
Alpine 3.25 (2026-12-03) dropped the generic_ prefix and the bios/uefi
split: latest-stable now only holds alpine-3.25.0-x86_64-cloudinit-r0,
so the image lookup found nothing and the script stopped. The new image
boots under OVMF.
2026-12-05 12:30:14 +01:00
2 changed files with 24 additions and 29 deletions

No files matched your search

+2 -5
View File
@@ -20,12 +20,9 @@ $STD apt install -y \
msg_ok "Installed Dependencies"
RELEASE=$(get_latest_github_release "bunkerity/bunkerweb")
INSTALLER_URL="https://github.com/bunkerity/bunkerweb/releases/download/v${RELEASE}/install-bunkerweb.sh"
confirm_external_installer "install-bunkerweb.sh" "$INSTALLER_URL"
confirm_external_installer "install-bunkerweb.sh" "https://github.com/bunkerity/bunkerweb/raw/v${RELEASE}/misc/install-bunkerweb.sh"
msg_info "Installing BunkerWeb (Patience)"
curl -fsSL -o install-bunkerweb.sh "$INSTALLER_URL"
curl -fsSL -o install-bunkerweb.sh.sha256 "${INSTALLER_URL}.sha256"
$STD sha256sum -c install-bunkerweb.sh.sha256
curl -fsSL -o install-bunkerweb.sh "https://github.com/bunkerity/bunkerweb/raw/v${RELEASE}/misc/install-bunkerweb.sh"
chmod +x install-bunkerweb.sh
$STD ./install-bunkerweb.sh --yes
$STD apt-mark unhold bunkerweb nginx
+22 -24
View File
@@ -249,8 +249,14 @@ cp -f "$CACHE_FILE" "$FILE"
# Resize the imported disk with vm_resize_disk; Cloud-Init grows the actual root
# filesystem before the first-boot installer runs, without another offline copy.
# --- Download UniFi OS installer on the host ---
msg_info "Downloading UniFi OS Server ${UOS_VERSION} installer"
curl -fsSL "${UOS_URL}" -o "unifi-os-server.bin"
chmod +x "unifi-os-server.bin"
msg_ok "Downloaded UniFi OS Server installer"
# --- Pre-install packages and setup first-boot installer ---
msg_info "Customizing disk image (installing packages, first-boot installer)"
msg_info "Customizing disk image (installing packages, staging installer)"
# Create the first-boot installer script
FIRSTBOOT_SCRIPT="$TEMP_DIR/unifi-os-firstboot.sh"
@@ -326,25 +332,16 @@ if [ ! -f /swapfile ]; then
echo "[$(date)] Swap file created"
fi
# The installer (~800 MB) does not fit the cloud image's root filesystem
# before Cloud-Init has grown it, so it is fetched here
echo "[$(date)] Downloading UniFi OS Server installer..."
for attempt in {1..3}; do
if curl -fsSL --retry 3 -o /opt/unifi-os-server.bin "$(cat /opt/unifi-os-server.url)"; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "[$(date)] Installer download failed after 3 attempts"
exit 1
fi
echo "[$(date)] Installer download failed (attempt $attempt/3), retrying in 10s..."
sleep 10
done
chmod +x /opt/unifi-os-server.bin
cd /opt
./unifi-os-server.bin <<<'y'
rm -f /opt/unifi-os-server.bin /opt/unifi-os-server.url
echo "[$(date)] UniFi OS Server installed successfully"
# Run UniFi OS installer
if [ -f /opt/unifi-os-server.bin ]; then
cd /opt
./unifi-os-server.bin <<<'y'
rm -f /opt/unifi-os-server.bin
echo "[$(date)] UniFi OS Server installed successfully"
else
echo "[$(date)] ERROR: /opt/unifi-os-server.bin not found"
exit 1
fi
echo "[$(date)] First-boot setup complete"
FBEOF
@@ -352,17 +349,18 @@ FBEOF
vm_prepare_cloud_image "$FILE" "$HN"
vm_customize "UniFi OS installer" "$FILE" \
--write "/opt/unifi-os-server.url:${UOS_URL}" \
--upload "unifi-os-server.bin:/opt/unifi-os-server.bin" \
--chmod 0755:/opt/unifi-os-server.bin \
--run-command "systemctl enable ssh" || exit 1
vm_firstboot_unit "$FILE" "unifi-os-firstboot" "$FIRSTBOOT_SCRIPT" \
--description "UniFi OS Server First Boot Installer" \
--after qemu-guest-agent.service \
--requires-path /opt/unifi-os-server.url \
--requires-path /opt/unifi-os-server.bin \
--cloud-init yes || exit 1
rm -f "$FIRSTBOOT_SCRIPT"
msg_ok "Disk image customized (UniFi OS ${UOS_VERSION} installs on first boot)"
rm -f "$FIRSTBOOT_SCRIPT" "unifi-os-server.bin"
msg_ok "Disk image customized (UniFi OS ${UOS_VERSION} staged for first-boot install)"
vm_claim_vmid
msg_info "Creating UniFi OS VM"