fix: add hardware firmware, suppress GRUB warning, eject USB after install
- Add firmware-realtek, firmware-iwlwifi, firmware-misc-nonfree to rootfs (fixes missing r8169 NIC firmware on Dell and other common hardware) - Enable non-free-firmware repo in rootfs Dockerfile - Suppress os-prober GRUB warning (GRUB_DISABLE_OS_PROBER=true) - Auto-eject USB boot media before reboot to prevent re-entering installer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5918185a3a
commit
e88b759b52
@ -202,6 +202,11 @@ FROM debian:bookworm
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Enable non-free-firmware repo for hardware firmware (Realtek NIC, Intel WiFi, etc.)
|
||||
RUN sed -i 's/^deb \(.*\) bookworm \(.*\)/deb \1 bookworm \2 non-free-firmware/' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \
|
||||
sed -i 's/^Components: main$/Components: main non-free-firmware/' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \
|
||||
echo "deb http://deb.debian.org/debian bookworm main non-free-firmware" >> /etc/apt/sources.list
|
||||
|
||||
# Install all packages we need including nginx, podman, tor, and openssl (for self-signed certs)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
${LINUX_IMAGE_PKG} \
|
||||
@ -228,6 +233,9 @@ RUN apt-get update && apt-get install -y \
|
||||
locales \
|
||||
console-setup \
|
||||
keyboard-configuration \
|
||||
firmware-realtek \
|
||||
firmware-iwlwifi \
|
||||
firmware-misc-nonfree \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -1503,6 +1511,9 @@ rm -f /mnt/target/etc/initramfs-tools/conf.d/live-boot* 2>/dev/null || true
|
||||
rm -f /mnt/target/usr/share/initramfs-tools/scripts/live* 2>/dev/null || true
|
||||
rm -f /mnt/target/usr/share/initramfs-tools/hooks/live* 2>/dev/null || true
|
||||
|
||||
# Suppress os-prober warning in GRUB
|
||||
echo "GRUB_DISABLE_OS_PROBER=true" >> /mnt/target/etc/default/grub
|
||||
|
||||
# Regenerate initramfs — the one from Docker export is corrupt/incomplete
|
||||
# (Docker builds have limited /proc, /sys, /dev so initramfs generation fails silently)
|
||||
echo " Regenerating initramfs..."
|
||||
@ -1584,7 +1595,24 @@ echo -e "${GREEN}║ Validate: bash /opt/archipelago/scripts/run-e2e-tests.sh
|
||||
echo -e "${GREEN}║ ║${NC}"
|
||||
echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════════╝${NC}"
|
||||
echo ""
|
||||
read -p "Press Enter to reboot..."
|
||||
echo ""
|
||||
echo -e "${YELLOW} >>> REMOVE THE USB DRIVE NOW <<<${NC}"
|
||||
echo ""
|
||||
read -p "Press Enter to reboot (make sure USB is removed)..."
|
||||
|
||||
# Try to eject the USB boot media to prevent booting back into installer
|
||||
BOOT_DEV=$(findmnt -n -o SOURCE /run/live/medium 2>/dev/null || findmnt -n -o SOURCE /lib/live/mount/medium 2>/dev/null || echo "")
|
||||
if [ -n "$BOOT_DEV" ]; then
|
||||
# Get the parent disk device (e.g., /dev/sdb1 -> /dev/sdb)
|
||||
BOOT_DISK=$(lsblk -no PKNAME "$BOOT_DEV" 2>/dev/null | head -1)
|
||||
if [ -n "$BOOT_DISK" ]; then
|
||||
echo " Ejecting USB (/dev/$BOOT_DISK)..."
|
||||
umount -l /run/live/medium 2>/dev/null || true
|
||||
umount -l /lib/live/mount/medium 2>/dev/null || true
|
||||
eject "/dev/$BOOT_DISK" 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
reboot
|
||||
INSTALLER_SCRIPT
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user