Understanding the Linux Boot Sequence
Before applying fixes, it helps to know where in the sequence the failure is occurring:Stage 1: Firmware (BIOS/UEFI)
Stage 1: Firmware (BIOS/UEFI)
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.
Stage 2: GRUB bootloader
Stage 2: GRUB bootloader
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.Stage 3: Kernel and initramfs
Stage 3: Kernel and initramfs
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.
Stage 4: init / systemd
Stage 4: init / systemd
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.
- 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.
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.For distributions without a recovery menu (e.g., Arch, Fedora), append
- At the GRUB menu, select the entry labelled “Advanced options for Ubuntu” (or your distribution’s equivalent).
- Select the recovery mode entry for the most recent kernel version.
- From the recovery menu, choose “Drop to root shell prompt” and press Enter.
- 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.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.- Identify the device name of your root partition:
- Unmount or remount the partition read-only:
- Run fsck with automatic repair enabled:
- 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.
- 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:
- BIOS / Legacy Systems
- UEFI Systems
- Fedora / RHEL (grub2)
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 Permanent change:Verify the active kernel command line after booting:
linux and append your parameters after quiet splash. Press Ctrl+X or F10 to boot.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
When fsck cannot repair the filesystem
When fsck cannot repair the filesystem
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.GRUB reinstall succeeds but system still won't boot
GRUB reinstall succeeds but system still won't boot
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.Escalation path
Escalation path
- Save the full output of
journalctl -xbanddmesgto a USB drive for review. - Document the exact GRUB error message and all repair steps attempted.
- 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).