Solved upgraded kernel from 14.3 to 15.0

Removed /usr/obj did git checkout releng/15.0 ..

make -j21 buildkernel buildworld (kernconf is defined in make.conf), once compiled I did make -j21 installkernel kernel booted, no issue mergemaster -iU and after make -j21 installworld, pkg bootstrap -f, pkg upgrade, yes | make delete-old && yes | make delete-old-libs rebooted everything worked fine but then i noticed i forgot to update /usr/src and i compiled freebsd15.0p3 so i wanted to recompile but then i noticed this.

Code:
root@azkaban:/usr/src # make buildworld buildkernel
make[1]: /usr/src/Makefile.inc1:362: SYSTEM_COMPILER: Determined that CC=cc matches the source tree.  Not bootstrapping a cross-compiler.
make[1]: /usr/src/Makefile.inc1:367: SYSTEM_LINKER: Determined that LD=ld matches the source tree.  Not bootstrapping a cross-linker.
--------------------------------------------------------------
>>> World build started on Sun Apr 12 17:02:52 CEST 2026
--------------------------------------------------------------
>>> Deleting stale files in build tree...
ld-elf.so.1: Shared object "libutil.so.9" not found, required by "env"
        0.00 real         0.00 user         0.00 sys
*** Error code 1
Stop.
make[1]: stopped making "buildworld" in /usr/src
*** Error code 1
Stop.
make: stopped making "buildworld buildkernel" in /usr/src
 
etcupdate(8) requires preparation on its first use "before any upgrades are done" to obtain baseline to compare with upgraded. For me, etcupdate extract -B. Then etcupdate -p BEFORE make installworld, followed by etcupdate -B afterwards. Dry-run with -n option is adviced before doing actual updates.

See etcupdate(8) man page for details.
 
Regarding etcupdate(8), basically I follow the recommendation in UPDATING:
Code:
COMMON ITEMS:
        ...
  
        To rebuild everything and install it on the current system.
        -----------------------------------------------------------
        # Note: sometimes if you are running current you gotta do more than
        # is listed here if you are upgrading from a really old current.

        <make sure you have good level 0 dumps>         [2]
        make buildworld
        <make sure any needed PORTS_MODULES are set>    [1]
        make buildkernel KERNCONF=YOUR_KERNEL_HERE
        make installkernel KERNCONF=YOUR_KERNEL_HERE
        <reboot in single user>                         [3]
        etcupdate -p                                    [5]
        make installworld
        etcupdate -B                                    [4]
        make delete-old                                 [6]

I don't do in-place update/upgrade but create a ZFS boot environment, mount the be, install there.

This is my personal build/install procedure:
Code:
 # cd /usr/src-15.0
 # env  -i  make -j <ncpu> buildworld  buildkernel

 # bectl create -r <be_name>
 # bectl mount <be_name>  /mnt

 # make installkernel  DESTDIR=/mnt

 # etcupdate -s /usr/src-15.0  -D /mnt  -p
 # etcupdate resolve  -s  /usr/src-15.0  -D  /mnt

 # make installworld DESTDIR=/mnt

 # etcupdate -s /usr/src-15.0  -D  /mnt  -B

 # yes | make delete-old  DESTDIR=/mnt
 # yes | make delete-old-libs  DESTDIR=/mnt
 # yes | make delete-old-dirs  DESTDIR=/mnt
 
Back
Top