Bug 235627

Summary: Handbook 23.2.2 references GENERIC kernel outdated
Product: Documentation Reporter: freebsd
Component: DocumentationAssignee: freebsd-doc mailing list <doc>
Status: In Progress ---    
Severity: Affects Some People CC: trhodes
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description freebsd 2019-02-09 20:53:48 UTC
Section 23.2.2 of the Handbook indicates keeping a copy of the GENERIC kernel around is a good idea.  There is no longer be a kernel named GENERIC, although there is a generic kernel:

11.2-RELEASE-p4 FreeBSD 11.2-RELEASE-p4 #0: Thu Sep 27 08:16:24 UTC 2018     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

The section needs to be reworked to indicate how one knows a generic kernel is installed, and how to identify that the generic kernel is still present if the current kernel is not the generic one.
Comment 1 Tom Rhodes freebsd_committer 2019-03-11 19:57:40 UTC
Hi

I'm a little confused, it seems a GENERIC kernel exists in both my CURRENT and STABLE checkouts.  Are you just suggesting perhaps a note that states a kernel name can be pulled from uname(1)?
Comment 2 freebsd 2019-03-11 20:35:34 UTC
I may be confused, as I have not needed anything other than the generic kernel for some time.  What I remember is that various kernels could be kept at the same time in /boot; and the generic kernel initially appeared there as one of them.
So if one had only the generic kernel installed, it would be present as /boot/GENERIC.  I could be wrong here.

At the moment, my actual kernel is in /boot/kernel/kernel; there is no kernel at all in /boot, as indicated by the doc.
I have another kernel in /boot/kernel.old/kernel
Both of these are generic kernels, but one of them is the initial one and the other is one with binary patches applied as a result of the update process.
I don't know if there is a way of telling if they are actually generic kernels; certainly not by name.  There is nothing in the /boot tree named GENERIC.

Since I'm not building source, /usr/obj is empty.
Comment 3 Tom Rhodes freebsd_committer 2019-03-15 17:02:32 UTC
Hi,

Well, one way to pull the current kernel is uname(1), for an older kernel, the "ident" information may be pulled with strings(1):

root@ember:/boot/kernel # strings kernel | grep ident
[SNIP]
ident   GENERIC

Do you think the handbook needs to explain how to identify the current and previous kernels?
Comment 4 freebsd 2019-03-16 03:46:22 UTC
(In reply to Tom Rhodes from comment #3)
We may be getting off the original problem here.
The original problem is that the manpage references /boot/GENERIC as a kernel, and that file does not exist anymore.  So that's the main thing that needs to be fixed.

Assuming that part is fixed, then yes, it would be good to say something about how one can tell if the installed kernel, /boot/kernel/kernel, is a GENERIC one, given that freebsd-update only works with GENERIC kernels.  As you point out, that's pretty easy with uname.  If it's possible to find out about kernels other than the installed one, that might be useful as well.  I don't have a clue how to do that.
Comment 5 commit-hook freebsd_committer 2019-03-22 20:09:53 UTC
A commit references this bug:

Author: trhodes
Date: Fri Mar 22 20:09:34 UTC 2019
New revision: 52888
URL: https://svnweb.freebsd.org/changeset/doc/52888

Log:
  There is no /boot/GENERIC.  Reword to advise on checking the installed kernel
  and better inform users on the upgrade path.

  PR:		235627

Changes:
  head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml