Fix: Ubuntu Laptop Stuck on the Initramfs Screen

Fix: Ubuntu Laptop Stuck on the Initramfs Screen
initramfs

If your Ubuntu laptop is stuck on the initramfs screen, it usually means there’s a problem with your boot process or filesystem. This issue often happens after an unclean shutdown, disk errors, or incorrect BIOS settings. Fortunately, in many cases, you can fix it without reinstalling Ubuntu.

In this guide, we’ll go step by step through different methods to resolve the issue.


Why Does Ubuntu Get Stuck on Initramfs?

The initramfs screen is essentially a minimal shell that appears when your system can’t boot normally. Common causes include:

  • Filesystem corruption after an improper shutdown
  • Incorrect or missing root partition UUID in /etc/fstab
  • Hard drive errors or failing storage hardware
  • Wrong BIOS/UEFI settings (AHCI, RAID, or Secure Boot)
  • Bootloader or kernel corruption

Method 1: Repair Filesystem from Recovery Mode

  1. Boot into Recovery Mode
    • Restart your laptop and press F2, F11, F12, or Esc (varies by BIOS) to access the boot menu.
    • Select Advanced options for Ubuntu.
    • Choose Recovery Mode.
    • Select Root access to drop into a root shell.
  2. Repair the Root Filesystem
    • At the prompt (#), type:sudo fsck -f /
    • If errors are found, repeat the command until no more errors appear.
    • If your root partition is not /, identify it (e.g., /dev/sda2) and run:sudo fsck -fy /dev/sda2
  3. Rebootreboot

If the issue is only filesystem-related, this often fixes it immediately.


Method 2: Use a Live USB to Repair

If recovery mode doesn’t work, try repairing from a Live USB.

  1. Boot from a Live USB
    • Insert a bootable Ubuntu USB stick.
    • Select Try Ubuntu to enter the live session.
  2. Identify the Root Partitionsudo fdisk -l
    df -h
    Look for your Linux root partition (e.g., /dev/sda1).
  3. Check /etc/fstab
    • Mount your root partition manually.
    • Open the fstab file:sudo nano /etc/fstab
    • Ensure the UUID matches the one from:blkid
    • If mismatched, replace it with the correct UUID.
  4. Repair the Filesystemsudo fsck -f /dev/sda1
  5. Reboot and Test

Method 3: Check BIOS and Hardware

Sometimes the problem is not with Ubuntu itself.

  • BIOS Settings
    • Set storage controller to AHCI (not RAID).
    • Disable Secure Boot.
    • Ensure your Ubuntu drive is first in the boot order.
  • Check Disk Health
    • From a live USB, install smartmontools:sudo apt install smartmontools
      sudo smartctl -a /dev/sda
    • Look for failing sectors or reallocated blocks.

If the hard drive is failing, replace it before continuing.


Method 4: Reinstall or Repair Bootloader

If none of the above work:

  • Try booting with an older kernel from the GRUB menu.
  • Update initramfs from a live USB:sudo update-initramfs -u
  • Reinstall GRUB if the bootloader is corrupted.
  • As a last resort, reinstall Ubuntu (make sure to back up important data first).

Useful Troubleshooting Commands

  • blkid → Lists block devices with UUIDs
  • fdisk -l → Lists disk partitions
  • fsck → Checks and repairs filesystem
  • dmesg → Shows boot errors
  • cat /var/log/syslog → View system logs

Final Thoughts

Getting stuck on the initramfs screen can feel intimidating, but most of the time, it’s due to a filesystem error that’s fixable with fsck. If you still can’t resolve the issue, check your disk health, verify BIOS settings, or reinstall Ubuntu.

If you’ve tried all the steps and are still facing issues, the Ubuntu community forums and Linux experts can be a big help.


Thank you so much for taking the time to read my blog! Your support and engagement truly mean a lot and inspire me to keep creating and sharing more valuable content. If you enjoyed this post, I’d love to hear your thoughts—feel free to leave a comment in the box below and join the conversation. And if you’d like to stay updated with the latest posts, tips, and insights, don’t forget to subscribe to my newsletter. By joining, you’ll be the first to know when new content is published, so you never miss an update.