Issue with kernel building

Polytropon freebsd at edvax.de
Mon Aug 20 13:20:22 UTC 2012


On Mon, 20 Aug 2012 14:13:44 +0100, Jamie Paul Griffin wrote:
> == Michael Powell wrote on Sun 19.Aug'12 at 19:43:14 -0400 ==
> 
> > Keep in mind whenever you install a new kernel your present kernel (and its 
> > matching modules) get moved to kernel.old. What this means is that the 
> > GENERIC you have with a base install will be moved to kernel.old and can be 
> > used in the event the new kernel won't boot. Realize this: after the next 
> > rebuild process this kernel.old will be replaced _again_. In which case  you 
> > might now have 2 broken kernels with not an easy way to recover.
> 
> Very good point! I'd clear the /usr/src/obj directory as pointed out,
> then build a generic kenel, install it and boot from it. Then you
> know you've got a working kernel to fall back on.

You could then make a copy of that kernel, e. g. from its
initial installation location /boot/kernel to /boot/kernel.GENERIC.
If you continue building a custom kernel, /boot/kernel will be
overwritten. In worst case, you can unload your custom kernel
at the loader prompt, load kernel.GENERIC instead and boot the
system with that definitely working kernel.



> At that point rebuild your custom kernel with correct commands
> as pointed out in the previous response by Michael; i.e.
> `make buildkernel KERNCONF=MYKERNEL` ... etc.

Again, I may point to The FreeBSD Handbook, the section regarding
building world and kernel, as well as the instructions in the
comment header of /usr/src/Makefile. Following those advices
should be easy and provide you with a procedure that reliably
works.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list