how to pass module params to initrd? - Suse

This is a discussion on how to pass module params to initrd? - Suse ; Is there a way to pass parameters to modules loaded via initrd? I need changing the > module parameter default_dev_flags to 0x240. If I insert > into grub kernel line - Linux says Unknown boot option `scsi_mod.default_dev_flags=0x240': ignoring at boot ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: how to pass module params to initrd?

  1. how to pass module params to initrd?


    Is there a way to pass parameters to modules loaded via initrd?

    I need changing the <> module parameter default_dev_flags
    to 0x240.
    If I insert <> into grub kernel line
    - Linux says

    Unknown boot option `scsi_mod.default_dev_flags=0x240': ignoring

    at boot time.

    Also I have

    options scsi_mod max_luns=256 default_dev_flags=0x240

    in my /etc/modprobe.conf.

    Nevertheless I am not sure that kernel have default_dev_flags set to
    0x240.

    My scsi_mod.ko is loaded via the initrd line in grub's /boot/grub/
    menu.lst. I have decompressed /boot/initrd and noticed no module
    parameters there in its filesystem (ext2) and no /etc/modprobe.conf in
    the initrd filesystem.

    Using SLES9.3 64bit.
    Thank you for response.


  2. Re: how to pass module params to initrd?

    lukash33@mail.ru schrieb:
    >
    > Is there a way to pass parameters to modules loaded via initrd?
    >
    > I need changing the <> module parameter default_dev_flags
    > to 0x240.
    > If I insert <> into grub kernel line
    > - Linux says
    >
    > Unknown boot option `scsi_mod.default_dev_flags=0x240': ignoring
    > at boot time.
    >

    That's correct. These option will only succeed if the scsi_mod is *not* a
    module, but compiled into the kernel.

    Since SuSE10.x, the command "mkinitrd" will copy the /etc/modprobe.conf
    and /etc/modprobe.conf.local into the initrd, so everything works
    automagically.


    >
    > My scsi_mod.ko is loaded via the initrd line in grub's /boot/grub/
    > menu.lst. I have decompressed /boot/initrd and noticed no module
    > parameters there in its filesystem (ext2) and no /etc/modprobe.conf in
    > the initrd filesystem.
    >
    > Using SLES9.3 64bit.
    >

    In SuSE9.x, the initrd contains a script "linuxrc", which does all the work.
    IIRC if it is not possible to specify module parameters when creating the
    initrd, but you could

    # cp /boot/initrd /boot/initrd-new.gz
    # gunzip /boot/initrd-new.gz
    # mount -oloop /boot/initrd-new /mnt
    # vi /mnt/linuxrc
    .... Add parameters to insmod lines ...
    # umount /mnt
    # gzip /boot/initrd-new

    and add an entry in /boot/grub/menu.lst, which uses initrd-new.gz instead of
    initrd.

    Kind regards

    Jan


+ Reply to Thread