# Generic kernel, adding/changing options



## mfaridi (Sep 29, 2010)

Can I add option on Generic Kernel , for example add option for use PF and firewall and then run these command 

```
cd /usr/src && make buildkernel && make installkernel
```
 and have new kernel option with new option , and I do change name of kernel ?

can I later update system by these command 

```
freebsd-update fetch && freebsd-update install
```
? and have that options I add before this to Generic Kernel ?


----------



## mfaridi (Sep 29, 2010)

Can I say my kernel is Generic but I add some option to it and compile it ?


----------



## Beastie (Sep 29, 2010)

Of course you can modify GENERIC, but making a copy and working on it is recommended.
But do not expect freebsd-update to understand the changes. freebsd-update works on _standard_ RELEASEs and RCs and nothing else.


----------



## mfaridi (Sep 29, 2010)

Beastie said:
			
		

> Of course you can modify GENERIC, but making a copy and working on it is recommended.
> But do not expect freebsd-update to understand the changes. freebsd-update works on _standard_ RELEASEs and RCs and nothing else.



if I add option to my Generic kernel , with freebsd-update I can not fix security risk and upgrade my FreeBSD ? Am I right ?


----------



## Beastie (Sep 29, 2010)

I am not sure how freebsd-update would behave, but I suspect it would fail during the "inspecting system" phase.
Either use a standard binary GENERIC and update/upgrade using freebsd-update or update sources, patch them and build them.


----------



## EdGe (Sep 29, 2010)

Greetings.

There is an paragraph about that topic in the Handbook, 24.2 FreeBSD Update,
subchapter *24.2.2. Security Patches*. Look for 





> "The freebsd-update utility can automatically update the GENERIC
> kernel only. If a custom kernel is in use,...."


----------



## SIFE (Sep 29, 2010)

freebsd-update update only GENERIC kernel witch you installed ,fixing security risk with compiled kernel come by you not by freebsd-update otherwise it will fail .


----------



## DutchDaemon (Sep 30, 2010)

That's quite a lot of chaotic and sometimes inaccurate advice, people ..

http://forums.freebsd.org/showpost.php?p=96896&postcount=3

So GENERIC (/boot/GENERIC/kernel) and CUSTOM (/boot/kernel/kernel) kernels can co-exist in a freebsd-update system. Just make sure you _always_ rebuild your CUSTOM kernel _immediately after_ installing updates with freebsd-update, and that freebsd-update updates the local source tree in /usr/src/ so that binaries and sources are synchronised!


----------

