How to fix boot into initramfs prompt and "mount: can't read '/etc/fstab': No such file or directory" and "No init found"?

Modify your kernel boot parameter by setting the root=/dev/sdaX option. sdaX would be your / or root partition. Upon booting the next time, you will see that your initramfs tries to mount the partition before trying to access /etc/fstab and mounting the file systems.

See question "Does initramfs use /etc/fstab?" for more details.


What you need to understand about initramfs is that it is a filesystem. Since kernel 2.6 it is, basically, the only kernel-imposed filesystem ( leaving aside VFS, which is arguably also a filesystem ) on your machine. Your initramfs image is a disk image.

Within your initramfs image will be whatever files your distribution decided were crucial enough to require before your root disk is found. Usually that's Busybox and whatever kernel modules you need to find and mount your root device. This is isn't working for you.

There's no real mystery here though, all things considered. If you can find your way around a terminal prompt you can navigate the initramfs. But first you've gotta demystify it.

First and foremost and once again - this is just /. It's Linux root doing Linux root type things. In fact, if it is in a separate file from your kernel, it's actually already your second root device. Every Linux kernel contains a basically empty / all its own which it first mounts before pulling in your initramfs.

What's more initramfs is the real root. It is where the Linux kernel initializes userspace by execing init and subsequently renouncing all responsibility for any problem you might encounter thereafter. Your init seems to be Busybox, as are many, which means controlling its actions should be as simple as editing its accompanying shell scripts.

Then why the error about not finding init? Almost definitely this is referring to a program named init which your actual init has been instructed via shell script to exec itself into.

Most striking to me is that the kernel pseudo file systems - dev sys proc - do not mount. This is either very troubling or a very good clue. You mention KVM which leads me to question kernel capabilities, but before we go down that dark and rutted road, can we first try something else?

cd /root || mkdir /root

It strikes me that the error message is repeatedly:

No such file or directory

Failing that you need to rebuild your initramfs image. Boot to a live disc to do so and run whatever tool your distribution provides to accomplish that end. Oh, and please ensure that this live disk is loaded in EFI mode.

So here's the only truly out-of-the-ordinary thing about initramfs - switchroot.

The Linux kernel provides a very special syscall intended for early userspace and handling the move from initramfs to your root disk device. It works by first mounting your root disk into a mountpoint in initramfs and then pivoting the root filesystem into it. I assume your initramfs's target mount point is root based on the way it keeps moaning about it. Why not make sure it's there?

For further investigation you're going to need to get a little gritty. Adjust your bootloader to pass ...

init=/bin/sh

... as a kernel parameter.