Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2012 15:20:20 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Jamie Paul Griffin <jamie@kode5.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Issue with kernel building
Message-ID:  <20120820152020.fbe1ff20.freebsd@edvax.de>
In-Reply-To: <20120820131344.GA6963@kontrol.kode5.net>
References:  <DUB109-W1405A43C7DAF2745B9971C4C4BA0@phx.gbl> <k0rtla$9n3$1@ger.gmane.org> <20120820131344.GA6963@kontrol.kode5.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120820152020.fbe1ff20.freebsd>