Initramfs Prompt – Fix ‘Can’t Read /etc/fstab’ and ‘No Init Found’

bootinitinitramfssystem-installationUbuntu

Installing a new system using a GPT partitioned disk dedicated to a single partition, ext4 formatted, extlinux (version 4.05) as bootloader, Ubuntu Core version 13.10 amd64 as rootfs, and Ubuntu linux-image-3.11.0-18-generic as kernel, and extlinux-update to generate bootloader configuration.

The result after reboot (still inside a KVM based virtual machine) is an (initramfs) prompt and these messages:

mount: can't read '/etc/fstab': No such file or directory
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
The filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.

BusyBox is v1.20.2.

Regression:

  • the file system has been checked with fsck.ext4

Check for root existence

(initramfs) ls -l /dev/[hs]da*
ls: /dev/[hs]da*: No such file or directory

Root boot argument

(initramfs) cat /proc/cmdline
initrd=/boot/initrd.img-3.11.0-18-generic ro quiet BOOT_IMAGE=/boot/vmlinuz-3.11.0-18-generic

Check loaded modules

(initramfs) cat /proc/modules
e1000 145368 0 - Live 0xffffffffa0000000

/boot folder content

$ sudo ls -l boot
-rw------- 1 root root 3296162 Feb 18 22:37 System.map-3.11.0-18-generic
-rw-r--r-- 1 root root 1007681 Feb 18 22:37 abi-3.11.0-18-generic
-rw-r--r-- 1 root root  163258 Feb 18 22:37 config-3.11.0-18-generic
drwxr-xr-x 2 root root    4096 Mar 17 20:13 extlinux
-rw-r--r-- 1 root root 4995000 Mar 16 23:35 initrd.img-3.11.0-18-generic
-rw------- 1 root root 5634192 Feb 18 22:37 vmlinuz-3.11.0-18-generic

How to make this system boot to the expected default bash prompt?

Best Answer

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.

Related Question