Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

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

August 10, 2020 LinuxUbuntu

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

2 comments
3
Facebook Twitter Google + Pinterest
previous post
Configuring Network Adapter Settings with PowerShell: IP Address, DNS, Default Gateway, Static Routes
next post
Managing User Photos in Active Directory Using ThumbnailPhoto Attribute

Related Reading

Adding Trusted Root Certificates on Linux

January 9, 2023

How to Install and Configure Squid Proxy Server...

December 6, 2022

Using iPerf to Test Network Speed and Bandwidth

September 29, 2022

Moving WSL to Another Drive in Windows

September 29, 2022

Install Windows Subsystem for Linux (WSL 2) on...

September 20, 2022

2 comments

Shlomi August 24, 2020 - 8:58 pm

Amazing!!! Thanks alot

Reply
random January 15, 2022 - 10:11 pm

Great THREAD EXPLAINING.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configure User’s Folder Redirection with Group Policy

    February 3, 2023
  • Using Previous Command History in PowerShell Console

    January 31, 2023
  • How to Install the PowerShell Active Directory Module and Manage AD?

    January 31, 2023
  • Finding Duplicate E-mail (SMTP) Addresses in Exchange

    January 27, 2023
  • How to Delete Old User Profiles in Windows?

    January 25, 2023
  • How to Install Free VMware Hypervisor (ESXi)?

    January 24, 2023
  • How to Enable TLS 1.2 on Windows?

    January 18, 2023
  • Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    January 17, 2023
  • Fix: Can’t Extend Volume in Windows

    January 12, 2023
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11

    January 11, 2023

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Configure MariaDB Master-Master/Slave Replication?
  • How to Mount Google Drive or OneDrive in Linux?
  • KVM: How to Expand or Shrink a Virtual Machine Disk Size?
  • Hyper-V Boot Error: The Image’s Hash and Certificate Are not Allowed
  • Adding VLAN Interface in CentOS/Fedora/RHEL
  • Configuring High Performance NGINX and PHP-FPM Web Server
  • Install and Configure SNMP on RHEL/CentOS/Fedor
Footer Logo

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


Back To Top