I'm exploring an issue of the system not booting completely and leaving me in the (initramfs) prompt. The system is x86 with grub as the bootloader.

The problem seems to be that for some reason the hard disk can't be located and mounted.

However, regardless of not being able to mount / to the hard disk, something is mounted as /.

(initramfs) mount
rootfs on / type rootfs (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,realtime)
proc on /proc type proc (rw,nosuid,nodev,noexec,realtime)
udev on /dev type devtmfs (rw,nosuid,realtime,size=2016684k,nr_inodes=504171,mode=755)
devpts on /dev/pts type devpts (rw,suid,noexec,realtime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,realtime,size=404616k,mode=755)

So directories other than the ones explicitly mounted are coming from somewhere.

(initramfd) ls
dev    bin    etc    lib    var    run    scripts    proc
root   init   conf   lib64  sbin   sys    tmp 


  • What is mounted as / in that case and where does it come from?
  • Is this the initramfs image located at /boot/initrd.img-4.9.0 on a bootable system?
  • Does grub read it from the hard disk partition that it to become / once the scripts in initramfs are done?

What is actually mounted as root is the initramfs.

The confusion seems to arise from perceiving initramfs as an entity that executes stuff. It isn't, it is loaded after the kernel and is nothing more but a content holder, a file system. :)

Once initramfs is mounted it contains kernel modules and scripts that help the kernel reach it's full potential without being a giant binary blob.

You can perceive initramfs as a USB stick that is "plugged" by grub and passed to the kernel to be mounted as the initial /.

  • You messed up initrd on Centos/RHEL/SL distro and initramfs on Ubuntu/Debian distro.There is last step of compiling kernel : # mkinitramfs -o /boot/initramfs-kernel version.img kernel-version on ubuntu. For Centos/RHEL : mkinitrd /boot/initrd-kernel-version.img kernel-version. – supriady Jan 6 '17 at 16:57
  • Grub bootloader read grub.cfg on /boot/grub2/ and showing grub menu – supriady Jan 6 '17 at 17:03
  • I find strange that you answer your own question but don't actually address your 3 sub-questions directly. – Julie Pelletier Jan 7 '17 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.