Enhance README and build scripts for hardware-specific optimizations
- Updated README.md to clarify development setup for macOS/Docker and added production build instructions for specific hardware. - Introduced new build scripts for optimized OS images targeting Start9 Server Pure, HP ProDesk 400 G4 DM, and Dell OptiPlex. - Enhanced Dockerfile to specify platform compatibility and improved Alpine profile for Archipelago builds. - Updated configuration files and init scripts to support new hardware profiles and ensure proper service management.
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# Alpine Linux boot configuration for Archipelago
|
||||
# This runs early in the boot process
|
||||
|
||||
# Enable essential services
|
||||
rc-update add devfs sysinit 2>/dev/null || true
|
||||
rc-update add dmesg sysinit 2>/dev/null || true
|
||||
rc-update add mdev sysinit 2>/dev/null || true
|
||||
rc-update add hwdrivers sysinit 2>/dev/null || true
|
||||
|
||||
# Enable boot services
|
||||
rc-update add bootmisc boot 2>/dev/null || true
|
||||
rc-update add hostname boot 2>/dev/null || true
|
||||
rc-update add hwclock boot 2>/dev/null || true
|
||||
rc-update add modules boot 2>/dev/null || true
|
||||
rc-update add swap boot 2>/dev/null || true
|
||||
rc-update add sysctl boot 2>/dev/null || true
|
||||
rc-update add syslog boot 2>/dev/null || true
|
||||
rc-update add networking boot 2>/dev/null || true
|
||||
rc-update add urandom boot 2>/dev/null || true
|
||||
|
||||
# Enable default services
|
||||
rc-update add local default 2>/dev/null || true
|
||||
rc-update add sshd default 2>/dev/null || true
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
|
||||
# Enable shutdown services
|
||||
rc-update add killprocs shutdown 2>/dev/null || true
|
||||
rc-update add mount-ro shutdown 2>/dev/null || true
|
||||
rc-update add savecache shutdown 2>/dev/null || true
|
||||
|
||||
echo "✓ Archipelago boot services configured"
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# First boot hardware detection and optimization
|
||||
|
||||
HARDWARE_INFO="/etc/archipelago/hardware-info.sh"
|
||||
|
||||
if [ -x "$HARDWARE_INFO" ]; then
|
||||
echo "🔍 Detecting hardware..."
|
||||
$HARDWARE_INFO > /var/log/archipelago-hardware.log 2>&1
|
||||
echo "✓ Hardware detection complete"
|
||||
fi
|
||||
|
||||
# Create system info file
|
||||
cat > /etc/archipelago/system-info.txt <<INFO
|
||||
Archipelago OS System Information
|
||||
Generated: $(date)
|
||||
|
||||
$(cat /etc/archipelago/hardware.toml 2>/dev/null)
|
||||
|
||||
Runtime Detection:
|
||||
$(cat /var/log/archipelago-hardware.log 2>/dev/null)
|
||||
INFO
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
# First boot network and service setup for Archipelago
|
||||
|
||||
# Configure hostname
|
||||
if [ ! -f /etc/hostname.configured ]; then
|
||||
echo "archipelago-node" > /etc/hostname
|
||||
hostname archipelago-node
|
||||
touch /etc/hostname.configured
|
||||
fi
|
||||
|
||||
# Configure networking - Ethernet with DHCP
|
||||
if [ ! -f /etc/network/interfaces.configured ]; then
|
||||
cat > /etc/network/interfaces <<'NETEOF'
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
# Automatic Ethernet configuration (DHCP)
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
# Fallback for other ethernet names
|
||||
auto enp0s3
|
||||
iface enp0s3 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
auto enp0s25
|
||||
iface enp0s25 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
auto ens0
|
||||
iface ens0 inet dhcp
|
||||
hostname archipelago-node
|
||||
NETEOF
|
||||
touch /etc/network/interfaces.configured
|
||||
fi
|
||||
|
||||
# Enable and start networking
|
||||
rc-update add networking boot 2>/dev/null || true
|
||||
rc-service networking start 2>/dev/null || true
|
||||
|
||||
# Wait for network to be ready
|
||||
echo "Waiting for network..."
|
||||
retries=30
|
||||
while [ $retries -gt 0 ]; do
|
||||
if ip route | grep -q default; then
|
||||
echo "✓ Network is ready"
|
||||
ip addr show | grep "inet " | grep -v "127.0.0.1"
|
||||
break
|
||||
fi
|
||||
retries=$((retries - 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Enable DNS
|
||||
if [ ! -f /etc/resolv.conf.configured ]; then
|
||||
cat > /etc/resolv.conf <<'DNSEOF'
|
||||
nameserver 8.8.8.8
|
||||
nameserver 8.8.4.4
|
||||
nameserver 1.1.1.1
|
||||
DNSEOF
|
||||
touch /etc/resolv.conf.configured
|
||||
fi
|
||||
|
||||
# Test internet connectivity
|
||||
echo "Testing internet connectivity..."
|
||||
if ping -c 2 8.8.8.8 >/dev/null 2>&1; then
|
||||
echo "✓ Internet connection established"
|
||||
else
|
||||
echo "⚠ Warning: No internet connection detected"
|
||||
fi
|
||||
|
||||
# Enable Archipelago service
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
|
||||
# Display access information
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "🏝️ Archipelago Bitcoin Node OS"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
echo "Network Configuration:"
|
||||
ip -4 addr show | grep inet | grep -v 127.0.0.1 | awk '{print " IP Address: " $2}'
|
||||
echo ""
|
||||
echo "Access the Archipelago UI at:"
|
||||
ip -4 addr show | grep inet | grep -v 127.0.0.1 | awk '{print " http://" $2}' | sed 's|/.*|:8100|'
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# First boot installation script for Archipelago
|
||||
# This script runs on first boot to complete Archipelago setup
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Archipelago first boot setup..."
|
||||
|
||||
# Install backend APK if available
|
||||
if [ -f /tmp/archipelago-backend.apk ]; then
|
||||
echo "📦 Installing Archipelago backend..."
|
||||
apk add --allow-untrusted /tmp/archipelago-backend.apk || true
|
||||
rm -f /tmp/archipelago-backend.apk
|
||||
fi
|
||||
|
||||
# Create archipelago user if needed
|
||||
if ! id archipelago >/dev/null 2>&1; then
|
||||
echo "👤 Creating archipelago user..."
|
||||
adduser -D -s /bin/bash archipelago || true
|
||||
echo "archipelago ALL=(ALL) NOPASSWD: /usr/bin/podman" >> /etc/sudoers || true
|
||||
fi
|
||||
|
||||
# Setup Podman for archipelago user
|
||||
echo "🐳 Configuring Podman..."
|
||||
mkdir -p /home/archipelago/.config/containers
|
||||
chown -R archipelago:archipelago /home/archipelago || true
|
||||
|
||||
# Create data directories
|
||||
echo "📁 Creating data directories..."
|
||||
mkdir -p /var/lib/archipelago/{apps,secrets,logs,backups}
|
||||
chown -R archipelago:archipelago /var/lib/archipelago || true
|
||||
|
||||
# Enable services
|
||||
echo "⚙️ Enabling services..."
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
systemctl enable archipelago 2>/dev/null || true
|
||||
|
||||
# Start services
|
||||
echo "🚀 Starting services..."
|
||||
rc-service archipelago start 2>/dev/null || systemctl start archipelago 2>/dev/null || true
|
||||
|
||||
echo "✅ Archipelago setup complete!"
|
||||
echo " Web UI: http://$(hostname -I | awk '{print $1}'):8100"
|
||||
echo " API: http://$(hostname -I | awk '{print $1}'):5959"
|
||||
Reference in New Issue
Block a user