You turned on your Linux machine and are greeted by a very scary looking terminal. You’ve booted into busybox and are in initramfs. How do I fix this?
Very rarely, memory can get corrupted on your Linux machine. When that happens, you boot into the terminal above. The fix is a simple 1 line command using the fsck
built-in tool.
Before using fsck
, you need to identify which hard disk stores your working data.
The hard disk containing all your data (/, /user, …) is usually found in /dev/...
Use df
to list out all the possible partitions and identify your data partition. If you don’t get anything, its ok, just carry on to the next command.
|
|
Run the following command with the identified partition. If you dont know the partition, type fsck /dev
and press tab to see the autocomplete options. This will implicitly list out all found partitions on your machine. Run fsck on each partition one by one.
|
|
You should see a bunch of log messages identifying corrupted memory blocks and fixing them. Once that is done, exit
out of intiramfs and you should boot as per normal.