# Can't load Linux kernel module



## osx-addict (Apr 25, 2010)

I tried loading the Linux kernel module today (on FreeBSD 8 stable) and get this error :


```
srv1# kldload linux
kldload: can't load linux: File exists
```

Any ideas what might be wrong?  I also tried setting linux_enable="YES" in /etc/rc.conf and rebooted but it wasn't loaded after the reboot..


----------



## osx-addict (Apr 25, 2010)

nevermind.. I gather that means the module is compiled into the kernel..


----------



## FBSDin20Steps (Apr 25, 2010)

What does "kldstat" tells you. I think your linux module is already loaded.


----------



## osx-addict (Apr 25, 2010)

kldstat does the following :


```
srv1:~ [401]> kldstat
Id Refs Address    Size     Name
 1    3 0xc0400000 bb2cec   kernel
 2    1 0xc0fb3000 5778     nullfs.ko
```

I believe it does not show anything since it's not a module but is built-in..


----------



## phoenix (Apr 25, 2010)

Add *-v* to see the modules compiled into the kernel.


----------



## osx-addict (Apr 25, 2010)

Hadn't thought to check if there was a way to do that..

Here's the output from that:


```
srv1:~ [402]> kldstat -v | grep lin
                467 linuxelf
                466 linuxaout
                458 elink
                404 linsysfs
                403 linprocfs
                171 mfi_linux
                17 aac_linux
                61 amr_linux
                30 acpi/acpi_pci_link
                286 uhub/usb_linux
```

Thanks!!


----------



## DutchDaemon (Apr 25, 2010)

I think 'linuxelf' should cover it. When loaded as a module, `kldstat -v` will show:


```
5    3 0xffffffff81558000 40170    linux.ko (/boot/kernel/linux.ko)
        Contains modules:
                Id Name
                 5 linuxelf
```


----------



## FBSDin20Steps (Apr 25, 2010)

Should have mentioned "kldstat -v" in my previous post. Thanks for the reminder, guys!


----------

