Generell question about freebsd-update

Sorry,
if this is a tedious question but I can not find an answer.

Assuming that I, or anyone, have upgrade FreeBSD with his own kernel settings (not GENERIC) by compiling it.
Also, I or anyone, has been build the Userland with make buildworld with own settings in /etc/src.conf.

After all is fine, the contents of /usr/src and /usr/obj has been deleted.

Then, after some weeks or month it comes to an update (security update; i.e. ...p01 change to p07 and/or maybe some minor kernel changes are there).

My question is now:
if I do not compile all again, how I above described, and instead of that, use the commands
freebsd-update fetch
freebsd-update install

Does it (FreeBSD) know how to consider my changes (as my kernel settings and option settings in src.conf)?

And when yes; how does it do it / how does it check it?

Thanks a lot!
 
Last edited by a moderator:
Does it (FreeBSD) know how to consider my changes (as my kernel settings and option settings in src.conf)?

And when yes; how does it do it / how does it check it?

Thanks a lot!

No. The freebsd-update tool installs binary updates. The pre-compiled binaries are based on the generic kernel (and default compile options).

You would need to re-build your kernel and world to keep your changes.

I believe freebsd-update will update the source if you have anything in /usr/src.

I think if you left /usr/obj alone, your buildworld/buildkernel will go faster as make will only re-compile the components that were changed.
 
Dear HL1234,
to achieve what ekingston says you might want to add to /etc/make.conf
Code:
NO_CLEAN=yes
To speed up the process you can tweak /etc/src.conf as below - if you do not need them
Code:
WITHOUT_CLANG_EXTRAS=yes
WITHOUT_CLANG_FULL=yes
WITHOUT_LLDB=yes
I use svnlite(1) to update /usr/src. I have no idea if freebsd-update takes care of that.
 
Only the GENERIC kernel can be automatically updated by freebsd-update. If a custom kernel is installed, it will have to be rebuilt and reinstalled after freebsd-update finishes installing the updates. However, freebsd-update will detect and update the GENERIC kernel if /boot/GENERIC exists, even if it is not the current running kernel of the system.
Note:

Always keep a copy of the GENERIC kernel in /boot/GENERIC. It will be helpful in diagnosing a variety of problems and in performing version upgrades. Refer to Section 23.2.3.1, “Custom Kernels with FreeBSD 9.X and Later” for instructions on how to get a copy of the GENERIC kernel.
 
thanks all for your reply.
So I sum up that:
a) freebsd-update installs only binaries which are compiled anywhere with (maybe) default settings, so compiler settings in /etc/make.conf I will got lost. On the other hand make frequent updates are better then only do it time to time, because of the long compiling procedure (for me 4 up to 8 hours).

b) freebsd-update will only update with generic kernel binaries, so I if I want use a own kernel I have to compile it again. But this take no so long time and I think to remember that is doesn't com frequently.
in /etc/freebsd-update.conf I can change
# Components src world kernel
#to
Components world
The question is, would freebsd-update then further inform me, that are kernel updates available?
Sure of cause this settings it will not install the kernel updates.

c) For the Userland binaries I have found by myself an information in the book:
Many people build their own versions of FreeBSD for internal use. Frequently,
this is just a version of FreeBSD with various sections cut out, as we’ll
do with NanoBSD in Chapter 20, but some companies use extensive modifications.
If you have deleted files from your FreeBSD install, freebsd-update(8)
will not attempt to patch them
.
So I decided for me to compile the Userland only when it comes to an upgrade (FreeBSD 11.0 to 11.1) with my own settings in /etc/src.conf and after that using freebsd-update to patch the OS frequently for security reasons.
Explanation why: I rent a small virtual server with root access and can install everything free. So it was possible to install FreeBSD. I don' need i.e. WLAN, etc. there, and have only small HDD space and low CPU. There are not a lot of supplier with FreeBSD, but much with a lot of Linux distributions. So I like to have the best performance. I think I get this if the OS is optimal compiled to the CPU. And I like not to install things I would need just only on a client desktop FreeBSD system.
 
Back
Top