# Updating from source - Handbook confusion



## jbo (Nov 27, 2021)

Handbook chapter 24: https://docs.freebsd.org/en/books/handbook/cutting-edge/

*24.5.1. Quick Start:*

```
# git pull /usr/src 
check /usr/src/UPDATING 
# cd /usr/src         
# make -j4 buildworld 
# make -j4 kernel     
# shutdown -r now     
# etcupdate -p        
# cd /usr/src         
# make installworld   
# etcupdate -B        
# shutdown -r now
```

*24.5.4. Building from source:*

```
# cd /usr/src
# make buildworld
# make buildkernel
```

I see `make kernel` and `make buildkernel`. What's up with that? Is this a simple mistake and I can submit a PR or is there more to it?

It would also seem that `make installkernel` is missing in the _Quick Start_ section.


----------



## covacat (Nov 27, 2021)

make kernel is probably build + install. at least world is like this


----------



## mark_j (Nov 27, 2021)

It is stated in the handbook where they explain the numbers:


5Compile and install the kernel. This is equivalent to make buildkernel installkernel.

Also, see manual build(7) which states:
"kernel                Equivalent to buildkernel followed by installkernel"

Later on in the 24.5.5 section it mentions installing as a follow on from 24.5.4.
They likely keep this completely separate because some organisations, like mine, only do "distributekernel" and "packagekernel".


----------



## grahamperrin@ (Nov 28, 2021)

grahamperrin said:


> For part of what's required, see the _COMMON ITEMS_ section of your /usr/src/UPDATING
> 
> <https://cgit.freebsd.org/src/tree/UPDATING?id=e641c29a006ae9f528f196386052355b42a53d75#n2455> is a subsection as it appeared a few days ago.
> 
> ...



In the context of a sane logout from a desktop environment, you might (condensed):

`make buildkernel`
log out
Control-Alt-F2
`make installkernel`
– to _not_ insanely risk the installation somehow pulling the rug up from under the feet of your DE. 


Non-condensed, with use of boot environments (but NB this is highly personalised, for the way that I work with _main_): 

<https://gist.github.com/grahamperrin/e7a266154793d0e039f9a7d52396f8d7#routinely> with `cd /usr/src && make -j2 buildworld && make -j2 buildkernel KERNCONF=GENERIC-NODEBUG` and `cd /usr/src && make installkernel KERNCONF=GENERIC-NODEBUG && shutdown -r now` currently at steps 7 and 17 respectively
jbodenmann you have a variety of computers at your disposal so I guess, you'll rarely want to limit the numbers of jobs.


----------

