LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   New modules to initrc file (https://www.linuxquestions.org/questions/fedora-35/new-modules-to-initrc-file-617750/)

kromberg 01-31-2008 02:58 PM

New modules to initrc file
 
How does one add modules to the initrd file? I have added a new SCSI controller that was not present when I did the install initially. When the machine boots up, it complains about a drive on the controller not existing, but when the machine is done booting up, the drive is mounted where it should be. I would like to get the machine to boot cleanly though.

Keith

kilgoretrout 01-31-2008 09:28 PM

Try adding the modules to /etc/modprobe.preload and see if that takes care of your problem; it should unless you want to boot off the scsi drive. That's a lot easier than making a new initrd which is what you have to do using the mkinitrd command. You can't just add the modules you want to an existing initrd AFAIK. I haven't had to do that for a long time but check out man mkinitrd for more details.

kromberg 03-06-2008 07:59 AM

Hmmm.... I can not seem to find that file: /etc/modprobe.preload. I am running FC7 if that matters.

Keith

kromberg 03-18-2008 08:59 AM

Anyone else.......

Keith

BlueC 03-28-2008 09:08 AM

I am unsure whether this is the same for F7 (I think it is), but the correct way to load a module on boot in Fedora 8 is to create a .modules file in /etc/sysconfig/modules/ - here is how to do it for a module called "mymodule":

1) Create a new file called "/etc/sysconfig/modules/mymodule.modules" and open it for editing in your favourite editor.

2) Now paste the following into the file, adjusting the name "mymodule" as necessary:

Code:

#!/bin/sh
echo -n "Loading mymodule..."
if /sbin/modprobe mymodule
then
        echo "SUCCESS"
else
        echo "FAILURE"
fi

3) Save and exit, then change the file permissions as follows:

Code:

chmod 744 /etc/sysconfig/modules/mymodule.modules
On next boot, the module will be loaded.

HTH


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