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