# pass module options into initramfs generated with genkernel

## nicolasbock

I added the following to /etc/modprobe.d/usbhid.conf

```
options usbhid quirks=0x05ac:0x1281:0x04
```

and ran update-modules to add this option to /etc/modprobe.conf. The module is loaded already through the initramfs and so I ran

```
genkernel initramfs
```

Unfortunately it appears as if the option is not used when I reboot. I get this:

```

$ cat /sys/module/usbhid/parameters/quirks 

(null),(null),(null),(null)

```

which I interpret as telling me that the options I was trying to set didn't make it. Does anyone know how to do this correctly?

Thanks already

----------

## John R. Graham

Copying that directory into the initramfs image isn't a current feature of genkernel, nor am I positive that using that directory is a feature of genkernel's init system.  Might be a nice new feature for genkernel, though.  Hmmm.

- John

Edited for typos - JRG

----------

## chithanh

You can use the kernel command line to pass options to modules or built-in drivers.

```
kernel /boot/vmlinuz usbhid.quirks=0x05ac:0x1281:0x04
```

----------

## nicolasbock

chithanh,

I had read about that in the kernel documentation but interpreted the comments there to mean that I needed to compile the module into the kernel to be able to use the kernel command line, quoting from /usr/src/linux/Documentation/kernel-parameters.txt,

 *Quote:*   

> Module parameters for loadable modules are specified only as the
> 
> parameter name with optional '=' and value as appropriate, such as:
> 
>   modprobe usbcore blinkenlights=1
> ...

 

I am using only loadable modules. I will try your tip and see what happens, thanks.

----------

## nicolasbock

John,

maybe I should file a bug report to request this feature in genkernel. I agree that it would be nice to have...

nick

----------

## John R. Graham

Feature request bugs with an attached implementation usually get better attention, in my experience.  Even those sit around for a while sometimes, though; see my last two genkernel additions:  bugs #320059 and #321379.

But it definitely seems worthwhile.    :Smile: 

- John

----------

## nicolasbock

chithanh,

I have tried your suggestion, unfortunately it didn't work:

```
$ cat /proc/cmdline 

root=/dev/ram0 crypt_root=/dev/md3 real_root=/dev/mapper/root vga=791 usbhid.quirks=05ac:1281:i

$ cat /sys/module/usbhid/parameters/quirks 

(null),(null),(null),(null)

```

----------

