freebsd-update endless loop overwriting kernel modules

Hi,

today i updated my system via freebsd-update. It updated some kernel modules.

Since i am running a custom kernel i recompiled it afterwards.

Problem is that when running freebsd-update again, it overwrites the kernel modules again and i have to recompile the kernel again.
This doesn't stop, after recompiling the kernel, freebsd-update again overwrites these modules.

What should i do?
 
Why do you need a custom kernel?
I have a very weak system here with 1GB of ram and i need a small kernel. My custom kernel is about 8MB opposed to the 20MB of the default kernel.

Just wanted to add that i had not this problems before, recompiling the kernel would not have triggered freebsd-update to overwrite the modules over and over again. This is new behaviour for me and i thought this is a bug of some sort.
 
Fair enough. Did you change the ident of your custom kernel? Or did you just modify GENERIC? Never modify GENERIC, leave that as-is, and create a new kernel configuration. Also make sure to set the ident to something meaningful.
 
Then it should detect you're running a custom kernel. I could image the system getting confused if your custom kernel was called GENERIC. Have you tried running freebsd-update(8) with the --debug option? Perhaps that provides more clues.
 
There is a "Components" keyword in /etc/freebsd-update.conf. If you remove the word kernel there, your kernel should stay untouched during the update. Not sure if that is what you are looking for though.
 
f you remove the word kernel there, your kernel should stay untouched during the update. Not sure if that is what you are looking for though.
It's a useful indication for me it's time to recompile my kernel if it gets updated by the system. So i prefer to keep this updates enabled. Thank you for your suggestion nevertheless.
 
Have you tried running freebsd-update(8) with the --debug option? Perhaps that provides more clues.
I recompiled my kernel, rebooted and started freebsd-update with the --debug option. Here is the output:
Code:
root@xxx:~ # freebsd-update fetch --debug
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 12.1-RELEASE from update4.freebsd.org...
latest.ssl                                             512  B 1976 kBps    00s
done.
Fetching metadata index...
d2ac370dd293a71b1740ea12db713849f1ee4944403d08         225  B 1373 kBps    00s
done.
Inspecting system... done.
Preparing to download files... done.

root@xxx:~ # freebsd-update install --debug
Installing updates... done.

Seems like all worked like it should. (Besides the fact it overwrote my kernel modules again)

But i noticed that my kernel ident is a bit strange:
Code:
root@xxx:~ # uname -a
FreeBSD <hostname> 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 #8 r358860M: Tue Mar 24 11:33:39 CET 2020     root@<hostname>:/usr/obj/usr/src/i386.i386/sys/MINIMAL  i386
I could swear that the ident was MINIMAL rather than root@<hostname>:/usr/obj/usr/src/i386.i386/sys/MINIMAL before.
 
That information shouldn't be there any more, not by default at least. Do you have WITHOUT_REPRODUCIBLE_BUILD in src.conf?
 
The uname(8) output should look similar to this:
Yeah, that's what i am used to too.

Can you post your kernel config?
Here it is:
Code:
root@xxx:/usr/src/sys/i386/conf # cat MINIMAL
#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
#    https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (https://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
# $FreeBSD: releng/12.1/sys/i386/conf/GENERIC 344149 2019-02-15 09:49:09Z kib $

cpu        I586_CPU
cpu        I686_CPU
ident        MINIMAL

options     SCHED_ULE        # ULE scheduler
options     PREEMPTION        # Enable kernel thread preemption
options     VIMAGE            # Subsystem virtualization, e.g. VNET
options     INET            # InterNETworking
options     IPSEC            # IP (v4/v6) security
options     IPSEC_SUPPORT        # Allow kldload of ipsec and tcpmd5
options     TCP_HHOOK        # hhook(9) framework for TCP
options     TCP_OFFLOAD        # TCP offload
options     SCTP            # Stream Control Transmission Protocol
options     FFS            # Berkeley Fast Filesystem
options     SOFTUPDATES        # Enable FFS soft updates support
options     UFS_ACL            # Support for access control lists
options     UFS_DIRHASH        # Improve performance on big directories
options     UFS_GJOURNAL        # Enable gjournal-based UFS journaling
options     MD_ROOT            # MD is a potential root device
options     MSDOSFS            # MSDOS Filesystem
options     CD9660            # ISO 9660 Filesystem
options     PROCFS            # Process filesystem (requires PSEUDOFS)
options     PSEUDOFS        # Pseudo-filesystem framework
options     GEOM_RAID        # Soft RAID functionality.
options     GEOM_LABEL        # Provides labelization
options     SCSI_DELAY=5000        # Delay (in ms) before probing SCSI
options     KTRACE            # ktrace(1) support
options     STACK            # stack(9) support
options     SYSVSHM            # SYSV-style shared memory
options     SYSVMSG            # SYSV-style message queues
options     SYSVSEM            # SYSV-style semaphores
options     _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options     PRINTF_BUFR_SIZE=128    # Prevent printf output being interspersed.
options     KBD_INSTALL_CDEV    # install a CDEV entry in /dev
options     HWPMC_HOOKS        # Necessary kernel hooks for hwpmc(4)
options     AUDIT            # Security event auditing
options     CAPABILITY_MODE        # Capsicum capability mode
options     CAPABILITIES        # Capsicum capabilities
options     MAC            # TrustedBSD MAC Framework
options     KDTRACE_HOOKS        # Kernel DTrace hooks
options     DDB_CTF            # Kernel ELF linker loads CTF data
options     INCLUDE_CONFIG_FILE    # Include this file in kernel
options     RACCT            # Resource accounting framework
options     RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options     RCTL            # Resource limits

# Debugging support.  Always need this:
options     KDB            # Enable kernel debugger support.
options     KDB_TRACE        # Print a stack trace for a panic.

# To make an SMP kernel, the next two lines are needed
options     SMP            # Symmetric MultiProcessor Kernel
device        apic            # I/O APIC
options     EARLY_AP_STARTUP

# CPU frequency control
device        cpufreq

# Bus support.
device        acpi
device        pci

# ATA controllers
device        ahci            # AHCI-compatible SATA controllers

# ATA/SCSI peripherals
device        scbus            # SCSI bus (required for ATA/SCSI)
device        da            # Direct Access (disks)
device        cd            # CD
device        pass            # Passthrough device (direct ATA/SCSI access)
device        ses            # Enclosure Services (SES and SAF-TE)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device        atkbdc            # AT keyboard controller
device        atkbd            # AT keyboard
device        psm            # PS/2 mouse

device        splash            # Splash screen and screen saver support

# vt is the new video console driver
device        vt
device        vt_vga

device        agp            # support several AGP chipsets

# PCI/PCI-X/PCIe Ethernet NICs that use iflib infrastructure
device        iflib
device        em            # Intel PRO/1000 Gigabit Ethernet Family

# Pseudo devices.
device        crypto            # core crypto support
device        loop            # Network loopback
device        random            # Entropy device
device        padlock_rng        # VIA Padlock RNG
device        rdrand_rng        # Intel Bull Mountain RNG
device        ether            # Ethernet support
device        vlan            # 802.1Q VLAN support
device        tun            # Packet tunnel.
device        md            # Memory "disks"
device        gif            # IPv6 and IPv4 tunneling
device        firmware        # firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device        bpf            # Berkeley packet filter

# USB support
options     USB_DEBUG        # enable debug msgs
device        uhci            # UHCI PCI->USB interface
device        ohci            # OHCI PCI->USB interface
device        ehci            # EHCI PCI->USB interface (USB 2.0)
device        usb            # USB Bus (required)
device        ukbd            # Keyboard
device        umass            # Disks/Mass storage - Requires scbus and da

# Sound support
device        sound            # Generic sound driver (required)
device        snd_hda            # Intel High Definition Audio

# evdev interface
options     EVDEV_SUPPORT        # evdev support in legacy drivers
device        evdev            # input event device support
device        uinput            # install /dev/uinput cdev
 
Nothing wrong with that, except the cpu is set twice, but I doubt that would cause any problems.
 
Yes, i copied GENERIC over to a new file MINIMAL and changed the ident to MINIMAL as well. Then i started to remove stuff from MINIMAL and compiled it via make buildkernel -j2 KERNCONF=MINIMAL.

maybe I'am wrong, but there is no file with the same name in the kernel conf dir?
could you try to you compile your kernel with another config name?
I always compile my kernel with JS name for example and never have a problem with freebsd-update
yes,after upgrade I have to recompile the kernel again..but is no problem
 
except the cpu is set twice
I've read that i have to keep both of them:
For 32-bit installs of FreeBSD, you will want to keep I586_CPU as well as I686_CPU.

I586_CPU enables a bunch of memory optimisations that aren't enabled with I686_CPU, even though all Intel and AMD CPUs since the PentiumPro and AthlonXP include those instructions.

There are several threads in 2008 and 2007 on the FreeBSD mailing lists regarding this "issue", and the general consensus was to have both in your 32-bit kernel config file to get the best performance.

If this is not true anymore, i would be happy to get rid of I586_CPU since i have a I686_CPU.

maybe I'am wrong, but there is no file with the same name in the kernel conf dir?
These are my files:
Code:
root@xx:/usr/src/sys/i386/conf # ls -l
total 72
-rw-r--r--  1 root  wheel    577 Feb 25 16:47 DEFAULTS
-rw-r--r--  1 root  wheel  14496 Feb 25 16:47 GENERIC
-rw-r--r--  1 root  wheel   1004 Feb 25 16:47 GENERIC.hints
-rw-r--r--  1 root  wheel   5409 Mar 24 09:04 MINIMAL
-rw-r--r--  1 root  wheel    139 Feb 25 16:47 Makefile
-rw-r--r--  1 root  wheel  29623 Feb 25 16:47 NOTES
-rw-r--r--  1 root  wheel    550 Feb 25 16:47 PAE

could you try to you compile your kernel with another config name?
If nothing else helps i will try this. But like i wrote, all worked before. Thank you for your suggestion.
 
Hi,

freebsd-update will overwrite /boot/kernel and save old kernel to /boot/kernel.old.
You can install your custom kernel in other destination so that freebsd-update don't mess with it:
Code:
make kernel KERNCONF=MYKERNEL KODIR=/boot/MYKERNEL
and test onerun to check if kernel is ok:
Code:
nextboot -k /boot/MYKERNEL
reboot
make it permanent:
/boot/loader.conf:
Code:
kernel="MYKERNEL"
kernels="MYKERNEL.old kernel kernel.old"

P.S.

Where is KODIR documented? I found it in some forum accidently years ago ...
Nuno Teixeira
 
It seems like my source tree is corrupted. I'll delete it and check it out again.
Code:
root@xx:/usr/src # svnlite up
Updating '.':
   C contrib/ntp/include/ntp_calgps.h
   C contrib/ntp/include/ntp_psl.h
   C contrib/ntp/include/timexsup.h
G    contrib/ntp/html/copyright.html
G    contrib/ntp/html/drivers/driver20.html
G    contrib/ntp/html/miscopt.html
G    contrib/ntp/include/Makefile.in
G    contrib/ntp/include/ntp_calendar.h
G    contrib/ntp/include/ntp_control.h
G    contrib/ntp/include/ntp_stdlib.h
G    contrib/ntp/include/timespecops.h
G    contrib/ntp/include/ntp_fp.h
G    contrib/ntp/include/ntp_refclock.h
G    contrib/ntp/include/ntp_syslog.h
U    UPDATING
G    sys/conf/newvers.sh
G    sys/kern/kern_jail.c
G    sys/net/if_clone.c
G    sys/net/if_clone.h
G    sys/net/if_epair.c
G    sys/dev/ixl/if_ixl.c
G    sys/dev/ixl/ixl.h
G    sys/dev/oce/oce_if.c
G    sys/dev/oce/oce_if.h
G    sys/dev/mlx5/mlx5_en/mlx5_en_tx.c
G    sys/netinet/tcp_syncache.c
G    sys/netinet/ip_output.c
G    sys/netinet6/ip6_output.c
G    sys/sys/mbuf.h
G    contrib/ntp/COPYRIGHT
G    contrib/ntp/ChangeLog
   C contrib/ntp/libntp/ntp_calgps.c
   C contrib/ntp/libntp/timespecops.c
   C contrib/ntp/libntp/timexsup.c
G    contrib/ntp/libntp/decodenetnum.c
G    contrib/ntp/libntp/msyslog.c
G    contrib/ntp/libntp/statestr.c
G    contrib/ntp/libparse/Makefile.am
G    contrib/ntp/ntpd/Makefile.in
G    contrib/ntp/ntpd/invoke-ntp.keys.texi
G    contrib/ntp/libntp/Makefile.in
G    contrib/ntp/libntp/mstolfp.c
G    contrib/ntp/libntp/recvbuff.c
G    contrib/ntp/ntpd/Makefile.am
G    contrib/ntp/ntpd/invoke-ntp.conf.texi
G    contrib/ntp/libntp/dofptoa.c
G    contrib/ntp/ntpd/ntp.conf.5man
G    contrib/ntp/ntpd/ntp.conf.man.in
G    contrib/ntp/ntpd/ntp.keys.html
G    contrib/ntp/ntpd/keyword-gen.c
G    contrib/ntp/ntpd/ntp.conf.html
G    contrib/ntp/ntpd/ntp.keys.5mdoc
G    contrib/ntp/ntpd/ntp_control.c
G    contrib/ntp/ntpd/ntp_config.c
G    contrib/ntp/ntpd/ntp_leapsec.c
G    contrib/ntp/ntpd/ntp_parser.h
G    contrib/ntp/libntp/ntp_calendar.c
G    contrib/ntp/libntp/systime.c
G    contrib/ntp/libparse/Makefile.in
G    contrib/ntp/ntpd/cmd_args.c
G    contrib/ntp/ntpd/invoke-ntpd.texi
G    contrib/ntp/ntpd/ntp.conf.5mdoc
G    contrib/ntp/ntpd/ntp.conf.mdoc.in
G    contrib/ntp/ntpd/ntp.keys.man.in
G    contrib/ntp/ntpd/ntp_io.c
G    contrib/ntp/ntpd/ntp_loopfilter.c
G    contrib/ntp/ntpd/ntp_proto.c
G    contrib/ntp/ntpd/ntp_leapsec.h
G    contrib/ntp/ntpd/ntp_peer.c
G    contrib/ntp/ntpd/ntp_restrict.c
G    contrib/ntp/ntpd/ntpd-opts.h
G    contrib/ntp/ntpd/ntpd.html
   C contrib/ntp/ntpd/psl0.conf
   C contrib/ntp/ntpd/psl1.conf
   C contrib/ntp/ntpd/psl2.conf
G    contrib/ntp/ntpd/ntp_request.c
G    contrib/ntp/ntpd/ntpd-opts.c
G    contrib/ntp/ntpd/ntpd.c
G    contrib/ntp/ntpd/ntp_scanner.c
G    contrib/ntp/ntpd/ntpd.1ntpdman
G    contrib/ntp/ntpd/ntpd.man.in
G    contrib/ntp/ntpd/refclock_nmea.c
G    contrib/ntp/ntpd/refclock_jupiter.c
G    contrib/ntp/ntpd/refclock_parse.c
G    contrib/ntp/ntpd/refclock_palisade.h
G    contrib/ntp/ntpdc/invoke-ntpdc.texi
G    contrib/ntp/ntpd/refclock_oncore.c
G    contrib/ntp/ntpd/refclock_zyfer.c
G    contrib/ntp/ntpdc/ntpdc-opts.c
G    contrib/ntp/ntpdc/layout.std
G    contrib/ntp/ntpdc/ntpdc.1ntpdcman
G    contrib/ntp/ntpdc/ntpdc.man.in
G    contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
G    contrib/ntp/ntpdc/ntpdc.mdoc.in
G    contrib/ntp/ntpdc/ntpdc.c
G    contrib/ntp/ntpdc/ntpdc_ops.c
G    contrib/ntp/ntpq/invoke-ntpq.texi
G    contrib/ntp/ntpq/Makefile.in
G    contrib/ntp/ntpq/ntpq-opts.c
G    contrib/ntp/ntpq/ntpq-subs.c
G    contrib/ntp/ntpq/ntpq.h
G    contrib/ntp/ntpq/ntpq.1ntpqmdoc
G    contrib/ntp/ntpq/ntpq.1ntpqman
G    contrib/ntp/ntpq/ntpq.html
G    contrib/ntp/CommitLog
G    contrib/ntp/NEWS
G    contrib/ntp/config.h.in
G    contrib/ntp/configure
G    contrib/ntp/configure.ac
G    contrib/ntp/html/accopt.html
G    contrib/ntp/html/clockopt.html
G    contrib/ntp/html/confopt.html
G    contrib/ntp/html/discipline.html
G    contrib/ntp/html/drivers/driver29.html
G    contrib/ntp/include/Makefile.am
G    contrib/ntp/include/ntp.h
G    contrib/ntp/include/ntp_config.h
G    contrib/ntp/include/ntp_io.h
G    contrib/ntp/include/ntp_request.h
G    contrib/ntp/include/ntpd.h
G    contrib/ntp/libntp/Makefile.am
G    contrib/ntp/libntp/dolfptoa.c
G    contrib/ntp/libparse/clk_rawdcf.c
G    contrib/ntp/ntpd/complete.conf.in
G    contrib/ntp/ntpd/keyword-gen-utd
G    contrib/ntp/ntpd/ntp.conf.def
G    contrib/ntp/ntpd/ntp.keys.5man
G    contrib/ntp/ntpd/ntp.keys.mdoc.in
G    contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
G    contrib/ntp/ntpsnmpd/ntpsnmpd.html
G    contrib/ntp/parseutil/dcfd.c
G    contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
G    contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
G    contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
G    contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
G    contrib/ntp/packageinfo.sh
G    contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
G    contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
G    contrib/ntp/ntpd/ntp_keyword.h
G    contrib/ntp/scripts/ntp-wait/ntp-wait-opts
G    contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
G    contrib/ntp/ntpd/ntp_parser.c
G    contrib/ntp/ntpd/ntp_refclock.c
G    contrib/ntp/ntpd/ntp_util.c
G    contrib/ntp/ntpd/ntpd.1ntpdmdoc
G    contrib/ntp/ntpd/ntpd.mdoc.in
G    contrib/ntp/ntpd/refclock_gpsdjson.c
G    contrib/ntp/ntpd/refclock_palisade.c
G    contrib/ntp/ntpdate/ntpdate.c
G    contrib/ntp/ntpdc/ntpdc-opts.h
G    contrib/ntp/ntpdc/ntpdc.html
G    contrib/ntp/ntpq/Makefile.am
G    contrib/ntp/ntpq/ntpq-opts.h
G    contrib/ntp/ntpq/ntpq.c
G    contrib/ntp/ntpq/ntpq.mdoc.in
G    contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
G    contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
G    contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts
G    contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
G    contrib/ntp/scripts/invoke-summary.texi
G    contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
G    contrib/ntp/ntpq/ntpq.man.in
G    contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
G    contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
G    contrib/ntp/scripts/build/mkver.in
G    contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
G    contrib/ntp/scripts/invoke-plot_summary.texi
G    contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
G    contrib/ntp/sntp/COPYRIGHT
G    contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
G    contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
G    contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
G    contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
G    contrib/ntp/scripts/ntp-wait/ntp-wait.html
G    contrib/ntp/scripts/ntpsweep/ntpsweep-opts
G    contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
G    contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
G    contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
G    contrib/ntp/scripts/ntpsweep/ntpsweep.html
G    contrib/ntp/scripts/ntptrace/ntptrace-opts
G    contrib/ntp/scripts/ntptrace/ntptrace.man.in
G    contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
G    contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
G    contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
G    contrib/ntp/scripts/ntptrace/ntptrace.html
G    contrib/ntp/sntp/libevent/build-aux/compile
G    contrib/ntp/sntp/libevent/build-aux/config.guess
G    contrib/ntp/sntp/libevent/build-aux/config.sub
G    contrib/ntp/sntp/libevent/build-aux/depcomp
G    contrib/ntp/sntp/libevent/build-aux/install-sh
G    contrib/ntp/sntp/libevent/build-aux/missing
G    contrib/ntp/sntp/libevent/build-aux/test-driver
G    contrib/ntp/scripts/plot_summary-opts
G    contrib/ntp/scripts/plot_summary.man.in
G    contrib/ntp/scripts/summary.1summarymdoc
G    contrib/ntp/scripts/update-leap/invoke-update-leap.texi
G    contrib/ntp/scripts/update-leap/update-leap.html
G    contrib/ntp/sntp/configure
G    contrib/ntp/sntp/include/version.def
G    contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
G    contrib/ntp/scripts/plot_summary.html
G    contrib/ntp/scripts/summary.1summaryman
G    contrib/ntp/scripts/summary.mdoc.in
G    contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
G    contrib/ntp/sntp/include/copyright.def
G    contrib/ntp/scripts/plot_summary.1plot_summarymdoc
G    contrib/ntp/scripts/summary-opts
G    contrib/ntp/scripts/summary.man.in
G    contrib/ntp/scripts/update-leap/update-leap.1update-leapman
G    contrib/ntp/scripts/update-leap/update-leap.mdoc.in
G    contrib/ntp/sntp/crypto.c
G    contrib/ntp/sntp/invoke-sntp.texi
G    contrib/ntp/scripts/plot_summary.1plot_summaryman
G    contrib/ntp/scripts/plot_summary.mdoc.in
G    contrib/ntp/scripts/summary.html
G    contrib/ntp/scripts/update-leap/update-leap-opts
G    contrib/ntp/scripts/update-leap/update-leap.man.in
G    contrib/ntp/sntp/configure.ac
G    contrib/ntp/sntp/include/version.texi
G    contrib/ntp/sntp/libevent/test/regress.gen.c
G    contrib/ntp/sntp/m4/version.m4
G    contrib/ntp/sntp/sntp-opts.c
G    contrib/ntp/sntp/sntp.html
G    contrib/ntp/sntp/libevent/build-aux/ar-lib
G    contrib/ntp/sntp/libevent/build-aux/ylwrap
G    contrib/ntp/sntp/m4/ntp_problemtests.m4
G    contrib/ntp/sntp/scm-rev
G    contrib/ntp/sntp/sntp.1sntpmdoc
G    contrib/ntp/sntp/libopts/m4/libopts.m4
G    contrib/ntp/sntp/networking.c
G    contrib/ntp/sntp/sntp.1sntpman
G    contrib/ntp/sntp/tests/run-keyFile.c
G    contrib/ntp/sntp/tests/run-packetHandling.c
G    contrib/ntp/sntp/tests/testconf.yml
G    contrib/ntp/util/ntp-keygen-opts.h
G    contrib/ntp/util/ntp-keygen.man.in
G    usr.sbin/ntp/libntp/Makefile
G    contrib/ntp/sntp/tests/run-crypto.c
G    contrib/ntp/sntp/tests/run-networking.c
G    contrib/ntp/sntp/tests/run-utilities.c
G    contrib/ntp/util/ntp-keygen-opts.c
G    contrib/ntp/util/ntp-keygen.html
G    usr.sbin/ntp/config.h
G    contrib/ntp/sntp/libevent/test/regress.gen.h
G    contrib/ntp/sntp/main.c
G    contrib/ntp/sntp/sntp-opts.h
G    contrib/ntp/sntp/sntp.man.in
G    contrib/ntp/sntp/tests/run-kodDatabase.c
G    contrib/ntp/sntp/tests/run-packetProcessing.c
G    contrib/ntp/sntp/version.c
G    contrib/ntp/util/ntp-keygen.1ntp-keygenman
G    contrib/ntp/util/ntp-keygen.mdoc.in
G    crypto/openssh/monitor.c
G    contrib/ntp/sntp/sntp.mdoc.in
G    contrib/ntp/sntp/tests/run-kodFile.c
G    contrib/ntp/sntp/tests/run-t-log.c
G    contrib/ntp/util/invoke-ntp-keygen.texi
G    contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
G    contrib/ntp/util/ntptime.c
Updated to revision 359271.
Summary of conflicts:
  Tree conflicts: 9
Searching tree conflict details for 'contrib/ntp/include/ntp_calgps.h' in repository:
Checking r359144... done
Tree conflict on 'contrib/ntp/include/ntp_calgps.h':
A new file appeared during update to r359271; it was added by gordon in r359144.
An unversioned file was found in the working copy.

Subversion is not smart enough to resolve this tree conflict automatically!
See 'svn help resolve' for more information.

Select: (p) Postpone, (r) Mark as resolved, (h) Help, (q) Quit resolution:
 
Use freebsd-update(8) to keep the source in sync or use subversion. Don't use both. If you want to keep using subversion make sure to remove the source component in freebsd-update.conf.
 
I deleted the entire /usr/src directory, checked out the kernel sources again and updated the system via freebsd-update.
Then i renamed my config file from MINIMAL to CUSTOM and recompiled the kernel.

The ident string now looks normal:
Code:
[root@xxx ~]$ uname -a
FreeBSD <hostname> 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 r359271 MINIMAL  i386

but another call to freebsd-update overwrote the kernel and the kernel modules again:
Code:
[root@xxx ~]$ uname -a
FreeBSD <hostname> 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 GENERIC  i386

Code:
The following files will be updated as part of updating to
12.1-RELEASE-p3:
/boot/kernel/ath_main.ko
/boot/kernel/bridgestp.ko
/boot/kernel/carp.ko
/boot/kernel/ccr.ko
/boot/kernel/cloudabi.ko
/boot/kernel/cpuctl.ko
/boot/kernel/ctl.ko
/boot/kernel/dummynet.ko
/boot/kernel/firewire.ko
/boot/kernel/hifn.ko
/boot/kernel/hv_netvsc.ko
/boot/kernel/if_age.ko
/boot/kernel/if_alc.ko
/boot/kernel/if_ale.ko
/boot/kernel/if_an.ko
/boot/kernel/if_axe.ko
/boot/kernel/if_axge.ko
/boot/kernel/if_bce.ko
/boot/kernel/if_bfe.ko
/boot/kernel/if_bge.ko
/boot/kernel/if_bridge.ko
/boot/kernel/if_bwi.ko
/boot/kernel/if_bwn.ko
/boot/kernel/if_bxe.ko
/boot/kernel/if_cas.ko
/boot/kernel/if_cdce.ko
/boot/kernel/if_ce.ko
/boot/kernel/if_cp.ko
/boot/kernel/if_cs.ko
/boot/kernel/if_ct.ko
/boot/kernel/if_cxgb.ko
/boot/kernel/if_cxgbe.ko
/boot/kernel/if_cxgbev.ko
/boot/kernel/if_dc.ko
/boot/kernel/if_de.ko
/boot/kernel/if_ed.ko
/boot/kernel/if_ena.ko
/boot/kernel/if_ep.ko
/boot/kernel/if_epair.ko
/boot/kernel/if_et.ko
/boot/kernel/if_ex.ko
/boot/kernel/if_fe.ko

I'll look into the KODIR stuff like nunotex suggested.
 
freebsd-update is mostly a tool that downloads big packages of files, and then places files in the places they belong. For example, it knows that when a new kernel needs to be installed, it needs to overwrite /boot/kernel/if_xyz.ko. What do you expect that tool to do if you have modified those files locally? Leave them alone silently? That would be insane, because asked the tool to perform an update. Give you an error message and completely stop working? That would be insane too, because then it would become impossible to fix a system that has been accidentally slightly damaged. Print warning messages? Maybe it does that, maybe it doesn't, I haven't looked. I know that it does some tricks to merge configuration files that are expected to be edited (such as /etc/rc.conf), but I fully expect it to install the upgraded files.

If you want to run a local private kernel, and make sure it doesn't get upgraded to the release version when you ask freebsd-update to install the release version, you'll have to store it in a different place.

I have a very weak system here with 1GB of ram and i need a small kernel. My custom kernel is about 8MB opposed to the 20MB of the default kernel.

All this effort for 1% of your memory. I'm sure you have benchmark results that demonstrate that it is necessary and efficient to run a private kernel. Would you care to share them with us? My hunch is that using your own kernel will have no appreciable effect on performance or functionality of your system.
 
What do you expect that tool to do if you have modified those files locally?
I expect it to overwrite them because they changed. But freebsd-update was smart enough in the past not to overwrite them again after i recompiled the kernel afterwards.
All this effort for 1% of your memory. I'm sure you have benchmark results that demonstrate that it is necessary...
There is no benchmark and i don't need one. I would use a custom kernel even for 0.01% more memory. It's not fun to work on such a weak system.
I quote https://www.freebsd.org/doc/handbook/kernelconfig-custom-kernel.html
Lower memory usage. A custom kernel often uses less memory than the GENERIC kernel by omitting unused features and device drivers. This is important because the kernel code remains resident in physical memory at all times, preventing that memory from being used by applications. For this reason, a custom kernel is useful on a system with a small amount of RAM.
If you think these sentences are wrong, please file a PR to stop noobs like me from recompiling their kernels.
 
Back
Top