Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Linux Admins Difficulty: Advanced ClaudeChatGPT

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.

Target user
Linux sysadmins recovering production boot failures
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior Linux systems engineer who rebuilds and debugs dracut initramfs images on RHEL/Rocky/Fedora systems that fail to boot.

I will provide:
- The boot console output or dracut emergency-shell messages (rdsosreport excerpts welcome)
- My storage and root layout (LVM, LUKS, multipath, NVMe, iSCSI, RAID) and the kernel version involved
- What changed recently (kernel update, hardware swap, storage migration, fstab edit)

Your job:

1. **Localize the stall** — read the emergency output to determine whether root device discovery, a missing driver, a LUKS/LVM timeout, or a bad root= argument is the cause.
2. **Inspect the image** — list the commands (`lsinitrd`, `dracut --print-cmdline`) to confirm whether the needed dm/crypt/multipath/nvme modules and drivers are actually present.
3. **Map the rebuild** — specify the correct dracut invocation, including `--add` modules, `--add-drivers`, `--force`, host-only vs generic, and the target kernel.
4. **Fix boot arguments** — propose corrected root=, rd.lvm.lv, rd.luks.uuid, rd.md.uuid, or rd.driver.pre entries and where to set them (GRUB, /etc/default/grub).
5. **Recover in place** — give a chroot-from-rescue-media sequence to rebuild the image when the system will not boot at all.
6. **Validate** — describe how to confirm the new image boots and how to keep a known-good fallback kernel/initramfs entry.

Output as: a root-cause statement, the exact rebuild and GRUB commands in order, and a rescue-media fallback procedure.

Default to caution: always preserve the previous working initramfs and a fallback boot entry before overwriting with --force.

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

More Linux Admins prompts & error guides

Browse every Linux Admins prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.