LinuxQuestions.org
Help answer threads with 0 replies.
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 08-19-2009, 12:36 PM   #1
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Rep: Reputation: 40
how to tell which modules have been built into kernel?


Hi group,
I have been fighting with OpenWRT to build a kernel that will boot from a USB pen drive on my laptop. I have managed to get a bootable kernel running from a HDD. But I need to be able to use a USB flash for my RouterStation which does not have a HDD. Support from OpenWRT and Ubiquiti forums has not been overwhelming. So I turn to my favorite group of Linux minds.

How can I determine which modules have been built into my kernel?? I need to have USB support built into the kernel to be able to boot the USB file system.
 
Old 08-19-2009, 03:07 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
lsmod or cat /proc/modules
 
Old 08-19-2009, 06:25 PM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
In fact lsmod or cat /proc/modules display the information about the currently running modules only.

In the question: ``how to tell which modules have been built into kernel?'' as I understand it you ask about the features built directly into the kernel. Two above commands inform about loadable runtime modules (not built into the kernel). Features built into the kernel and stored in loadable modules are complementary. So you want the opposite information than provided by those two commands.

If the kernel was built with ``Kernel .config support'' option switched to on you can display the kernel configuration by running the command invoking extract-ikconfig script with the parameter pointing some kernel file, for example:

Code:
cd /usr/src/linux
./scripts/extract-ikconfig /boot/vmlinuz-generic-2.6.27.7
In the output you'll see the features built into kernel (y), compiled as modules (m), and not set:

Code:
#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=m
# CONFIG_CPU_FREQ_DEBUG is not set
These data are usually stored in provided with kernel's sources /usr/src/linux/.config file.

Last edited by w1k0; 08-19-2009 at 07:41 PM.
 
Old 08-20-2009, 06:58 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
These data are usually stored in provided with kernel's sources /usr/src/linux/.config file.
Or without the src on RedHat/CentOS/Fedora look in /boot for the config files if it isn't a kernel you compiled yourself.

The script mentioned above doesn't exist either for those Distros.
 
Old 08-20-2009, 07:28 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Running kernel support for usbfs could also be seen with 'grep usb /proc/filesystems' provided the filesystem type was used previously.
 
  


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
Detect what built-in kernel components (not modules) are actually being used? MaxIBoy Linux - Kernel 2 05-24-2009 07:44 AM
Determining Which Modules are needed for boot if all modules are built-in? LinuxGeek Linux - General 4 06-29-2007 10:25 AM
Kernel upgrade: built-in or modules ? sl4ckw4re Slackware 6 07-16-2006 11:22 AM
kernel: modules or built in? sh4d0w13 Linux - Newbie 1 10-31-2005 07:00 PM
new kernel built....no modules linuxhippy Slackware 11 03-10-2005 03:54 PM

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

All times are GMT -5. The time now is 06:31 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