← All guides
TroubleshootingIntermediate

Recover a Linux system that will not boot

A calm recovery workflow for full disks, broken filesystems, failed updates, initramfs problems, and bootloader issues.

Boot failures are stressful because several layers disappear behind one symptom. Recovery gets easier when you identify the last layer that still works: firmware, bootloader, kernel, initramfs, root filesystem, or userspace.

First: preserve evidence and data

Photograph the exact error. Note what changed before the failure. If the disk reports I/O errors or unusual noises, prioritize copying irreplaceable data rather than repeatedly forcing repairs.

Boot a live USB in the same firmware mode as the installed system—usually UEFI. Open a terminal and map the storage:

lsblk -f
sudo blkid

Identify the root filesystem, EFI System Partition, and any separate boot or home partitions. Do not guess device names.

Check whether the disk is simply full

Mount the root filesystem:

sudo mount /dev/nvme0n1p3 /mnt
df -h /mnt
df -i /mnt

A system can fail because it has no free blocks or no free inodes. Inspect large directories without crossing into other filesystems:

sudo du -xhd1 /mnt/var | sort -h

Logs, package caches, container layers, and old snapshots are common causes. Remove only data you understand. Do not recursively delete broad system paths.

Check the filesystem offline

Filesystem repair tools must match the filesystem type. Unmount it first:

sudo umount /mnt
sudo fsck -f /dev/nvme0n1p3

For XFS use xfs_repair; for Btrfs start with btrfs check --readonly and consult its recovery documentation before any destructive repair. If drive health is suspect, image the disk first.

Enter the installed system with chroot

Mount root and the required virtual filesystems:

sudo mount /dev/nvme0n1p3 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount --bind "$i" "/mnt$i"; done
sudo chroot /mnt

Inside the chroot, inspect package-manager history and finish interrupted upgrades using your distribution’s documented commands. Rebuild the initramfs if the failure began after a kernel or storage change:

# Debian/Ubuntu family
update-initramfs -c -k all

# Fedora family
dracut --regenerate-all --force

Use the command appropriate for your distribution; do not run both.

Repair the bootloader only when evidence points there

If the firmware cannot find a boot entry, inspect UEFI entries with efibootmgr -v. If GRUB appears but cannot load the kernel, verify /boot, configuration, and initramfs first.

Bootloader installation commands vary by firmware mode and distribution. Follow your distribution’s current recovery documentation, double-check the target disk, and never install to a partition when the instructions require a whole disk.

Unmount cleanly

Exit the chroot, then unmount in reverse order:

exit
for i in /run /sys /proc /dev/pts /dev; do sudo umount "/mnt$i"; done
sudo umount /mnt/boot/efi
sudo umount /mnt

Reboot and remove the live USB. If the system starts, immediately inspect logs from the failed boot with journalctl -b -1, update backups, and write down the root cause.

The important habit

Do not jump directly to reinstalling the bootloader. First identify the last working layer, protect data, map partitions, read the precise failure, and repair the smallest broken component.