How to Fix a Broken Bootloader in Ubuntu (GRUB / initramfs Repair Guide)

Published On: November 4, 2025
Follow Us
How to Fix a Broken Bootloader in Ubuntu

initramfs Repair Guide:Boot issues in Ubuntu can be frustrating — especially when your system stops at a black screen showing GNU GRUB or (initramfs) instead of starting normally.
These problems are usually caused by a corrupted GRUB bootloader, a missing initramfs image, or a filesystem error that prevents Ubuntu from finding its root partition.

Fortunately, you can repair your system without reinstalling Ubuntu.
This guide explains why it happens, how to fix it step-by-step, and how to prevent it in the future.


🧩 Understanding the Problem

When Ubuntu boots, several things happen:

  1. BIOS/UEFI loads and passes control to the GRUB bootloader.
  2. GRUB loads the Linux kernel and initramfs (initial RAM disk).
  3. The kernel mounts the root filesystem and starts Ubuntu.

If any of these parts are missing or corrupted, you’ll see one of the following:

  • GNU GRUB menu appears but Ubuntu won’t start.
  • A GRUB prompt (grub>) or rescue mode (grub rescue>).
  • A BusyBox shell or (initramfs) prompt with errors like:

Step 1: Try Booting from the GRUB Menu

If you see the GRUB menu (options like “Ubuntu” or “Advanced options for Ubuntu”):

  1. Select Advanced options for Ubuntu.
  2. Choose a (recovery mode) kernel.
  3. From the recovery menu, select root – Drop to root shell prompt.
  4. Then run:
sudo update-grub
sudo grub-install /dev/sda
reboot
  1. (Replace /dev/sda with your system drive if different.)

If it reboots successfully, your GRUB configuration was simply out of sync.


🧱 Step 2: Fix from the (initramfs) Prompt

If Ubuntu drops into a minimal shell that looks like:

(initramfs)

(Replace /dev/sda2 with the partition containing Ubuntu.)

3. When it finishes:

exit

or

reboot

If the problem was filesystem corruption, your system should boot normally now.


💿 Step 3: Repair GRUB from a Live Ubuntu USB

If Ubuntu still won’t start, or you’re stuck at grub>:

  1. Boot your VM or PC using a Live Ubuntu USB (choose “Try Ubuntu”).
  2. Open a terminal and mount your root partition:
sudo fdisk -l
sudo mount /dev/sda2 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

Enter your installed system (chroot):

sudo chroot /mnt

Rebuild the boot system:

update-initramfs -u -k all
update-grub
grub-install /dev/sda
exit
sudo reboot

You should now boot directly into Ubuntu again.


⚙️ Step 4: Check /etc/fstab for UUID Errors

If you saw an error like:

ALERT! UUID=xxxx does not exist

then your filesystem identifiers don’t match.

sudo blkid

Compare them to entries in /etc/fstab:

cat /etc/fstab

If any UUIDs differ, update /etc/fstab:

Step 5: Verify Everything Works

Run these final commands once Ubuntu boots:

sudo update-initramfs -u -k all
sudo update-grub
sudo grub-install /dev/sda
sudo touch /forcefsck
sudo reboot

This ensures GRUB, initramfs, and your filesystems are clean and synced.


🔒 Step 6: Prevent Future Boot Failures

  • Always shut down properly. Power loss during disk writes can corrupt /boot or /.
  • Keep backups of your data and configuration.
  • Regularly update your system to apply kernel and GRUB fixes:
sudo apt update && sudo apt upgrade -y

Avoid deleting old kernels manually from /boot. Use:

sudo apt autoremove --purge
  • instead.

🧠 Summary

ProblemLikely CauseFix
Stuck at GRUB menuBroken GRUB configurationupdate-grub & grub-install
grub> or grub rescue> promptMissing bootloaderRepair GRUB from Live USB
(initramfs) shellFilesystem or UUID problemfsck /dev/sda2 -y or correct /etc/fstab
Boots sometimes, fails other timesInconsistent initramfsupdate-initramfs -u -k all

sapan singh

👨‍💻 About Sapan Singh Hi, I’m Sapan Singh — a passionate software developer with a strong love for technology, gaming, and building useful digital tools.

Join WhatsApp

Join Now

Join Telegram

Join Now

1 thought on “How to Fix a Broken Bootloader in Ubuntu (GRUB / initramfs Repair Guide)”

Leave a Comment