This brief guide explains how to fix Busybox Initramfs error on Ubuntu Linux. I use Ubuntu 20.04 LTS as my daily driver on my Dell Inspiron laptop. Today I turned it on and the boot process dropped to the BusyBox shell and I ended up at the initramfs prompt. As far as I can remember, I didn't do anything wrong. I didn't forcibly power off it. It was working just fine yesterday! When I switched it on today, I landed in the BusyBox shell:
BusyBox v1.30.1 (Ubuntu 1:1.30.1-4ubuntu6.1) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs)
I can't get past this screen. Also it doesn't show what exactly the problem is. All I see is just a blank busybox shell.
I wasn't sure what to do at this point. So I simply passed the "exit" command to see what happens.
And then I saw the actual error:
(initramfs) exit /dev/sda1 contains a file system with errors, check forced. Inode 4326476 extent tree (at level 1) could be narrower, IGNORED. /dev/sda1: Inode 4326843 extent tree (at level 1) could be narrower, IGNORED. /dev/sda1: Inode 4327012 extent tree (at level 1) could be narrower, IGNORED. /dev/sda1: Inode 4329004 extent tree (at level 1) could be narrower, IGNORED. /dev/sda1: Inodes that were part of a corrupted orphan linked list found. /dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) fsck exited with status code 4. The root filesystem on /dev/sda1 requires a manual fsck. BusyBox v1.30.1 (Ubuntu 1:1.30.1-4ubuntu6.1) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs)
As you can see in the above output, the /dev/sda1 partition is corrupted. The file system in this partition has some errors. If you ever encountered with this type of problem, you need to check and repair the problematic Linux filesystems with fsck command.
Please note that sometimes you don't see any errors after typing the exit command. In that case, try to run fsck on all filesystems.
For those wondering, 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. It contains the tools and scripts required to mount the file systems before the init binary on the real root file system is called.
Fix Busybox Initramfs Error On Ubuntu Linux
To solve initramfs error on Ubuntu Linux, you need to repair the filesystem in the corrupted partition using "fsck" command like below:
(initramfs) fsck /dev/sda1 -y
Replace /dev/sda1 with your partition name. In your system, it could be /dev/sdb1, /dev/sdc1 etc.
Now it will start to fix all bad blocks automatically in the filesystem.
After a couple minutes, you will see an output like below:
/dev/sda1: ***** FILE SYSTEM WAS MODIFIED ***** /dev/sda1: 497733/30531584 files (1.5% non-contiguous), ........
Now, type "reboot" and hit ENTER to restart your system!
(initramfs) reboot
If the reboot command doesn't work, type exit and hit ENTER.
Cross your fingers and wait for the system to reboot! If all went well, your system will boot normally without any problem.
Related read:
Featured i
.
57 comments
When this type of problem occurs, the sensible approach is to boot the system from a rescue CD/DVD/USB-memory stick with the same GNU/Linux distribution version and then first check hardware (dmesg shows for example whether hard disks are operational or producing failing messages) and then if they are properly functioning to fsck -CfV all of the [unmounted] file system partitions. 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.
thank you very much bro
I got the same issue. I followed every instruction mentioned and came to the final step. I typed reboot and from then it was still showing wait for the system to reboot for almost 2 days…. What should I do now?
I have a dual boot in my laptop with windows and ubuntu
Are you really waiting 2 days? Better boot your system with a live cd, backup your data and reinstall the OS. BTW, the solution posted here is tested with Ubuntu 20.04 GNOME desktop (DELL laptop). It worked perfectly in my case.
Thank you SK.
I got my 32 bit Mint 19.3 back with all in their place, after following your instructions.
Glad it worked for you.
I’m getting the error with different ‘exit’ output on a YUMI Lubuntu 16.04 Live USB. The output runs screenfuls and doesn’t scroll. Somehow I nonetheless expect a similar problem.
Thanks a lot. It was helpful although I’d to use sda2 but the command worked.
I had to use a different sda number but once I found out what it was it did as described. The only thing that didn’t work was reboot. I have Ubuntu 20.04. The reboot command didn’t work so I tried exit and after a minute or so it started rebooting.
I type
fsck /dev/sda1 -y
an it says
fsck from util-linux 2.34
What do I do??
probably you didn’t enter the correct system path?
just replace this part [/sda1] with your file system path then try again!
Thankyou so much it is solved!!
my problem was in dev/mapper/rgunbuntu
Thanks u just saved my life . I wanna add something in my case the reboot command didn’t work so I just shut it through the power button .and it was another sda not sda1 it was sda3 in my case .
Thank you
many thanks SK
In my case it was sda3 and reboot didn’t work..i tried exit and it worked.. Thanks
Hii..I am Pavan Kumar from Tamilnadu, India…I tried this and it worked…. Thankyou….
You’re welcome. Glad I could help.
Using Mint 19, just had this happen today. Followed the instructions in this article and everything is now working perfectly fine again. Thank you!
You’re welcome. Glad it helped to fix your problem.
Man, y saved my life. Thank you
Thank you so much for this article – just saved me from having a long night of backing up everything and reinstalling! Thank you!!!
Thanks for the article. It worked very well. The only thing which didn’t work was the reboot command, but Ctrl+Alt+Delete did it. Thank you very much.
thank you man
Thank you I’m happy
Great thanks. It solved my issue. Only thing now is that I seem to be stuck on the login screen. When I enter my password the screen try to load but come back to the login screen. I have no message saying it’s the wrong password and I have been carefully with typos. If I enter a different password, I’m told it’s incorrect so I’m confident my password is OK but I’m stuck in a loop.
Thanks for your explanation 😊
I solved my case perfectly
Thank you very much friend ❤️❤️
Thanks sir
Thank you so much. It got worked fine
Thanks, crazy I had the exact same issue this week! Down to the same HW dev sda1!
Your instructions were perfect.
Glad I could help. Regards.
Thanks brothe.
Thank you very much mate. Issue got resolved 🙂
Hi SK
I am also resolving my problem by using the couple of commands, but its not permanent solution as it happens more often to me.
I would love to have the permanent fix if you have any.
Love from India.
If this error happens often, it could hdd problem. Please check hdd. Regards.
Thanks for your help . It worked perfectly
dear thanks after I fix this then I boot again to windows 10 after restart again come back the error is there is the final solution for it I have SSD and HDD inside the laptop
I guess it is HDD/SDD related issue. If you keep getting this error, it is time to check your hard disk health.
Thanks SK you are a life saver…i had same issue on my ubuntu. I followed every instruction but it didn’t work instantly because mine was sd5 not sd1 like you mentioned above. Anyway It worked flawlessly and you certainly helped very much here. I am sick and tired of reinstalling the whole damn OS every time i hit a problem. This time because of you i am very happy man and can sleep nicely. Cheers
Glad I could help. You’re very welcome. Cheers.
Thank you
Hi there,
I’ve asked this few places but nobody has given me a good answer (maybe they genuinely can’t though)… How does this happen?
I have to do this far too often and it seems to be happening to me after going into standby for a short while. I haven’t changed anything, added packages, used the terminal or anything.
I’m using KDE Neon
Thanks in advance,
Mike
This happens probably due to ailing disk. Could be a bad sector or other hard disk health issues.
Worked like butter!
thanks for amazing tutorial!
Thank you sir it works
thanks my bro ,this solution was awesome
My ubuntu broke and using the method here, I fixed it and retrieved my files. Thanks, dude.
Fresh Kubuntu 20.04 install on a 1 year old SSD (used lightly) and I got this error 2 times just today. I used Manjaro until yesterday and never had similar issues. If this is indeed caused by a “bad sector” wouldn’t the SSD be able to handle it on its own?
I am not sure. It could be bad sector. I don’t have any reliable source to prove it though.
Thanks a lot!! You saved me and my system! I just literally had to follow each step as it is mentioned in the article and I was able to fix the issue! Thank you so much!
My ubuntu version is 18.04 LTS
Thanks for help. It is really helped me out.
That works for me. Thank you very much
Thanks. This was really helpful. I thought my system was a goner.
fsck -f /sda5
exit
this is worked for me
It worked well. sda7 was bad partition for me. Reboot using initramfs(exit) .
.Its important to check affected partition initially using exit().
THANK YOU PAL =)