Date: Tue, 28 Aug 2012 14:12:10 -0700 From: Freddie Cash <fjwcash@gmail.com> To: Kevin Oberman <kob6558@gmail.com> Cc: Jamie Paul Griffin <jamie@kode5.net>, freebsd-stable@freebsd.org Subject: Re: Question About Tracking the Stable Branch Message-ID: <CAOjFWZ7HM2Z4FqPeoJ2c1qbX1DaygGGg5CLJh%2BytDs4wjBfVFg@mail.gmail.com> In-Reply-To: <CAN6yY1tKTu2mRaDo1WyNtvv7Sw5yFuTrru2QyGvD8jQg1oZ%2BPw@mail.gmail.com> References: <20120828203130.GB78051@kontrol.kode5.net> <CAN6yY1tKTu2mRaDo1WyNtvv7Sw5yFuTrru2QyGvD8jQg1oZ%2BPw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 28, 2012 at 2:03 PM, Kevin Oberman <kob6558@gmail.com> wrote: > In all cases, if you rebuild the kernel, be sure that the old kernel > is saved to kernel.old so you can go back to it if there si a problem. > 'make installkernel' does this) and, should you fix a problem and > re-link the kernel, be sure NOT to overwrite the working kernel ('make > reinstallkernel' does this. It's not mentioned often on the lists, but KODIR and nextboot(8) are wonderful things: # make <whatever options> buildworld # make KERNCONF=MYKERNEL <whatever other options> buildkernel # make KERNCONF=MYKERNEL KODIR=/boot/MYKERNEL <whatever other options> installkernel # nextboot -k MYKERNEL # shutdown -r now That will install your new kernel into /boot/MYKERNEL, leaving /boot/kernel alone. nextboot configures the boot process to use /boot/MYKERNEL, again leaving /boot/kernel along. If anything goes wrong, a simple reboot of the box returns you to using /boot/kernel as before. If the new kernel works correctly, then you can manually copy/moves things around as needed: # mv /boot/kernel /boot/kernel.old # cp -Rvp /boot/MYKERNEL /boot/kernel Especially useful when testing new kernels on remote systems, as "hit the reset switch" on a locked up box puts things back to the way they were before. No loader commands required. :) -- Freddie Cash fjwcash@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ7HM2Z4FqPeoJ2c1qbX1DaygGGg5CLJh%2BytDs4wjBfVFg>