Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

as you know, in Linux environments initrd is different for each hardware platform, for example in vm and actual hardware. for create initrd, must use mkinitrd command.

but in installation cd environments how initrd is create dynamically for different HW?

my question in other word: when you install a linux in your system, /boot/initrd.img dynamicaly (maybe) based on your hardware created. my quiestion is that, /boot/initrd how be created, its dynamically? pre compiled or something else.

share|improve this question
    
i say initrd that placed in /boot directory and loads main kernel –  haw3d Jul 28 '12 at 6:30

2 Answers 2

The initrd on a Linux installation CD includes only drivers to read the CD/DVD itself and perhaps hard disk drivers. The installer itself generally detects any additional hardware and loads any additional drivers that might be needed.

share|improve this answer
    
i know, my problem is initrd.img that placed in /boot directory that loads main kernel –  haw3d Jul 28 '12 at 6:27
    
Perhaps you should ask your real question? –  Michael Hampton Jul 28 '12 at 7:57
    
:). when you install a linux in your system, /boot/initrd.img dynamicaly (maybe) based on your hardware created. my quiestion is that, /boot/initrd how be created, its dynamically? pre compiled or something else. –  haw3d Jul 28 '12 at 8:55

initrd is a old format of ramdisk and is not used any more. Some distribution still used the name initrd to denote initramfs.

initramfs is a cpio archive which is compressed mostly by gzip compression. The important functionality of initramfs is to contain drivers, kernel modules and other userland programs that will be used during system boot process.

So if you have LVM or RAID configured, then initramfs will have kernel modules that can read LVM and RAID. This is same with cryptographically encrypted disks.

initramfs is created with mkinitramfs or dracut command. There are configuration file in /etc/initramfs-tools/initramfs.conf which controls how and what modules needs to be loaded into initramfs during creation.

The scripts under /etc/initramfs-tools/hooks are executed when initramfs is created or updated and those scripts add modules and libraries that will be required during boot process. For example cryptsetup adds scripts that include decryption/encryption related modules in to the initramfs.

If the case of live DVD the only option would be that initramfs has to have almost all modules to support variety of filesystem and devices.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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