Skip to main content
A Linux system that refuses to boot almost always shows its hand through error messages at the GRUB stage or during kernel initialization. Whether you are facing a blank GRUB prompt, a “file not found” error, or a filesystem that fails to mount at startup, the tools to diagnose and repair the problem are available directly from the boot environment — no external media required in most cases.

Understanding the Linux Boot Sequence

Before applying fixes, it helps to know where in the sequence the failure is occurring:
The firmware initializes hardware and hands off to the bootloader. If you see no output at all, or the firmware reports no bootable device, the issue is at this stage — check UEFI boot order settings.
GRUB loads the kernel and initramfs. Errors here appear as error: file '/boot/grub/grub.cfg' not found, unknown filesystem, or a bare grub> prompt. GRUB reinstallation resolves most of these.
The kernel mounts a temporary root filesystem (initramfs) and starts the device detection process. Kernel panic messages at this stage often point to a missing driver or a corrupted initramfs image.
The real root filesystem is mounted and systemd starts services. Failures here produce journal errors and often drop you to an emergency shell. Run journalctl -xb to read the log.

Step-by-Step Boot Repair

1

Read the Error Message and Access the GRUB Menu

When the system fails to boot, the first action is to capture the exact error text — it directly determines which repair path to follow.
  • If the machine reboots immediately without displaying anything, press Esc or Shift (BIOS systems) during POST to hold the GRUB menu open.
  • On UEFI systems, hold Shift immediately after the firmware logo disappears.
From the GRUB menu you can:
  • Edit a boot entry by pressing E — useful for adding temporary kernel parameters.
  • Drop to the GRUB shell by pressing C — useful for manually specifying a boot path.
Use Tab completion inside the GRUB shell to discover available partition names and kernel filenames without needing to memorize them.
2

Boot into Recovery Mode

Most Debian/Ubuntu-based distributions include a recovery mode entry in the GRUB menu that drops you to a root shell with minimal services running.
  1. At the GRUB menu, select the entry labelled “Advanced options for Ubuntu” (or your distribution’s equivalent).
  2. Select the recovery mode entry for the most recent kernel version.
  3. From the recovery menu, choose “Drop to root shell prompt” and press Enter.
  4. Remount the filesystem as read-write before making any changes:
On systems using systemd, if you are dropped to an emergency shell automatically, the filesystem is likely already mounted read-only. Always run the remount command above before attempting repairs.
For distributions without a recovery menu (e.g., Arch, Fedora), append systemd.unit=rescue.target to the kernel command line in the GRUB editor (press E at the GRUB menu).
3

Check and Repair a Corrupted Filesystem with fsck

fsck (filesystem consistency check) scans and repairs ext4, xfs, and other Linux filesystems. It must be run on an unmounted or read-only filesystem.
  1. Identify the device name of your root partition:
  1. Unmount or remount the partition read-only:
  1. Run fsck with automatic repair enabled:
Never run fsck on a mounted read-write filesystem — doing so will corrupt it further. If you cannot unmount the root partition from within the running system, boot from a live USB/CD instead.
  1. If fsck reports “UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY”, run it a second time on the unmounted device. Multiple passes are sometimes required for severely damaged filesystems.
  2. After a clean fsck run, reboot:
4

Reinstall GRUB to Fix a Broken Bootloader

If GRUB’s core image or configuration files are missing or corrupted, you need to reinstall GRUB from a working environment. The most reliable method uses a live USB.Preparation: Boot from a Live USBBoot your distribution’s live ISO (Ubuntu, Debian, etc.) and open a terminal.1. Identify your disk layout:
2. Mount the installed system:
3. Chroot into the installed system:
4. Reinstall GRUB:
5. Exit the chroot and reboot:
If update-grub reports “Warning: os-prober will not be executed”, and you have other operating systems on the disk, add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub and rerun update-grub.
5

Edit GRUB Configuration and Kernel Parameters

Persistent kernel boot parameters — such as disabling a problematic driver, forcing a specific root device, or enabling verbose logging — are managed through the GRUB default configuration file.Temporary change (single boot):Press E at the GRUB menu to edit the boot entry. Find the line beginning with linux and append your parameters after quiet splash. Press Ctrl+X or F10 to boot.
Permanent change:
Do not manually edit /boot/grub/grub.cfg — it is auto-generated and your changes will be overwritten the next time update-grub runs. Always make persistent changes in /etc/default/grub.
Verify the active kernel command line after booting:
6

Rebuild the initramfs Image

If the kernel loads but panics before mounting the root filesystem, the initramfs (initial RAM filesystem) image may be missing or corrupted. Rebuild it from recovery mode or a chroot environment.
After rebuilding, rerun update-grub (or the equivalent) to ensure GRUB’s config points to the new image, then reboot.

Escalation

If fsck completes but reports unrepairable errors, the underlying storage device may have bad sectors. Run a SMART diagnostic to assess drive health:
A FAILED SMART status or a high count of reallocated sectors indicates the drive needs replacement before data can be trusted.
Boot back into the live environment and check whether the initramfs image exists and is non-zero in size (ls -lh /mnt/boot/). A missing or zero-byte initramfs is a common cause of post-GRUB kernel panics. Rebuild it as shown in Step 6.
  1. Save the full output of journalctl -xb and dmesg to a USB drive for review.
  2. Document the exact GRUB error message and all repair steps attempted.
  3. Submit a detailed ticket to your Linux systems administrator or IT helpdesk, including the distribution version (cat /etc/os-release), kernel version (uname -r), and disk layout (lsblk -f).