Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Uncategorized»Chicken Egg Problem in Linux and Initrd

    Chicken Egg Problem in Linux and Initrd

    By RahulMarch 29, 20132 Mins Read
    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.

    Advertisement
    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. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Most Effective Industry Specific Plug-ins for WordPress

    How to Install Komodo Edit on Ubuntu 14.10, 14.04 LTS and 12.04 LTS via PPA

    Setup Database Mirroring in SQL Server 2012 with Certificates

    View 1 Comment

    1 Comment

    1. Pawan on July 14, 2014 6:45 am

      Very nice explanation of Chicken Egg problem. Thanks.

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • 11 Practical Example of cat Command in Linux
    • sleep Command in Linux with Examples
    • 20 Basic Linux Commands for the Beginners (Recommended)
    • tail Command in Linux with Examples
    • What is a Orphan Process in Unix/Linux
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.