# Select kernel in boot menu?



## Erratus (Jul 15, 2010)

Is this possible:

Add a menue point where the GENERIC kernel can be selected, when a custom kernel is default?

How could this be created?


----------



## DutchDaemon (Jul 15, 2010)

If you can manage to perform this action one step earlier (pre-reboot):

nextboot(8)


----------



## BuSerD (Jul 15, 2010)

Try installing a boot manager like grub or (ahhh) lilo. You can configure either of them to boot your various kernels.


----------



## DutchDaemon (Jul 15, 2010)

Another option is to drop to the loader, unload the current kernel and modules, and load the proper ones by hand.


----------



## jgh@ (Jul 15, 2010)

Erratus said:
			
		

> Is this possible:
> 
> Add a menue point where the GENERIC kernel can be selected, when a custom kernel is default?
> 
> How could this be created?



I contributed section to section 3.4.1 (second paragraph) of http://www.freebsd.org/doc/en_US.ISO8859-1/articles/releng/release-build.html

Your custom kernel then becomes a selectable kernel to install, along with GENERIC. Your custom is default, and GENERIC is installed under /boot/GENERIC.

Hope this helps, and good luck!


----------



## richardpl (Jul 16, 2010)

Erratus said:
			
		

> Is this possible:
> 
> Add a menue point where the GENERIC kernel can be selected, when a custom kernel is default?
> 
> How could this be created?



Hint: Look for .4th files in /boot.


----------



## jgh@ (Jul 16, 2010)

richardpl said:
			
		

> Hint: Look for .4th files in /boot.



This sounds like a hack. I hate hacks.


----------



## richardpl (Jul 16, 2010)

OP asked to to this in boot menu, and not from loader prompt ...


----------



## Erratus (Jul 16, 2010)

richardpl said:
			
		

> OP asked to to this in boot menu, and not from loader prompt ...


Yeah, that's what I want.

If I got it right I have to add to /boot/beastie.4th _like_ this (at proper lines)


```
variable bootgeneric
printmenuitem ."  Boot  with GENERIC kernel" bootgeneric !
dup autostartkey @ = if
                       s" YES" s" bootgeneric" setenv
                       0 boot
               then
```
But where and how to tell that the GENERIC kernel has to be used? Some more hints?


----------

