# How to add kernel patches to nanobsd image



## zennybsd (Mar 14, 2012)

Which file should be edited to apply kernel patches to reflect in nanobsd image (not to the host)? Any hints or pointers appreciated. Thanks!


----------



## SirDice (Mar 14, 2012)

It uses the same source tree as the host. Patching should therefor be done in /usr/src/.


----------



## zennybsd (Mar 14, 2012)

Thanks SirDice. Do you mean:


```
cp -r /usr/src /usr/src.unpatched
```

and apply the patches?


----------



## SirDice (Mar 14, 2012)

If you want to save the unpatched sources, yes.


----------

