PDA

View Full Version : How to load a module at start-up with FC2


brunoz
18th June 2004, 10:28 PM
Hi everybody,

I would like to load the dazuko.ko module (compiled by myself) at the start-up on the FC2.

Manually, all is OK (means insmod dazuko works properly)

I put this in the /etc/modprobe.conf :

alias dazuko dazuko

and I did

depmod -a
mkinitrd /boot/initrd-2.6.6-1.435.img 2.6.6-1.435

and I modified grub.conf to load the right initrd file
but unfortunately the dazuko module is never loaded at boot-up.

What is wrong?

Can somebody help me?

Many thanks in advance.

Bruno.

taylor65
19th June 2004, 12:01 AM
Well, if 'insmod dazuko' works from the command line, you should be able to just put the command 'insmod dazuko' in /etc/rc.local.

brunoz
19th June 2004, 12:36 AM

Thanks Taylor65,

I tried and it is working now.

But I don't understand why I have to do this in the /etc/rc.local

Why initrd cannot load the dazuko module?

Bruno.

jtang613
19th June 2004, 01:52 AM
Try:
mkinitrd --with dazuko /boot/initrd-2.6.6-1.435.img 2.6.6-1.435
It might need to be dazuko.ko, I'm not 100% sure, but this should include the dazuko module in the ramdisk image.

However, adding the line to your rc.local is the preferred way of including extra modules since it is the last rc file to be processed, and thus any modules that dazuko may depend on are probably already loaded. Whereas building the module into the initial ramdisk means that it gets loaded prior to the majority of your kernel modules.

brunoz
19th June 2004, 03:31 AM
Hi jtang613,

Thanks for your answer.

All is OK now, the module is loaded automatically by the ramdisk image.

The exact syntax is :

mkinitrd --with=dazuko /boot/initrd-2.6.6-1.435.img 2.6.6-1.435

Thanks again.

Bruno.