GagA// 0n D nEt

It is currently Tue Aug 21, 2018 10:15 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How to Rebuild Linux Initial RamDisk image
PostPosted: Sun Oct 26, 2008 1:45 am 

Joined: Wed Jul 18, 2007 1:14 am
Posts: 181
The ramdisk containg the information required for the modules (or drivers) to initialize the hardware driver. Hence in case you add a new hardware device, like SCSI controller to your machine or server, you will need a ramdisk. You will have to execute mkinitrd if you have made any changes in /etc/modprobe.conf or /etc/modules.conf.

When you use the mkinitrd command, it will create a directory structure which can serve as an initrd root file system. It then creates an image containing that directory structure using mkcramfs, which can be loaded using the initrd. The modules for the kernel with the referring kernel version will be placed in the directory structure. If the version is omitted, it defaults to the version of the kernel that is currently running.

First, find the details for your running kernel
[[email protected] ~]# uname -r


Backup the existing ram disk
[[email protected] ~]# cp /boot/initrd.$(uname -r).img /root/

Now, using the following command create the initial ramdisk image
[[email protected] ~]# mkinitrd -o /boot/initrd.$(uname -r).img $(uname -r)
[[email protected] ~]# ls -l /boot/initrd.$(uname -r).img

Modify the grub.conf in order to point it to the correct initial ramdisk image. You'll have to make sure that you have following line to it:
initrd /boot/initrd.

When the system boots using an initrd image created by mkinitrd command, the linuxrc will wait for an amount of time which is configured through mkinitrd.conf, during which it may be interrupted by pressing ENTER. After that, the modules specified in will be loaded.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group