LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Using mkinitrd in 12.2 for multiple kernels (https://www.linuxquestions.org/questions/slackware-14/using-mkinitrd-in-12-2-for-multiple-kernels-694955/)

swampdog2002 01-04-2009 05:47 PM

Using mkinitrd in 12.2 for multiple kernels
 
I have just recently been looking into creating initial ramdisks for my Slackware 12.2 kernels (two in all), and wnated to know if there is a method for creating multiples initrd.gz files for multiple kernels. I've read the REAME in the /boot directory on this, but was not certain how to go about it afterwards. I have a root partition on /dev/sda8 (which is a logical volume) and is a reiserfs drive. Since this is a SATA drive as well, I'm assuming I'll need to include other modules as well to the initrd. When I attempted to create an initrd for my customized 2.6.27.7-smp kernel, I was informed that I needed to add additional modules to the initrd-tree directory, but am unclear on this as well.

As of now, I just compiled in support for reiserfs directly to the kernel, but would like to create initial ramdisks for kernels in the future. Thank you.

ErV 01-04-2009 05:56 PM

Quote:

Originally Posted by swampdog2002 (Post 3397186)
I have just recently been looking into creating initial ramdisks for my Slackware 12.2 kernels (two in all), and wnated to know if there is a method for creating multiples initrd.gz files for multiple kernels. I've read the REAME in the /boot directory on this, but was not certain how to go about it afterwards. I have a root partition on /dev/sda8 (which is a logical volume) and is a reiserfs drive. Since this is a SATA drive as well, I'm assuming I'll need to include other modules as well to the initrd. When I attempted to create an initrd for my customized 2.6.27.7-smp kernel, I was informed that I needed to add additional modules to the initrd-tree directory, but am unclear on this as well.

As of now, I just compiled in support for reiserfs directly to the kernel, but would like to create initial ramdisks for kernels in the future. Thank you.

Read about -m and -k options in "man mkinitrd", and about "initrd" option in "man lilo.conf". As far as I know, you can specify initrd per option in lilo.conf. So just make few other boot entries in lilo.conf and his should be enough.

Alien Bob 01-04-2009 06:02 PM

As long as you do not specify the "-c" option (for "create") to your mkinitrd command, additional kernel modules can be added to an already existing initrd image.
What mkinitrd does if you don't use "-c", is to operate on the existing /boot/initrd-tree directory structure (left there by your previous mkinitrd command), add any modules you specified using the "-m" parameter for the kernel you specified with the "-k" parameter.

Modules for multiple kernels can be present in one and the same inird.gz file without any issue.
If you rather have multiple initrd.gz files, one for each kernel version you want to boot, use the "-o" parameter to specify a different filename from the default "/boot/initrd.gz" and make sure to use that name in /etc/lilo.conf as well!

Eric


All times are GMT -5. The time now is 01:37 AM.