LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What's an initrd.img? (https://www.linuxquestions.org/questions/linux-newbie-8/whats-an-initrd-img-192459/)

hotel-lima 06-11-2004 04:23 PM

What's an initrd.img?
 
Hi,

while doing some kernel-compiling I saw that some kernels need an initrd.img while booting and some kernels do not.
For instance my Debian system uses an initrd with kernel 2.4.18-k7.
Some kernel-compiling instructions do not mention an initrd.
So, what exactly is an initrd and when do I need this?

Can I compile and use a new kernel without it?

How do I create an initrd after compiling a new kernel?

Hope, somebody can explain this to me.

Thanks in advance!

Greetings
hotel-lima

ranger_nemo 06-11-2004 05:39 PM

From man mkinitrd...
Code:

DESCRIPTION
      mkinitrd creates filesystem images which are suitable  for
      use  as Linux initial ramdisk (initrd) images. Such images
      are often used for preloading  the  block  device  modules
      (such as SCSI or RAID) which are needed to access the root
      filesystem.    mkinitrd    automatically    loads    all
      scsi_hostadapter entries in /etc/conf.modules, which makes
      it simple to build and  use  kernels  using  moduler  SCSI
      devices.

      Any  module  options  specified  in  /etc/conf.modules are
      passed to the modules as they are loaded  by  the  initial
      ramdisk.

The most common need for an initrd is when you have your / on a filesystem type that you don't have compiled into your kernel. If your / is on EXT3 or Reiser, and you have them as modules in your kernel, then the kernel can't read / at boot, because it doesn't have the modules loaded yet.

hotel-lima 06-11-2004 05:50 PM

Hi,

thanks for answering.

That means that initrd is not necessary for me, because my / is ext3 and this support is compiled into my kernel.

Ok then I think it's clear.

Thank you.

Greetings,
hotel-lima


All times are GMT -5. The time now is 08:17 AM.