HomeLinuxHow to Fix BusyBox Initramfs Error in Ubuntu?

How to Fix BusyBox Initramfs Error in Ubuntu?

BusyBox v1.30.1 (Ubuntu 1:1.27.2-2ubuntu3.2) built-in shell (ssh) 
Enter 'help' for a list of built-in commands.

(initramfs)

This guide walks you through resolving the bad blocks error in Ubuntu using FSCK, particularly the BusyBox Initramfs error. Follow these steps carefully to restore your system.

Step 1: Access the Initramfs Prompt

Boot into Ubuntu until you reach the initramfs prompt. The error likely occurs due to bad blocks in memory, affecting file system integrity.

Step 2: List the Available Partitions

  1. Type the following command and press the Enter key:
blkid

You’ll see a list of all partitions on your disk. For example, my system outputs the following result for the command “blkid”:

Here, look for the TYPE="swap" in the output. The line with this written will be the swap partition of your system. In my case (in the screenshot I provided above), it is /dev/sdb9. Partitions with TYPE="ext4" are likely used for root (/) or home (/home). To confirm which partition is root, home, or swap, use the command “lsblk” or try viewing the file /etc/fstab.

Step 3: Run FSCK on the Partitions

To fix issues, run the fsck command on each partition: swap, home, and root. In my case, the swap partition is /dev/sdb9, so I execute the below command:

fsck /dev/sdb9 -y

Replace /dev/sdb9 in the above command with the actual swap partition on your system. If no bad sectors are found, move on to the home partition and then to the root partition.

If the partition has issues, FSCK will attempt to fix them. You’ll see messages like:

"File system was modified."
"Non-contiguous files were fixed."

Step 4: Reboot the System

Execute the below command on the same screen to reboot the system:

reboot

Your system should now boot successfully into Ubuntu. After logging in, confirm that your Ubuntu system is functioning as expected.


Using FSCK, you’ve resolved the BusyBox initramfs error and restored your Ubuntu system. Consider checking the hardware for potential disk failures if you encounter further issues.

Scroll to Top