Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-29-2010, 03:05 AM   #1
Registered: Sep 2009
Location: Denmark
Distribution: Arch Linux
Posts: 37

Rep: Reputation: 15
understanding lsmod

Hello there fellow penguinfollowers

I have embarked on a project to create a full harddisk encryption, with the /boot partition on a usb drive, as described in this tutorial

Now, the first step says to compile a kernel with all modules compiled into the kernel itself rather than loaded seperately. I know i can use lsmod for this, but i have a little trouble understanding what the output of lsmod means. Does it simply list all the modules loaded, or does it list the status of all modules present, loaded or not? And what does the numbers to the left mean?

example output
Module                  Size  Used by
ipv6                  236668  14 
ext2                   55924  1 
snd_hda_codec_realtek   186046  1 
snd_hda_intel          19249  3
Old 05-29-2010, 03:13 AM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,862

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
Your modules are on disk in /lib/modules. The ones the kernel is using are in ram, and they are what is shown by lsmod. lsmod is 'ls' for modules.

Presuming you plug in and mount everything you want to use, save that lsmod output. Then compile those modules in(if it says you have to) and forget the ones you had on disk. Then when you type 'lsmod' there should be no modules in use.

I wish you luck, btw. You will need it.
Old 05-29-2010, 03:34 AM   #3
Registered: Sep 2009
Location: Denmark
Distribution: Arch Linux
Posts: 37

Original Poster
Rep: Reputation: 15
Thanks for clearing that up for me. And i do not doubt the fact that it will be hard to get working. But i'll learn something from the process in any case
Old 05-29-2010, 05:05 AM   #4
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,424

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
The kernel built process now has options to do most of the work for you - see here.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
if you know lsmod... ascetic angel Linux - Kernel 3 02-06-2014 12:56 PM
Help on lsmod, modprobe, etc. mortonmorton Linux - Newbie 12 09-09-2009 09:24 PM
lsmod missing! Keithj Mandriva 4 08-20-2008 04:18 PM
lsmod rtrdspok Linux - Newbie 9 08-03-2008 08:43 PM
lsmod shoot2kill Linux - General 5 04-29-2002 09:42 PM

All times are GMT -5. The time now is 01:07 PM.

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