Home Fedora How To Solve Initramfs Error In Fedora

How To Solve Initramfs Error In Fedora

By sk

Ubuntu and its derivatives often affected by the initramfs issue. As far as I know, it occurs usually on the disks that are formatted with ext4 filesystem. I haven't had this problem in BTRFS though. Until today, I thought only the Ubuntu-based systems are affected by this issue. I was wrong! Today, I encountered with the initramfs issue in my Fedora 34 desktop system. I already knew how to fix Initramfs error on Ubuntu Linux. In this guide, I will show you how to solve initramfs error in Fedora.

This was the actual error message that I encountered after switching on my Fedora 34 desktop.

Generating "/run/initramfsrdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journelctl" to view the system logs.
You might want to save "/run/initramfsrdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

Give root password for maintenance mode
(or press Control-D to continue):
Entering emergency mode in Fedora
Emergency mode in Fedora

As you see in the above output, Fedora has entered into emergency mode. If you look a bit above in the screenshot, file system check on one of the disk partitions is failed.

To solve initramfs error in Fedora, we need to check and repair the file system in the problematic partition using fsck command. In my case, the /dev/sda2 partition is corrupted.

# fsck /dev/sda2 -y 

Replace /dev/sda2 in the above command with your partition name. In your system, the partition could be different like /dev/sda1, /dev/sdb1, /dev/sdc1 etc. To find the Linux partition details, you use either cat /proc/partitions or blkid command. If you're not sure which partition to repair, run fsck on all partitions.

Now the fsck command will check for the bad blocks in the given partition's filesystem and fix them automatically. This will take a minute or two depending upon the size of the disk and the number of bad blocks in it.

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 662372/4507520 files (0.4% non-contiguous), 7510236/10350080 blocks
Solve initramfs error in Fedora
Solve initramfs error in Fedora

Once fsck command repaired all bad blocks in the partition, type reboot or exit and press ENTER to start booting your Fedora system:

# reboot


# exit

Now your system should boot normally.

The above solution worked just fine for me. Just in case if it doesn't help, follow the instructions provided by one of our reader in an another article.

  1. Boot the system from a rescue CD/DVD/USB-memory stick with the same GNU/Linux distribution version
  2. And then first check hardware (dmesg shows for example whether hard disks are operational or producing failing messages)
  3. Next, run fsck on all of the [unmounted] file system partitions to verify if they are functioning properly.

If that does not fix the boot up problem, then it is possible from the rescue booted system to do further repairs and even to reinstall any essential corrupted software.

Good luck!

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More