LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-04-2005, 12:10 AM   #1
icpsvt
LQ Newbie
 
Registered: Oct 2004
Posts: 23

Rep: Reputation: 15
Editing default module parameters at boot time


Hi. Again.

I have a TvTuner card that uses the module bttv.

At boot time it loads it fine, but the module needs 2 extra parameters to run properly.

How do I pass those to it?

It loads
bttv
It needs to load
bttv card=10 tuner=10

I know I can rmmod it out and then modprobe it back in, but that seems like a real ugly hack
Any ideas?

Thanks,
Jason
 
Old 01-04-2005, 03:38 AM   #2
jacks4u
Member
 
Registered: Dec 2004
Location: Phoenix, Arizona, USA
Distribution: Debian, RedHat, ???
Posts: 56

Rep: Reputation: 15
You do not say which Kernel you are using. This is important, as the kernel passes parameters to each module at boot time.

Read the file in your kernel source tree ./Documentation/kernel-parameters.txt

After finding the proper parameters to send to a module, you can edit the GRUB or LILO config to send those parameters to your module, eliminating the need to re-initialize the module with the proper parameters.

For my kernel (2.4.26) the bttv setup would look like this in /etc/lilo.conf
Code:
image=/vmlinuz
        append="bttv.card=10 bttv.tuner=10"
        initrd=/initrd.img
        label=Linux
        read-only
I do not use GRUB, so you would have to read the man pages for the equivelent with that boot loader. Or, perhaps someone else here can explain how GRUB is configured to handlle kernel module parameters

A note of Caution: I do not know if the module options are the same for all kernels, or if 2.6 kernels have a different syntax - you should read the above mentioned file for your kernel, to discover the module options that ae rigt for your hardwae and kernel version!


Hope this helps :=)

jacks4u
 
Old 02-11-2006, 07:00 PM   #3
ka9qlq
Member
 
Registered: Feb 2004
Location: Columbus, IN USA
Distribution: Mepis 3.4 rc1
Posts: 119

Rep: Reputation: 26
For me I wrote a bash script like this

#!/bin/bash
#Look out! We be programming!
# copyright ka9qlq
rmmod bttv
bttv card=10 tuner=10

Then symlink it to /etc/rc5.d/S99bttv
 
Old 02-11-2006, 07:03 PM   #4
ka9qlq
Member
 
Registered: Feb 2004
Location: Columbus, IN USA
Distribution: Mepis 3.4 rc1
Posts: 119

Rep: Reputation: 26
Corection

#!/bin/bash
#Look out! We be programming!
# copyright ka9qlq
rmmod bttv
modprobe bttv card=10 tuner=10

Alvin
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install module on boot time? Slamtilt Linux - Laptop and Netbook 2 03-18-2005 11:52 AM
modprobe does not recognize module parameters at boot moskito01 SUSE / openSUSE 0 01-06-2005 03:13 PM
Loading a Module at boot time Nappa Fedora 8 04-14-2004 07:12 PM
Loading module at boot time. fei Linux - General 1 02-27-2004 09:05 PM
Load module(s) at boot time LordChaos Linux - General 2 01-18-2003 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration