How to fix busybox initramfs error on Ubuntu?


Recently when I open my system it boots for a few seconds and then brings me to initramfs prompt. As far as I can remember the last time when I use this system I did nothing wrong with it or nothing unexpected happened then why the system running into this problem.

Here I will discuss this problem and share the solution how to fix the issue on a Ubuntu system.

The initramfs prompt look like this:

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)

Here you can check the list of commands that can be used on this prompt by using the help command. Enter the help to see the list. It shows the exact problem when I used the exit command on this prompt.

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

/dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
fsck exited with status code 4.
The root filesystem on /dev/sda6 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)

Since I am using a dual boot system Windows 10 with Ubuntu I installed Ubuntu on /dev/sda6 and it is the root filesystem. As you can see in the output above the error is caused due to the unexpected inconsistency in the filesystem on /dev/sda6.

It also suggests using the fsck utility to check and fix the file system on /dev/sda6.

Fixing busybox initramfs error on Ubuntu

To fix this issue you need to use the fsck command in your prompt. In our case, I will use –

(initramfs) fsck /dev/sda6 -y

Replace /dev/sda6 with the partition name that is given on your system. You can see the detailed list of partitions by using blkid or cat /proc/partitions if using exit command doesn’t show any partition then use fsck command for all the Linux partitions. If you are using the system in the dual boot you can identify Linux partitions by the ext file system.

Now fsck will start fixing bad blocks automatically. Once it gets done you will see output something like the given below.

/dev/sda6: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda6: 497833/30731584 files (1.5% non-contiguous), ........

Now use the given command to restart your system.

(initramfs) reboot

This issue should be fixed now.

Another approach is to boot the system from a live USB with the same GNU/Linux distribution version. First, check hardware (dmesg shows for example whether hard disks are operational or producing failing messages), and then if they are properly functioning then use fsck to scan and fix all the Linux partitions.

What is the busy box? (Optional)

Busybox is a software suite that provides several Unix utilities in a single small executable file. It is specifically created for embedded operating systems with very limited resources. It provides a replacement for most of the utilities you normally find in GNU files, shellutils, etc.

Initramfs is an original ram file system based on tmpfs. It contains the tools and scripts needed to mount the file system before the init binary on the actual root file system is called.

Conclusion

I hope this fixes the issue on your system. Now if you have any query then write us in the comments below.

1 thought on “How to fix busybox initramfs error on Ubuntu?”

  1. Why are you copying our guides? I am the original content author of this material and you allegedly copied everything from my site. https://ostechnix.com/how-to-fix-busybox-initramfs-error-on-ubuntu/

    I want you to remove it without any further explanations in 24 hours. Otherwise, I am going to file DMCA complaint in Google. I will also put complaint in EZOIC platform to revoke your ads and disable your account permanently.

    I am currently analyzing your blog for more content theft. If I find anything, I will also report them to the respective owners.

    Reply

Leave a Comment

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