quick way fall back to the original kernel

Daniel Gerzo danger at rulez.sk
Mon Aug 14 16:35:13 UTC 2006


Hello gahn,

Monday, August 14, 2006, 6:07:08 PM, you wrote:

> Thanks for ur advice.

> actually i did that; rename the current kernel and
> name the "kernel.old to "kernel", which worked. but i
> am looking for a command that could do that.

you actually don't have to rename your kernels when you want to boot
different one to /boot/kernel. All you need is to set some variables
in /boot/loader.conf. See the approporiate manual page loader.conf(5)
and /boot/defaults/loader.conf. As a hint check the kernel and
bootfile variables. Or there is also utility called nextboot(8).

> the reason is that i am trying to keep my kernel up to
> date, but my understanding is that it could be done
> only with the original kernel, right? or i am
> mistaken...

> as to kernel.safe, there is no this directory by
> default (even boot manual has option for kernel safe).
> i am wondering where the kernel.safe is...

kernel.safe does not exist by default. Giorgos's kernel.safe directory
is only a copy of kernel which simply "works" for him and he is
certainly sure it does. Of course, you can keep as much kernels as you
want in your /boot directory (well, depends on how much of the free
space you have on root partition :-)) and you can name them let's say
kernel-06-03-20 and so on.

Please, also the corresponding chapter in our great Handbook:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html

and also this document can be good source for you:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-blocks.html

> but i do keep a copy of the orginal kernel in case i
> loss track of kernel version...

Once you run make installkernel, the previous version of your kernel
is copied into the kernel.old directory.

> --- Giorgos Keramidas <keramida at ceid.upatras.gr>
> wrote:

>> On 2006-08-14 11:20, dick hoogendijk
>> <dick at nagual.nl> wrote:
>> > On 13 Aug Atom Powers wrote:
>> > > And, although I've never tried it, you sholud be
>> able to `cp
>> > > /boot/kernel.old /boot/kernel` to restore the
>> previous kernel.>
>> > 
>> > I did. A few times. I just renamed the directories
>> to "kernel" and
>> > "whatevername" ;-) Works like a charm..
>> 
>> Right.
>> 
>> I usually wait a few days to make sure there are no
>> funny problems with
>> the CURRENT kernel I'm using, and then run:
>> 
>>     # cd /boot
>>     # rm -fr kernel.safe
>>     # cp -Rp kernel kernel.safe
>> 
>> This way, I have /boot/kernel, /boot/kernel.old and
>> /boot/kernel.safe.
>> 
>> By keeping kernel.safe out of the (kernel,
>> kernel.old) way, I'm sure
>> that I won't accidentally lose my 'safe' kernels
>> because I run "make
>> installkernel" at the wrong time.
>> 
>> HTH,
>> Giorgos

-- 
Best regards,
 Daniel                            mailto:danger at rulez.sk



More information about the freebsd-questions mailing list