Recently, I had a situation where my disk usage went to 100%. I wasn't able to do much; it was almost like the system was going into emergency mode.
When I rebooted, a screen came up called initramfs.
Some commands I entered fixed the issue, and I was able to clean up the disk later. Things were back to normal.
In this article, I just wanted to explain what initramfs is.
What is initramfs?
When you first see that word, it sounds too alien, right?
Let's expand it: initramfs stands for initial RAM filesystem.
This is a small temporary filesystem that is loaded into your RAM by the bootloader before your main OS filesystem is mounted.
You can consider it as a toolkit with the things needed to mount your main filesystem.
What is fsck?
fsck stands for file system integrity check. This is a tool that you often use when something goes wrong with your file system.
Some common reasons to use fsck are:
- Improper shutdowns
- Power cuts
- Disk errors
- Corrupted filesystems
When fsck detects issues:
- It will attempt to repair them automatically or prompt you.
Example of initramfs and fsck
The initramfs shell looks like this:
(initramfs) _
In this shell, you can run commands like:
fsck /dev/sda1 # check and repair root partition
mount /dev/sda1 /root # try mounting manually
Here is a simple 6-step example of how initramfs and fsck come into the picture:
- System boots, Kernel loads
- Kernel loads initramfs into RAM
- initramfs tries to mount
/, fails - You are dropped into the initramfs shell
- Run
fsckto fix the filesystem - Reboot. If successful, it will be a normal boot.
Wrapping up
Hope you got a basic idea of initramfs and fsck and how they come into the big picture.
I have a recommendation for you: if you’ve ever struggled with repetitive tasks, obscure commands, or debugging headaches, this platform is here to make your life easier. It’s free, open-source, and built with developers in mind.
👉 Explore the tools: FreeDevTools
👉 Star the repo: freedevtools

Top comments (0)