#!/bin/bash set -e echo "Adding serial console to Debian installer boot entries..." GRUB_DIR="binary/boot/grub" for cfg in "$GRUB_DIR"/install.cfg "$GRUB_DIR"/install_start.cfg "$GRUB_DIR"/install_start_gui.cfg "$GRUB_DIR"/install_start_text.cfg; do if [ -f "$cfg" ]; then sed -i 's/@APPEND_INSTALL@/& console=ttyS0,115200/g' "$cfg" 2>/dev/null || true sed -i 's/--- quiet/--- quiet console=ttyS0,115200/g' "$cfg" 2>/dev/null || true fi done if [ -f "$GRUB_DIR/grub.cfg" ]; then sed -i 's/@APPEND_LIVE@/& console=ttyS0,115200 console=tty0/g' "$GRUB_DIR/grub.cfg" 2>/dev/null || true fi echo "Serial console added to all boot entries."