Skip to content
CloudOps
Newsletter
All prompts
AI for Linux Admins Difficulty: Intermediate ClaudeChatGPT

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.
Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 1,603 DevOps AI prompts
  • One practical workflow email per week