Skip to content
CloudOps
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.
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