How To Fix Initramfs Error On Boot Menu in any Linux OS

Encountering an Initramfs error during booting can be frustrating for Linux users. This article aims to guide you through resolving this issue in a simple and detailed manner. From understanding the error message to implementing the necessary fixes, we’ll explore the steps involved in troubleshooting Initramfs errors and related challenges.

Initramfs Error

Understanding the Initramfs Error

Initramfs, short for Initial RAM File System, is an essential component of the Linux boot process. When the system encounters errors during booting, it may display messages indicating issues with the Initramfs. These errors can stem from various causes, including file system corruption, disk errors, or misconfigured boot parameters.

Troubleshooting Steps:

Enter Initramfs Interface:

Upon encountering the Initramfs error message during boot, hit the ENTER key to enter Initramfs mode.

If prompted, navigate to the initramfs prompt by typing the appropriate command.

Perform File System Check:

Identify the disk containing your Linux operating system. Use commands like blkid or fdisk -l to list available disks.

In the image above, we have utilized blkid to check the available disks in our system. Following this, you need to locate the disk containing your Linux file system, where your Linux operating system is installed. This entire process remains the same across Ubuntu, Mint, and Debian-based operating systems, so there is no need to worry. As you can see in the image, we have identified two partitions with the Ext4 file system type. The Linux file system typically utilizes Ext4 journaling.

You must make a note of this disk. It’s possible to encounter just one Ext4-type partition or multiple partitions. There’s no need to panic; we’ll resolve this in a straightforward manner.

Now that you have identified your partition, the next step involves using the prompt, which is:

fsck -f /dev/sda2 -y

Instead of ‘sda2’, you need to provide the name of your partition. We need to check all Ext4 partitions one by one using this command.

If an error occurs with this command, you can use the command with ‘sudo‘ to resolve the issue:

sudo fsck -f /dev/sda2 -y

If an error persists, you should use the same command without ‘-y‘, like this: ‘sudo fsck -f /dev/sda2′.

after successfully check you will see the result like this.

Initramfs Error resolved

Reboot the System

After executing the file system check command, reboot the system using the reboot command.

reboot

or if its not working then type

exit

This step ensures that the changes take effect, and the system attempts to boot normally.

Additional Considerations

  1. Disk Identification: If your system comprises multiple disks, repeat the file system check process for each disk until the Initramfs error is resolved.
  2. Backup and Recovery: Consider backing up important data before executing file system checks to mitigate the risk of data loss.
  3. Kernel Parameters: Review and verify the kernel parameters configured in the boot loader configuration files (grub.cfg, menu.lst, etc.) for accuracy and consistency.

Final Thought

Resolving Initramfs errors on Linux systems requires a systematic approach and an understanding of file system management. By following the outlined troubleshooting steps and considering additional considerations, users can effectively address Initramfs-related boot issues and restore normal system functionality.

3 Comments

  1. Thank you for this helpful introductory article about initramfs. I have Linux 20.04 installed on an old mac mini. Right now whenever I boot the mini I am horribly stuck in this initramfs mode with the request to RUN fsck MANUALLY on /dev/sda2. After reading this and other articles I executed “fsck /dev/sda2 -y” multiple times to completion. However, after running the fsck the terminal says, “Error writing file system info: Input/output error” before the line “**** FILE SYSTEM WAS MODIFIED ****”. After this at the initramfs prompt the reboot command doesn’t work and the exit command brings back the message “/dev/sda2 contains a file system with errors, check forced.” Then the whole process begins over again. I am very stuck. If you have any further ideas, please let me know. Thank you again. In the meantime I will be looking into the kernel parameters you mentioned.

Leave a Reply

Your email address will not be published. Required fields are marked *