| Symptom | Reach for |
|---|---|
| No bootloader | |
| Kernel can't find root device | |
| Boot drops to emergency mode | $ findmnt |
| Lost root password | $ passwd |
| Dirty filesystem | $ fsck |
| Broken packages | $ dpkg |
| Failing disk | $ smartctl |
| Deleted files | $ testdisk |
| Command | Shows |
|---|---|
| lsblk -f | Devices, filesystems, labels, mountpoints |
| blkid | UUID and type per partition |
| fdisk -l | Partition tables and sizes |
| findmnt | Current mount tree |
| Distribution | Rebuild command |
|---|---|
| Debian / Ubuntu | update-initramfs -u -k all |
| Arch | mkinitcpio -P |
| Fedora / RHEL | dracut -f --regenerate-all |
| Filesystem | Check / repair |
|---|---|
| ext2/3/4 | fsck -f, e2fsck -fy |
| XFS | xfs_repair |
| Btrfs | btrfs check, --repair (last resort) |
| FAT / exFAT | fsck.vfat -a, fsck.exfat |