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
-
OverlayFS Layered Filesystem Debugging Prompt
Debug OverlayFS mounts behind containers and live images — whiteouts, copy-up surprises, ENOSPC on the upper layer, inode duplication, and metacopy/redirect quirks — instead of blaming the container runtime.
-
Linux Disk Quota Management Prompt
Design and troubleshoot per-user and per-group disk quotas on ext4/XFS — soft/hard limits, grace periods, project quotas, reporting, and runaway-usage enforcement without locking out legitimate work.
-
LVM Thin Provisioning & Online Resize Planning Prompt
Plan LVM thin pools and online filesystem grows safely — pool sizing, metadata, overprovisioning monitoring, and a step-by-step PV→VG→LV→filesystem resize that won't lose data.
-
Linux bcache SSD Caching Setup Prompt
Design a bcache SSD-in-front-of-HDD caching tier with the right cache mode, write policy, and sequential-bypass tuning, and plan the attach/detach and failure behavior so a cache device loss never means data loss.
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.