Nov 28, 2020, 18:42 pm
(This post was last modified: Nov 28, 2020, 19:51 pm by Resurgence. Edited 1 time in total.)
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.
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.
--------------------------------------------------------------------------------------------------------------------------------------------------------
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.
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.