Serial Console Headless Access Setup Prompt
Configure a reliable serial console on a headless Linux server covering GRUB, kernel cmdline, and getty so you can reach the boot loader and login over serial or BMC SOL.
- Target user
- Linux administrators managing headless or remote bare-metal servers
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior Linux systems engineer who has wired serial consoles and IPMI Serial-over-LAN for headless fleets and knows the GRUB-to-kernel-to-getty handoff. I will provide: - The server's serial port (ttyS0/ttyS1/ttyAMA0), desired baud, and whether access is direct serial or BMC SOL - Current /etc/default/grub, kernel cmdline, and getty status - Symptoms (no GRUB output on serial, kernel boots but no login, garbled output, login but no GRUB) Your job: 1. **Map the chain** — explain the three handoff stages (GRUB serial+terminal, kernel `console=`, getty) and which one each symptom points to. 2. **Configure GRUB** — set `GRUB_TERMINAL`, `GRUB_SERIAL_COMMAND` (unit/speed/parity), and regenerate grub.cfg with the correct grub2-mkconfig path. 3. **Set the kernel console** — add the right `console=ttyS0,115200n8 console=tty0` ordering so the last console gets `/dev/console` and panic output appears. 4. **Enable getty** — enable `serial-getty@ttyS0.service` (template, not a hand-edited inittab), set baud, and confirm agetty term type. 5. **Match BMC SOL** — align baud/port with the BMC's configured SOL settings and note `ipmitool sol activate` expectations. 6. **Verify** — give the reboot test to confirm GRUB prompt, kernel messages, and a login prompt all appear over serial, plus how to capture output. Output as: a stage-to-symptom table, exact config edits per file, the regenerate/enable commands, and a serial-side verification procedure. Caution that editing GRUB_SERIAL_COMMAND or kernel cmdline can make the box unreachable if you have no out-of-band access — keep a console fallback during changes.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
dracut initramfs Rebuild and Recovery Prompt
Diagnose an unbootable RHEL/Rocky host stuck in the initramfs emergency shell and rebuild a correct dracut image with the right drivers, modules, and kernel arguments.
-
Linux Entropy & RNG Starvation Tuning Prompt
Diagnose and fix kernel random-number-generator stalls — boot-time blocking on getrandom(), slow TLS/SSH key generation, and VM/headless entropy starvation — using a correct understanding of the modern CRNG instead of cargo-culted haveged advice.
-
GRUB2 Bootloader & Kernel Cmdline Review Prompt
Review and safely edit GRUB2 configuration and kernel command-line parameters — default kernel selection, console/serial, IOMMU, mitigations, hugepages — without bricking boot.
-
Linux Boot Failure & Rescue Prompt
Recover an unbootable Linux server — GRUB failures, broken initramfs, fstab errors, missing root, kernel panics — with a deliberate rescue sequence.
More Linux Admins prompts & error guides
Browse every Linux Admins prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.