Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Linux / Ubuntu/Mint/Kali Boots to Initramfs Prompt in BusyBox

March 11, 2024

Ubuntu/Mint/Kali Boots to Initramfs Prompt in BusyBox

In this article we’ll show how to solve problems that occur when a computer running Linux Ubuntu/Mint/Kali doesn’t boot or drops to a busybox prompt during the initramfs initialization. The user can access and use only the initramfs command prompt.

Initramfs is the initial tmpfs-based file system in the RAM that doesn’t use a separate block device. Like the initrd, it contains tools and scripts to mount file systems prior to calling init located in the root file system.

Ubuntu Linux boots to BusyBox initramfs prompt

Repairing a broken Ext4 Superblock in LInux

If Ubuntu crashes into a busybox during the initramfs initialization, there may be a damaged superblock on the disk.

everal superblock copies are kept in Linux. To recover a system in case this problem occurs, you need to boot from the rescue image/disk/Live CD and run the terminal prompt. After booting, enter the following command in the terminal:

# sudo fdisk -l|grep Linux|grep -Ev 'swap'

The command returns the information about your volume:

/dev/vda2 4096 83884031 83879936 40G Linux filesystem

Remember the volume name and specify it in the following command:

# sudo dumpe2fs /dev/vda2 | grep superblock

The command will show the list of backup superblocks:

dumpe2fs get backup superblock

We will use the second backup superblock to replace the damaged one (you can use any superblock except Primary). Check the disk using the backup superblock:

# sudo fsck -b 98304 /dev/vda2 -y

If you get this output:

fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
/dev/vda2 is mounted.
e2fsck: Cannot continue, aborting

Unmount the volume:

# umount /dev/vda2

After successfully replacing the superblock, you will get a message like this:

fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
/dev/vda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #231 (32254, counted=32253).
Fix? yes
Free blocks count wrong for group #352 (32254, counted=32248).
Fix? yes
Free blocks count wrong for group #358 (32254, counted=27774).
Fix? yes
..........
/dev/vda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/vda2: 85986/905464576 files (0.2% non-contiguous), 3904682/905464576 blocks

Then unmount the boot media and restart your computer. Everything should work properly.

Fsck Boot Error: Unexpected Inconsistency

The second variant of the initramfs (BusyBox) issue includes the following message in the terminal window:

/dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
The root filesystem on /dev/sda1 requires a manual fsck.

linux busybox UNEXPECTED INCONSISTENCY, filesystem /dev/sda1 requires a manual fsck

If you do not see it, try to enter (initramfs) exit in the terminal window. The error may appear after you do it…

The message will show a volume that that requires running a manual disk check. Run the following command in the initramfs prompt:
# fsck /dev/sda1 -y
After the disk check is over, restart your computer and make sure that Linux boots correctly.

Alert!  /dev/volume Does Not Exist

Fstab Issue

You can see the following error when booting the Linux host:

ALERT! /dev/sda1 does not exist. Dropping to a shell.

busybox initramfs /dev/sda1 does not exist. Dropping to a shell

You may have just installed your Linux or your host has some fstab problems. The most often the problem occurs when a system is installed from a USB drive. The system may show an error of any volume. Like in the first case, we have to boot from the rescue/boor Linux media and do some actions. Check the disk UUID using this command:
# sudo blkid

The system will return something like this:

/dev/sda2: UUID="36cce3d5-cbdb-46f4-adbf-3f9aaa01d729" TYPE="ext4" PARTUUID="fea4dab1-4e12-4327-85c6-76ade18f64e1"

Here we see that the system must boot from sda2, but actually it tries to boot from sda1.

Mount the volume to any directory, for example:

# sudo mount /dev/sda2 /mnt

When you see /dev/sda2 in the /mnt directory, find the file /etc/fstab there and modify the line containing /dev/sda1 as follows:

UUID=36cce3d5-cbdb-46f4-adbf-3f9aaa01d729 / ext4 errors=remount-rw 0 1

Save the file. Unmount the volume from /mnt and reboot. If the problem was related to the wrong volume name, the server would boot.

Also, you can solve this problem by booting in the emergency mode. Remount the root directory as read/write:
# sudo mount -o remount,rw /
Then change fstab and restart the server.

Hardware Problem

On some motherboards, SATA ports may get random numbers. It may also cause the error described in the previous section. To fix it, you must edit the grub bootloader.

Boot in the emergency mode or from a Live CD and edit the /boot/grub/grub.cfg file.

In the line that determines the boot volume, for example:

Linux /boot/vmlinuz-4.15.0-70-generic root=/dev/sda1 rw quiet elevator=noop fsck.repair=yes

Replace the path to the disk by its UUID:

Linux /boot/vmlinuz-4.15.0-70-generic root=UUID=36cce3d5-cbdb-46f4-adbf-3f9aaa01d729 ro quiet elevator=noop fsck.repair=yes

grub.cfg replace volume name to UUID

3 comments
7
Facebook Twitter Google + Pinterest
Linux
previous post
Match Windows Disks to VMWare VMDK Files
next post
How to Set a User Thumbnail Photo in Active Directory

Related Reading

How to Check Disk Performance (IOPS and Latency)...

March 11, 2024

Install and Configure SNMP on RHEL/CentOS/Fedor

March 13, 2024

How to Configure MariaDB Master-Master/Slave Replication

March 11, 2024

KVM: How to Expand or Shrink a Virtual...

March 11, 2024

Compress, Defrag and Optimize MariaDB/MySQL Database

March 11, 2024

Configuring Routing on Linux (RHEL/CentOS)

March 13, 2024

Keepalived: Configuring High Availability with IP Failover on...

March 13, 2024

Configuring High Performance NGINX and PHP-FPM Web Server

March 13, 2024

3 comments

Shlomi August 24, 2020 - 8:58 pm

Amazing!!! Thanks alot

Reply
random January 15, 2022 - 10:11 pm

Great THREAD EXPLAINING.

Reply
Pozdrawiam September 10, 2024 - 4:06 pm

At first I was affaraid that windows OS hub makes some harm to mine Linux distro since it is infected by Windows mindset. At the begining I was a little disgusted by the name and expect the gates face poking on me and ask for a ‘support payments’ and for mine windoze PRODUCT_ID, Confirmation ID, purchase proof_ID, size of mine shoe and size of mine Willy, but luckly any windows related crap and spying was ommited and I could go straight to the `service`. The explained prodecure went smoothly for me, and I have not to be pushed to pay for some to sc.mbags. I’m kinda scared that I fall in ubuntu/Debian/systemd trap but soon I will tear away from me that wicked mindset and migrate to true FOSS environment. It worked – I did this for all mine filesystem – I have 3 Linuxes in mine box. For most bizzare thing – as I sam fsck in action – the last empty ext4 partition /dev/sda6 was full of errors in 1st attampt (just fsck), at nd attempt, I used backup of superblock from each partition and forced fsck to check them again. After finishing and restart everything OK /root password escaped :D/. Thanks to the Porteus Live CD

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Configure MariaDB Master-Master/Slave Replication
  • KVM: How to Expand or Shrink a Virtual Machine Disk Size?
  • How to Install and Use ClamAV Antivirus on CentOS/RHEL
  • Install and Configure SNMP on RHEL/CentOS/Fedor
  • Configuring High Performance NGINX and PHP-FPM Web Server
  • Configuring Routing on Linux (RHEL/CentOS)
  • Compress, Defrag and Optimize MariaDB/MySQL Database
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top