docs/84154: Handbook somewhat off in use of /boot/kernel.old

Gary W. Swearingen garys at opusnet.com
Thu Jul 28 14:17:46 UTC 2005


John Baldwin <jhb at FreeBSD.org> writes:

> How about:
>
> The new kernel and modules will be copied to the /boot/kernel directory.  If 
> the currently running kernel came from "/boot/kernel", then the old kernel 
> and modules will be moved to the /boot/kernel.old directory.

Change "will be" to "will first be". As-is, it doesn't sound right
because one wonders how the old kernel can be moved "then", when the
old kernel is gone.

> I haven't read the full doc for context, but it looks like the replacement 
> text doesn't actually replace the same meaning.  The reason for kernel.old 
> only getting updated if the kernel being installed is running is to try to 
> make kernel.old more reliable as in theory it should always be a kernel that 
> was running well enough to do an installkernel now.  Probably the surrounding 
> section here needs more updating to reflect that larger change.

I'm not sure about that reason.  I think the reason is that if you're
not booting from /boot/kernel, it's probably bad, so there's no reason
to save it.  (It shouldn't try to be that smart, failing some of the
time.  I'd always do the backup like my editor does, assuming I'll
have saved the old one if I wanted to.) If users follow the handbook,
they won't be booting out of /boot/kernel.old anyway as they'll be
booting out of /boot/kernel.GENERIC (like I always have).

Anyway, here's the whole old para

   Note: If you are having trouble building a kernel, make sure to
   keep a GENERIC, or some other kernel that is known to work on hand
   as a different name that will not get erased on the next build. You
   cannot rely on kernel.old because when installing a new kernel,
   kernel.old is overwritten with the last installed kernel which may
   be non-functional. Also, as soon as possible, move the working
   kernel to the proper /boot/kernel location or commands such as
   ps(1) may not work properly. To do this, simply rename the
   directory containing the good kernel:

maybe replace with

   Note: If you are having trouble building a kernel, keep on hand a
   GENERIC, or some other kernel that is known to work, as a different
   name than "/boot/kernel.old".  That directory will get removed by
   standard "make" scripts when installing a new kernel if the running
   kernel came from "/boot/kernel".  Also, as soon as possible, move
   the working kernel to the proper /boot/kernel location or commands
   such as ps(1) may not work properly. To do this, simply rename the
   directory containing the good kernel:



More information about the freebsd-doc mailing list