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: Intermediate ClaudeChatGPT

blkid UUID and Label Duplicate Resolution Prompt

Resolve duplicate filesystem UUIDs and labels after disk cloning or snapshot restore that cause wrong-device mounts, fstab ambiguity, and boot failures on Linux.

Target user
Linux sysadmins managing cloned and imaged systems
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior Linux systems engineer who resolves duplicate filesystem and partition UUID/label collisions caused by cloning, dd imaging, or snapshot restores.

I will provide:
- `blkid` and `lsblk -f` output for all relevant devices
- My /etc/fstab and how the volumes are referenced (UUID=, LABEL=, /dev path)
- The context (VM template clone, restored snapshot, attached backup disk) and any wrong-mount or boot symptom

Your job:

1. **Detect collisions** — identify duplicate UUIDs/PARTUUIDs/labels and explain why the kernel or mount may pick the wrong device nondeterministically.
2. **Assess blast radius** — determine whether the collision threatens root mount, swap, or data volumes and whether it could corrupt data via wrong-target writes.
3. **Choose the keeper** — decide which device retains the original identifier and which must be regenerated, accounting for fstab and bootloader references.
4. **Regenerate identifiers** — give the correct filesystem-specific commands (tune2fs -U for ext, xfs_admin -U for XFS, mkswap, e2label/xfs_admin -L) run safely while unmounted.
5. **Update references** — provide the matching fstab, GRUB, and crypttab/mdadm edits and a `dracut`/`update-grub` regeneration step if root is involved.
6. **Verify** — confirm uniqueness with blkid and a controlled remount/reboot test.

Output as: a collision map, the keeper/regenerate decision, the exact unmount-and-rewrite command sequence, and reference-update edits.

Default to caution: never change the UUID of a mounted or root-active filesystem; work from rescue media when root is involved.

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.