When Debian-Mint-Ubuntu OS won't boot - The Busybox, initramfs prompt - How to fix
#1
I consider this essential information for running Debian, Mint, or Ubuntu Linux. I suggest that you print this information out or write it down and keep it near your computer. If you ever face this problem, you will have the information close at hand to get things back to normal pretty quickly.



--------------------------------------------------------------------------------------------------------------------------------------------------------



If you use Debian, Mint, or Ubuntu, you may have difficulty during the boot process which would then drop to a Busybox shell with an initramfs prompt. This can happen after a kernal update or with system file corruption.


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 (a file system that stores all the files in virtual memory). It contains the tools and scripts required to mount the file systems before the init binary on the real root file system is called.



[Image: 1.png]


[Image: 2.jpg]



How to Fix:


At the initramfs prompt, you can type exit and press enter on your keyboard. It will then show you the errors encountered on your filesystem.


After that, type:


fsck -yf /dev/sda1  (please note that there is a space between fsck -yf and also -yf and /dev/sda1)


This will check your filesystem for errors on your main partition and automatically fix them.



Commands Explained:

fsck - The fsck (File System Consistency Check) Linux utility checks filesystems for errors or outstanding issues. The tool is used to fix potential errors and generate reports. This utility comes by default with Linux distributions. No specific steps or an installation procedure is required to use fsck. You use the tool at boot or in the terminal.


-yf switches:

y - Represents "yes" in yes/no queries. This switch automatically answers "yes" for you. During the filesystem checks, there are a lot of yes/no questions. It saves time not having to address all of those.

f - Force filesystem checking.


/dev/sda1 - This is location of your root filesystem. Your path should be the same so you won't need to change this. 



When the filesystem check is done, the initramfs prompt will show again. Type reboot and press enter on your keyboard to restart your system.

As an alternative, you can type exit and press enter to boot from that point without restarting.
Reply
#2
I get that error when I'm using Rufus to copy an image of Linux Mint to a thumb drive.

What I do is to use something other than Rufus to copy the image, like the resident image-burning utility on Linux Mint.
Reply
#3
Personally, when my Linux system has problems booting, I boot to a Linux Live Boot Disk (Buster or LMDE) and run fsck from there. A good time also to apply backups of /etc or /boot. If using LVM make an ISO backup of the LVM partition, or you will be scrood if it 'loses' its volume group info. Then it wont boot, because it cannot access the LVM partition, and there are *no* tools to fix it.

Some suggestions:
1. Have multiple kernels. If one is damaged, another might work from grub.
2. Print out docs for booting from grub and intramfs.
3. Avoid LVM when installing. If using, use ISO backups regularly.
4. Put drive in Win machine, get HardDrive Sentinel (at tpb), install go to disks. tests, #5 (repair). It will do sector repairs on the entire drive.
5. Get a partition manager and make backups of every partition info of all your drives. As well as MBRs. And make multiple backups of those files and note where you put them. It has cost me dearly when I made backup files to a partition which was accidentally formatted. And then forgot where I put backups of critical files.
This is not a partition backup, just the sector data for that partition.
This is actually only a handful of small files, and not a data backup - and can restore a 'lost' file system.
6. The LMDE4 Live Boot has a utility for boot repair. It might work. Linux usually sux rocks at disk/boot repair utilities. ALthough it did not help me due to an uncorrectable LVM problem, it did give some useful pointers.
7. Also print out the docs for using chroot. This can be *very* useful for fixing a file system from *another* file system. Such as a boot DVD/USB. However it does not always seem to work these days.

BTW - busybox is a file that emulates a *small* /bin dir and includes the functionality of bash, cat, copy, and a host of other very basic utils.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to install Windows 11 in PC without Secure Boot capable and TPM version 2.0. theSEMAR 3 17,478 May 02, 2023, 23:54 pm
Last Post: RobertX
  Install Ubuntu on Windows 8 Laptop/PC with UEFI automotiv 13 46,932 Dec 02, 2014, 16:37 pm
Last Post: piraateking
  How to install Ubuntu using a USB flash drive (non UEFI version) automotiv 0 18,450 Jun 17, 2014, 03:56 am
Last Post: automotiv
Thumbs Up Finding Ip Address Of A Website Using Command Prompt Or CMD .::Alien::. 5 27,669 Nov 25, 2013, 17:02 pm
Last Post: Dryden



Users browsing this thread: 1 Guest(s)