Home Ubuntu How To Fix Busybox Initramfs Error On Ubuntu

How To Fix Busybox Initramfs Error On Ubuntu

A Step-by-Step Guide to Solve Busybox Initramfs error on Ubuntu and its Derivatives such as ElementaryOS, Linux Mint and Pop!_OS.

By sk
Published: Updated: 708.8K views 5 mins read

This brief guide explains how to fix Busybox Initramfs error on Ubuntu Linux. I am using Ubuntu 20.04 LTS as my daily driver on my Dell Inspiron laptop. Today I turned it ON and the boot process dropped me to the BusyBox shell and I ended up at the initramfs prompt.

As far as I can remember, I did nothing wrong. I didn't forcibly power off the system. It was working just fine yesterday! However, today when I powered it on, I encountered an unexpected issue during the boot process.

Instead of loading normally, I found myself redirected to the BusyBox shell and eventually reached the initramfs prompt.

BusyBox v1.30.1 (Ubuntu 1:1.30.1-4ubuntu6.1) built-in shell (ash) 
Enter 'help' for a list of built-in commands.

(initramfs)

I can't get past this screen. Also it doesn't show what exactly the problem is. All I see is just a blank busybox shell.

I wasn't sure about what to do at this point. So I simply entered the exit command to see what happens next.

And then I saw the actual error:

(initramfs) exit
/dev/sda1 contains a file system with errors, check forced.
Inode 4326476 extent tree (at level 1) could be narrower, IGNORED.
/dev/sda1: Inode 4326843 extent tree (at level 1) could be narrower, IGNORED.
/dev/sda1: Inode 4327012 extent tree (at level 1) could be narrower, IGNORED.
/dev/sda1: Inode 4329004 extent tree (at level 1) could be narrower, IGNORED.
/dev/sda1: Inodes that were part of a corrupted orphan linked list found.

/dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options) 
fsck exited with status code 4. 
The root filesystem on /dev/sda1 requires a manual fsck. 

BusyBox v1.30.1 (Ubuntu 1:1.30.1-4ubuntu6.1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)
Busybox Initramfs Error On Ubuntu
Busybox Initramfs Error On Ubuntu

As you can see in the above output, the /dev/sda1 partition is corrupted. The file system in this partition has some errors.

If you ever encountered with this type of problem, you need to check and repair the problematic Linux filesystems with fsck command.

Please note that sometimes you don't see any errors after typing the exit command. In that case, try to run fsck on all filesystems.

What are Busybox and Initramfs?

For those wondering, BusyBox is software suite that provides many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc.

Initramfs is an initial ram file system based on tmpfs. It contains the tools and scripts required to mount the file systems before the init binary on the real root file system is called.

Fix Busybox Initramfs Error on Ubuntu Linux

1. To solve initramfs error on Ubuntu Linux, you need to repair the filesystem in the corrupted partition using fsck command like below:

(initramfs) fsck /dev/sda1 -y

Replace /dev/sda1 with your partition name. In your system, it could be /dev/sdb1, /dev/sdc1 etc. You can use cat /proc/partitions or blkid or lsblk commands to get your Linux partition details in Busybox. Refer this guide to list disk partitions in Linux. Don't forget to pass the -y flag. Otherwise, you should manually type -y and hit ENTER each time to fix an error.

2. Now the fsck command will start to fix all bad blocks automatically in the filesystem.

After a couple minutes, you will see an output like below:

/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: 497733/30531584 files (1.5% non-contiguous), ........

3. Next, type reboot and hit ENTER to restart your system!

(initramfs) reboot
Fix Busybox Initramfs Error On Ubuntu Linux
Fix Busybox Initramfs Error On Ubuntu Linux

If the reboot command doesn't work, type exit and hit ENTER.

Cross your fingers and wait for the system to reboot! If all goes well, your system will boot normally without any problem.

These steps helped me and many others (see the comment section below) to solve Busybox Initramfs error on Ubuntu Linux operating system. If you are stuck in initramfs prompt, this guide will definitely help to fix initramfs error in Ubuntu.

This isn't exclusively for Ubuntu OS. The initramfs error can occur on Debian, and other Ubuntu derivatives such as Pop OS, Linux mint etc. In order to fix initramfs error in Debian-based systems, simply follow the aforementioned steps.

Heads Up: If you keep getting this error often, probably your hard disk is getting weaker. In that case, it is recommended to backup the data and replace the hard disk as soon as possible.

What if I can't Fix it from Busybox Shell? Try Rescue Mode

Some users have commented that they can't type anything in the initramfs prompt. In that case, please boot into the rescue mode and try to repair the filesystem. The following guide explains how to boot in to rescue mode in Ubuntu.

How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu

If your Ubuntu system is crashed due to power failure or network connectivity issue in the middle of the upgrade process, you might end up with broken Ubuntu. In that case, you can easily fix broken Ubuntu without reinstalling it as described in the following guide.

Similar Read:

Featured image by ErfourisStudio from Pixabay.

You May Also Like

150 comments

y_b December 6, 2024 - 1:40 pm

Thank you so much, you saved my life !!!

Reply
zyn February 2, 2025 - 9:35 pm

TYSM

Reply
Marc February 8, 2025 - 5:51 pm

Encountered this issue this morning and was able to solve thanks to your wonderful tutorial. Thanks so much!

Reply
chris February 16, 2025 - 7:23 pm

You are a genius ! Thankyou

Reply
1 9 10 11

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More