Problem Statement
What can you do if a Linux system won't boot?
Explanation
Boot troubleshooting: boot from live USB/CD to access system. Mount root filesystem: mkdir /mnt/root && mount /dev/sda1 /mnt/root. Check /var/log files for errors. Common issues: corrupted filesystem (fsck /dev/sda1 repairs), broken bootloader (grub-install /dev/sda reinstalls), fstab errors (edit /mnt/root/etc/fstab), kernel panic (boot older kernel from GRUB menu).
GRUB rescue: list partitions with ls, set root=(hd0,1), set prefix=(hd0,1)/boot/grub, insmod normal, normal to boot. Then reinstall: grub-install /dev/sda, update-grub. Single-user mode: add single to kernel parameters in GRUB for root shell without password (security risk but useful for recovery).
Chroot: mount system, bind system directories: mount --bind /dev /mnt/root/dev, same for /proc, /sys, /run, then chroot /mnt/root to run commands as if booted. Useful for reinstalling packages, updating config, or fixing broken system.
Prevention: maintain backup kernels, test changes before reboot, keep rescue USB handy, document configuration changes. Understanding boot process and recovery procedures minimizes downtime.
