fix: GRUB theme font refs, improve QEMU test script
Theme: remove explicit font name references that don't match grub-mkfont output names, remove select_*.png pixmap reference (files don't exist). GRUB falls back to default when theme fails to load — this was causing the Debian helmet to show. QEMU test script: add --bios/--nographic flags, serial console logging to /tmp/archipelago-qemu-serial.log, auto-detect latest ISO, use -drive for OVMF firmware. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
93b2af203a
commit
9e3c0b85ea
@ -1,20 +1,17 @@
|
|||||||
# Archipelago GRUB Theme
|
# Archipelago GRUB Theme
|
||||||
# Dark background with Bitcoin orange accents
|
# Dark background with Bitcoin orange accents
|
||||||
|
# Font references removed — GRUB uses whatever fonts are loaded in grub.cfg
|
||||||
|
|
||||||
title-text: ""
|
title-text: ""
|
||||||
desktop-color: "#0a0a0a"
|
desktop-color: "#0a0a0a"
|
||||||
terminal-font: "DejaVu Sans Regular 16"
|
|
||||||
|
|
||||||
+ boot_menu {
|
+ boot_menu {
|
||||||
left = 25%
|
left = 25%
|
||||||
top = 40%
|
top = 40%
|
||||||
width = 50%
|
width = 50%
|
||||||
height = 30%
|
height = 30%
|
||||||
item_font = "DejaVu Sans Regular 16"
|
|
||||||
item_color = "#aaaaaa"
|
item_color = "#aaaaaa"
|
||||||
selected_item_font = "DejaVu Sans Regular 16"
|
selected_item_color = "#f7931a"
|
||||||
selected_item_color = "#ffffff"
|
|
||||||
selected_item_pixmap_style = "select_*.png"
|
|
||||||
item_height = 36
|
item_height = 36
|
||||||
item_spacing = 8
|
item_spacing = 8
|
||||||
item_padding = 16
|
item_padding = 16
|
||||||
@ -26,7 +23,6 @@ terminal-font: "DejaVu Sans Regular 16"
|
|||||||
top = 20%
|
top = 20%
|
||||||
width = 50%
|
width = 50%
|
||||||
text = "A R C H I P E L A G O"
|
text = "A R C H I P E L A G O"
|
||||||
font = "DejaVu Sans Bold 24"
|
|
||||||
color = "#f7931a"
|
color = "#f7931a"
|
||||||
align = "center"
|
align = "center"
|
||||||
}
|
}
|
||||||
@ -36,7 +32,6 @@ terminal-font: "DejaVu Sans Regular 16"
|
|||||||
top = 28%
|
top = 28%
|
||||||
width = 50%
|
width = 50%
|
||||||
text = "Bitcoin Node OS"
|
text = "Bitcoin Node OS"
|
||||||
font = "DejaVu Sans Regular 14"
|
|
||||||
color = "#888888"
|
color = "#888888"
|
||||||
align = "center"
|
align = "center"
|
||||||
}
|
}
|
||||||
@ -46,7 +41,6 @@ terminal-font: "DejaVu Sans Regular 16"
|
|||||||
top = 90%
|
top = 90%
|
||||||
width = 50%
|
width = 50%
|
||||||
text = "Use arrow keys to select, Enter to boot"
|
text = "Use arrow keys to select, Enter to boot"
|
||||||
font = "DejaVu Sans Regular 12"
|
|
||||||
color = "#555555"
|
color = "#555555"
|
||||||
align = "center"
|
align = "center"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,69 +1,107 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Test Archipelago ISO in QEMU
|
# Test Archipelago ISO in QEMU
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# ./test-iso-qemu.sh [path-to-iso] [--bios] [--nographic]
|
||||||
|
#
|
||||||
|
# Options:
|
||||||
|
# --bios Force legacy BIOS mode (default: UEFI)
|
||||||
|
# --nographic No GUI window, serial console only (great for logging)
|
||||||
|
#
|
||||||
|
# Serial log is always written to /tmp/archipelago-qemu-serial.log
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
ISO="${1:-$SCRIPT_DIR/results/archipelago-debian-12-x86_64.iso}"
|
SERIAL_LOG="/tmp/archipelago-qemu-serial.log"
|
||||||
|
FORCE_BIOS=false
|
||||||
|
NOGRAPHIC=false
|
||||||
|
ISO=""
|
||||||
|
|
||||||
if [ ! -f "$ISO" ]; then
|
for arg in "$@"; do
|
||||||
echo "❌ ISO not found: $ISO"
|
case "$arg" in
|
||||||
|
--bios) FORCE_BIOS=true ;;
|
||||||
|
--nographic) NOGRAPHIC=true ;;
|
||||||
|
*) ISO="$arg" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Auto-detect ISO
|
||||||
|
if [ -z "$ISO" ]; then
|
||||||
|
ISO=$(ls -t "$SCRIPT_DIR"/results/archipelago-installer-unbundled-*.iso 2>/dev/null | head -1)
|
||||||
|
fi
|
||||||
|
if [ -z "$ISO" ] || [ ! -f "$ISO" ]; then
|
||||||
|
ISO=$(ls -t "$SCRIPT_DIR"/results/archipelago-*.iso 2>/dev/null | head -1)
|
||||||
|
fi
|
||||||
|
if [ -z "$ISO" ] || [ ! -f "$ISO" ]; then
|
||||||
|
echo "ISO not found."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: $0 [path-to-iso]"
|
echo "Usage: $0 [path-to-iso] [--bios] [--nographic]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Build the ISO first with: ./build-debian-iso.sh"
|
echo "Or place an ISO in: $SCRIPT_DIR/results/"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "🧪 Testing Archipelago ISO in QEMU"
|
echo "Testing Archipelago ISO in QEMU"
|
||||||
echo "📀 ISO: $ISO"
|
echo " ISO: $ISO"
|
||||||
echo "💾 RAM: 4GB"
|
echo " Size: $(du -h "$ISO" | cut -f1)"
|
||||||
echo "🖥️ CPU: 2 cores"
|
echo " RAM: 4GB"
|
||||||
echo ""
|
echo " CPU: 2 cores"
|
||||||
echo "Press Ctrl+Alt+G to release mouse/keyboard from VM"
|
echo " Serial: $SERIAL_LOG"
|
||||||
echo "Press Ctrl+C in this terminal to stop VM"
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Create test disk if it doesn't exist
|
# Create test disk if it doesn't exist
|
||||||
DISK="/tmp/archipelago-test-disk.qcow2"
|
DISK="/tmp/archipelago-test-disk.qcow2"
|
||||||
if [ ! -f "$DISK" ]; then
|
if [ ! -f "$DISK" ]; then
|
||||||
echo "Creating test disk..."
|
echo "Creating 20GB test disk..."
|
||||||
qemu-img create -f qcow2 "$DISK" 20G
|
qemu-img create -f qcow2 "$DISK" 20G
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting VM in 3 seconds..."
|
# Common QEMU args
|
||||||
sleep 3
|
QEMU_ARGS=(
|
||||||
|
-m 4G
|
||||||
|
-smp 2
|
||||||
|
-boot d
|
||||||
|
-cdrom "$ISO"
|
||||||
|
-drive if=virtio,format=qcow2,file="$DISK"
|
||||||
|
-net nic,model=virtio -net user,hostfwd=tcp::2222-:22,hostfwd=tcp::8100-:80
|
||||||
|
-serial file:"$SERIAL_LOG"
|
||||||
|
)
|
||||||
|
|
||||||
# Run QEMU with UEFI (more modern, matches real hardware)
|
# Display mode
|
||||||
if [ -f "/opt/homebrew/share/qemu/edk2-x86_64-code.fd" ]; then
|
if [ "$NOGRAPHIC" = true ]; then
|
||||||
# macOS with Homebrew QEMU
|
QEMU_ARGS+=(-nographic -append "console=ttyS0")
|
||||||
OVMF="/opt/homebrew/share/qemu/edk2-x86_64-code.fd"
|
|
||||||
elif [ -f "/usr/share/OVMF/OVMF_CODE.fd" ]; then
|
|
||||||
# Linux with OVMF
|
|
||||||
OVMF="/usr/share/OVMF/OVMF_CODE.fd"
|
|
||||||
else
|
else
|
||||||
# Fall back to legacy BIOS
|
QEMU_ARGS+=(-vga virtio -display default)
|
||||||
echo "⚠️ UEFI firmware not found, using legacy BIOS..."
|
|
||||||
qemu-system-x86_64 \
|
|
||||||
-machine pc \
|
|
||||||
-m 4G \
|
|
||||||
-smp 2 \
|
|
||||||
-boot d \
|
|
||||||
-cdrom "$ISO" \
|
|
||||||
-drive if=virtio,format=qcow2,file="$DISK" \
|
|
||||||
-net nic,model=virtio -net user,hostfwd=tcp::2222-:22,hostfwd=tcp::8100-:8100 \
|
|
||||||
-vga virtio \
|
|
||||||
-display default
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# UEFI boot
|
echo "Starting VM..."
|
||||||
qemu-system-x86_64 \
|
echo "(Serial console logging to $SERIAL_LOG)"
|
||||||
-machine q35 \
|
echo "(Press Ctrl+Alt+G to release mouse, Ctrl+C to stop VM)"
|
||||||
-bios "$OVMF" \
|
echo ""
|
||||||
-m 4G \
|
|
||||||
-smp 2 \
|
# Detect UEFI firmware
|
||||||
-boot d \
|
OVMF=""
|
||||||
-cdrom "$ISO" \
|
if [ "$FORCE_BIOS" = false ]; then
|
||||||
-drive if=virtio,format=qcow2,file="$DISK" \
|
if [ -f "/opt/homebrew/share/qemu/edk2-x86_64-code.fd" ]; then
|
||||||
-net nic,model=virtio -net user,hostfwd=tcp::2222-:22,hostfwd=tcp::8100-:8100 \
|
OVMF="/opt/homebrew/share/qemu/edk2-x86_64-code.fd"
|
||||||
-vga virtio \
|
elif [ -f "/usr/share/OVMF/OVMF_CODE.fd" ]; then
|
||||||
-display default
|
OVMF="/usr/share/OVMF/OVMF_CODE.fd"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$OVMF" ]; then
|
||||||
|
echo " Boot: UEFI ($OVMF)"
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-machine q35 \
|
||||||
|
-drive if=pflash,format=raw,readonly=on,file="$OVMF" \
|
||||||
|
"${QEMU_ARGS[@]}"
|
||||||
|
else
|
||||||
|
echo " Boot: Legacy BIOS"
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-machine pc \
|
||||||
|
"${QEMU_ARGS[@]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "VM stopped. Serial log: $SERIAL_LOG"
|
||||||
|
echo "Last 20 lines:"
|
||||||
|
tail -20 "$SERIAL_LOG" 2>/dev/null
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user