# Changing the ufs.ko module in kernel



## GroupInode (Feb 9, 2012)

I want to make some changes to the ufs.ko module in the kernel. I made those changes in the required code and used the Makefile present at /usr/src/modules/ufs to compile the code. I got a ufs.ko. But when *I* replace this newly compiled ufs.ko with the old one present at /boot/kernel and reboot the system, the changes do not seem to be coming into effect.

Moreover I removed the file from /boot/kernel and after reboot tried to load it by using this command 

[cmd=]kldload ./ufs.ko[/cmd]

It gives an error that file already exists. But I don't understand if the ko is not present in /boot/kernel at boot time then how is it present in kernel after booting.

I need to know where should *I* put my ufs.ko such that the kernel will pick it up at boot time.


----------



## DutchDaemon (Feb 9, 2012)

You should use *kldstat -v* to see what's actually already loaded. A GENERIC kernel has

```
options         FFS                     # Berkeley Fast Filesystem
```
which I assume is responsible for:

```
$ kldstat -v | grep -i ufs
		394 ufs
```


----------



## phoenix (Feb 9, 2012)

You need to compile and install the new kernel after editing the config file.


----------



## GroupInode (Feb 10, 2012)

phoenix said:
			
		

> You need to compile and install the new kernel after editing the config file.



What changes do *I* need to make to the config file?


----------

