Linux System Boot Failure and GRUB Repair¶
Linux distributions (such as Ubuntu, Debian, Fedora, Arch, RHEL, and CentOS) can experience boot failures caused by corrupted GRUB bootloader stages, full root filesystems (/), broken kernel updates, or initramfs emergency prompts. Command-line recovery restores system bootability.
Step 1: Recovering from initramfs Emergency Prompt¶
If the system boots to a (initramfs) or dracut shell prompt:
1. Identify the root partition filesystem by typing blkid or ls /dev/sd* or ls /dev/nvme*.
2. Run a filesystem check: fsck -y /dev/sda1 (replace /dev/sda1 with your actual root drive partition).
3. Type reboot once fsck repairs filesystem errors.
Step 2: Fixing 100 Percent Full Root Disk Lockout¶
If Linux hangs on boot due to an exhausted root partition:
1. At the GRUB boot menu, press e to edit the kernel boot line.
2. Locate the line starting with linux or linux16, navigate to the end of the line, add systemd.unit=emergency.target or single, and press Ctrl+X to boot.
3. Log into the emergency shell and clear system logs:
- journalctl --vacuum-size=100M
- apt-get clean (on Debian/Ubuntu) or dnf clean all (on Fedora/RHEL)
- Remove old log files in /var/log/ to free space, then reboot.
Step 3: Reinstalling GRUB Bootloader via Live USB Chroot¶
If GRUB is completely missing or displays grub rescue>:
1. Boot the computer using a live Linux USB installer.
2. Open a terminal and mount your system root partition: sudo mount /dev/sda1 /mnt
3. Bind system directories:
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
4. Enter the chroot environment: sudo chroot /mnt
5. Reinstall GRUB to the drive MBR/EFI: grub-install /dev/sda and update configuration: update-grub
6. Exit chroot and reboot: exit then sudo reboot