The “Failed to mount /home” error and a missing UUID
If you boot into a black screen and the kernel spits out
Failed to mount /home
you’re almost certainly dealing with a stale or wrong UUID in /etc/fstab.
Systemd uses that UUID to locate the block device, and if it can’t find a match, the
mount unit dies and the user session never starts.
1. Identify the missing UUID
# Show all block devices with their UUIDs
sudo blkid
# Or a tree view
sudo lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,UUID
Look for the entry that should be /home. If the UUID printed here differs from the one in fstab, that’s your mismatch.
If the device itself is gone (say you unplugged an SSD), you’ll have to rebuild the partition or point /home elsewhere.
2. Update /etc/fstab
Open the file as root:
sudo nano /etc/fstab
Find the line for /home. It’ll look something like:
UUID=old-uuid /home ext4 defaults 0 2
Swap old-uuid for the correct one you just found. If you want a more resilient identifier, use a label:
LABEL=home /home ext4 defaults 0 2
After editing, sanity‑check with:
sudo mount -a
No errors? Good, the syntax is fine.
3. Persist the change across reboots
mount -a only tests the current session. Reboot to make sure the system can start cleanly:
sudo reboot
On the next boot, systemd reads the updated /etc/fstab and should mount /home without a hitch.
4. Common pitfalls and trade‑offs
| Pitfall | Fix | Trade‑off |
|---|---|---|
Using /dev/sdX names |
Switch to UUID or LABEL | /dev/sdX can change after a device swap |
Editing /etc/fstab as a non‑root user |
Use sudo or visudo‑style editing |
Requires root privileges, but prevents accidental writes |
Leaving fstab permissions at 644 |
Set to 600 | Reduces tampering risk, but you must remember to use sudo for edits |
5. Security considerations
- Device renaming – Relying on
/dev/sdXnames is a recipe for disaster. The kernel can reassign names after a reboot or when a new disk is attached. UUIDs keep you anchored. - fstab integrity – Keep
/etc/fstabreadable only by root (chmod 600 /etc/fstab). A compromised file could mount malicious filesystems. - Audit mounts – Run
systemd-analyze blameorjournalctl -u systemd-fsck@*.serviceto spot slow or suspicious mounts that might hint at tampering.
6. Quick reference
# Show UUIDs
sudo blkid
# Test fstab
sudo mount -a
# Reboot to apply
sudo reboot
If the error sticks after you’ve updated the UUID, dig into the journal:
journalctl -xe | grep /home
Messages like “device not found” or “invalid UUID” point to something deeper—perhaps a corrupted partition table or hardware failure.
7. Resources
- Kernel.org – blkid
- Systemd.io – Mount units
- Arch Linux – fstab
See also
- Using systemd Socket Activation to Keep a Lightweight HTTP Server Idle Until the First Request
- Denying write access on /tmp: a quick fix to stop local privilege escalation
- Using SSH Keys with Multiple Accounts on a Single Remote Server
- Taming Container Logs with Loki and systemd Journal
- Taming the DNS Resolver: Getting resolvectl to Play Nice with Your Home Network