• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

Chicken Egg Problem in Linux and Initrd

Written by Rahul, Updated on March 29, 2013
What is Checken/Egg Problem.

Chicken/Egg problem occurred in booting process of Linux. A Linux kernel required modules to mount root partition which typically uses ext3 file system, LVM, RAID, etc. All the Linux modules resides in /var/lib/($uname -r) directory but Linux kernel could not access them without mounting it. So the problem was that how Linux kernel access modules required to mount root partition.

How Linux Kernel Get it Solve

The grub boot loader and Linux kernel works together to get solve this problem using Initial Ram Disk ( initrd ), which is part of GRUB specification for a Linux kernel.

An Initial RAM Disk ( initrd ) is specific to particular hardware and software platform. Its created at system install time and include modules which needs to mount file-system.

Recreate initrd file

Some times we required to recreate initrd file. mkinitrd creates an initial ram disk image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem.

# mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)
  • First argument is location of initrd image.
  • Second argument tells the directory name in /var/lib/ which contains modules.

Its also possible to force to add particular module in initrd image file using –with keyword.

#  mkinitrd --with=scsi_mod -f /boot/initrd-$(uname -r).img $(uname -r)

This article is based on RHEL/CentOS 5 Systems. RHEL/CentOS 6 system modules directory is different than 5.

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

1 Comment

  1. Avatar Pawan Reply
    July 14, 2014 at 6:45 am

    Very nice explanation of Chicken Egg problem. Thanks.

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy