# lsmod returns empty list

## use2gen

Hi All,

after switching from genkernel configuration to gentoo-sources lsmod dont returns data. 

lsmod:

```

Module                  Size  Used by

```

ls -la /etc/make.profile:

```

/etc/make.profile -> /usr/portage/profiles/default-linux/x86/2007.0

```

kernel:

```

# Linux kernel version: 2.6.19-gentoo-r5

...

#

# Loadable module support

#

CONFIG_MODULES=y

CONFIG_MODULE_UNLOAD=y

CONFIG_MODULE_FORCE_UNLOAD=y

# CONFIG_MODVERSIONS is not set

# CONFIG_MODULE_SRCVERSION_ALL is not set

CONFIG_KMOD=y

CONFIG_STOP_MACHINE=y

...

```

uname -a:

```

Linux mybox 2.6.19-gentoo-r5 #1 SMP Fri May 23 07:04:52 MSD 2008 i686 Intel(R) Xeon(TM) CPU 3.00GHz GenuineIntel GNU/Linux

```

cat /boot/grub/grub.conf:

```

default 0

timeout 5

splashimage=(hd0,0)/grub/splash.xpm.gz

title=genkernel

root (hd0,0)

kernel /kernel-genkernel-x86-2.6.19-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3  doscsi

initrd /initramfs-genkernel-x86-2.6.19-gentoo-r5

title=gentoo-sources

root (hd0,0)

kernel /boot/gentoo-2.6.19-r5 root=/dev/sda3

```

Im also run populate modules and modules-update --force same result: lsmod return empty list

Whats wrong?

 :Rolling Eyes: 

----------

## bunder

do you even have any modules (M)?  or is everything built-in (Y)?

cheers

edit: check /lib/modules/your-kernel-version/

----------

## use2gen

 *bunder wrote:*   

> do you even have any modules (M)?  or is everything built-in (Y)?
> 
> cheers
> 
> edit: check /lib/modules/your-kernel-version/

 

find /lib/modules/2.6.19-gentoo-r5/ -type f -iname '*.o' -or -iname '*.ko'

returns emty list also but many modules defined to load

this is list from previous genkernel configuration by lsmod:

```

odule                  Size  Used by

ipv6                  199712  22

floppy                 48932  0

parport_pc             31844  0

i2c_piix4              10124  0

intel_agp              20380  1

pcnet32                27652  0

mii                     7168  1 pcnet32

parport                26440  1 parport_pc

pcspkr                  5888  0

rtc                    12852  0

i2c_core               15360  1 i2c_piix4

agpgart                21972  1 intel_agp

lpfc                  132676  0

megaraid_sas           26032  0

megaraid_mbox          27792  0

megaraid_mm            11296  1 megaraid_mbox

aacraid                47748  0

sx8                    17420  0

DAC960                 62280  0

cciss                  30980  0

cpqarray               19044  0

3w_9xxx                31748  0

3w_xxxx                25632  0

mptsas                 23048  0

scsi_transport_sas     18944  1 mptsas

mptfc                  15236  0

scsi_transport_fc      26116  2 lpfc,mptfc

mptspi                 15624  3

mptscsih               18176  3 mptsas,mptfc,mptspi

mptbase                41312  4 mptsas,mptfc,mptspi,mptscsih

atp870u                29440  0

dc395x                 30348  0

qla1280               115980  0

dmx3191d               13696  0

sym53c8xx              61844  0

qlogicfas408            7808  0

aha152x                33072  0

BusLogic               63092  0

aic7xxx               137144  0

aic79xx               170200  0

scsi_transport_spi     18560  6 mptspi,dmx3191d,sym53c8xx,aha152x,aic7xxx,aic79xx

sg                     26652  0

tg3                    91652  0

e1000                  94656  0

nfs                    95164  0

lockd                  48392  1 nfs

sunrpc                110012  2 nfs,lockd

jfs                   147948  0

dm_mirror              19152  0

dm_mod                 40344  1 dm_mirror

pdc_adma               10500  0

sata_mv                17672  0

ata_piix               14600  0

ahci                   17796  0

sata_qstor             10756  0

sata_vsc                9988  0

sata_uli                9220  0

sata_sis                9732  0

sata_sx4               14084  0

sata_nv                11268  0

sata_via               11268  0

sata_svw                9348  0

sata_sil24             14852  0

sata_sil               11784  0

sata_promise           12292  0

libata                 67220  15 pdc_adma,sata_mv,ata_piix,ahci,sata_qstor,sata_vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil24,sata_sil,sata_promise

sbp2                   21380  0

ohci1394               30896  0

ieee1394               59576  2 sbp2,ohci1394

sl811_hcd              13056  0

usbhid                 35936  0

ohci_hcd               18948  0

uhci_hcd               21128  0

usb_storage            62400  0

ehci_hcd               25736  0

usbcore                88452  7 sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,ehci_hcd

```

 *Quote:*   

> 
> 
>  or is everything built-in (Y)?
> 
> 

 

I dont know where check this

----------

## bunder

 *Quote:*   

> I dont know where check this

 

you would see them if you were using "genkernel --menuconfig" or "make menuconfig"...

see here.

cheers

----------

## use2gen

 *bunder wrote:*   

>  *Quote:*   I dont know where check this 
> 
> you would see them if you were using "genkernel --menuconfig" or "make menuconfig"...
> 
> see here.
> ...

 

I think that I dont use "genkernel --menuconfig" when install gentoo... Just using console installer. This is my default genkernel configuration (in first item of grub.conf).

Later I emerge gentoo-sources-2.6.19 and configure it as describe in manual(s) step by step: 

```

# make menuconfig

# make && make modules_install

# mount /boot

# cp arch/i386/boot/bzImage /boot/gentoo-2.6.19-r5

```

boot ok but lsmod empty.

I hope that all modules for gentoo-sources configuration must be loaded same as for genkernel...

Or need some specials commands for correct switching from genkernel to gentoo-sources?

----------

## use2gen

It seems that problem still exists...

Im upgrade kernel from latest 2.6.24-gentoo-r8 with follow steps (without genkernel):

```

# make menuconfig

# make clean && make && make modules_install

```

after rebooting:

```

# lsmod

Module                  Size  Used by

vmblock                10912  3

```

but there is more modules that must be present in lsmod (in .config marked as Y )... where is scsi modules network card (pcnet32) and so on?

 :Rolling Eyes: 

 *Quote:*   

> 
> 
> do you even have any modules (M)?
> 
> 

 

You mean that modules marked as "m" only shown in lsmod? 

 *Quote:*   

> 
> 
> or is everything built-in (Y)? 
> 
> 

 

And how list modules that marked as Y?

It looks so that the kernel loads modules as needed and unload them immediately after use. But on my another pc (laptop) almost the same kernel (from gentoo-sources without genkernel) and lsmod returns long list. And there are unused modules, but present in the list.

----------

## Jeffrey0

Anything marked Y will always be active and won't show up in lsmod. genkernel builds nearly everything as module by default, you apparently didn't.

It doesn't really matter though as long as you're not building excess stuff (for hardware you don't have).

----------

## use2gen

 *Jeffrey0 wrote:*   

> Anything marked Y will always be active and won't show up in lsmod. genkernel builds nearly everything as module by default, you apparently didn't.
> 
> It doesn't really matter though as long as you're not building excess stuff (for hardware you don't have).

 

Thank you for your reply. 

Now there is hope that the migration from genkernel to manual installation with gentoo-sources made correctly.

----------

