Upgrading 13.2 -> 14.0 from source is not successful

Hi all,
I've tried to upgrade the 13.2 version to 14.0 from source, following the instructions in the Handbook, specifically chapter 26 (https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld). The build of both the kernel and world goes as expected, no problem. The installkernel and installworld do not generate any errors, however when I boot, I still boot into 13.2 version. I of course followed all the steps in the handbook.

freebsd-version output gives 13.2 running kernel and 14.0 userland. During the boot i receive many messages of modules not being loaded.
Any ideas on how to resolve and additional info that might be useful?
 

sysctl kern.bootfile
kern.bootfile: /boot/kernel/kernel

freebsd-version -k
14.0-RELEASE

freebsd-version -r
13.2-RELEASE-p3
 
Are you sure you did clean build?
This means there's nothing under (by default) /usr/obj before start building.

An additional note:
If you want kernel build version to be kept monotonic, backing up and restore /usr/obj/usr/src/(arch)/sys/(kernconf)/version
(for amd64 and having kernel config file TEST, /usr/obj/usr/src/amd64.amd64/sys/TEST/version) alone is safe.
 
Are you sure you did clean build?
This means there's nothing under (by default) /usr/obj before start building.

An additional note:
If you want kernel build version to be kept monotonic, backing up and restore /usr/obj/usr/src/(arch)/sys/(kernconf)/version
(for amd64 and having kernel config file TEST, /usr/obj/usr/src/amd64.amd64/sys/TEST/version) alone is safe.
Hmm.. cannot state that for sure anymore. Will try another build now with clean /usr/obj. It's going to take a few hours.
 
Can you run this?

stat -x /boot/kernel/kernel

# stat -x /boot/kernel/kernel
File: "/boot/kernel/kernel"
Size: 27003712 FileType: Regular File
Mode: (0555/-r-xr-xr-x) Uid: (0/root) Gid: (0/wheel)
Device: 18446744072225358903.2113142846 Inode: 2556049 Links: 1
Access: Fri Dec 1 17:27:11 2023
Modify: Fri Dec 1 17:27:11 2023
Change: Fri Dec 1 21:01:30 2023
Birth: Fri Dec 1 17:27:11 2023
 
Forgot to mention why I've adviced the need to blank /usr/obj.

In /usr/obj, some remnants can remain on cleaning with usuak make clean, make cleandir (twice) and make cleandepend. Most notably, *.meta created at least with WITH_META_MODE= YES in /etc/src-env.conf.

I've cleaned up /usr/obj/ before start src upgrading from stable/13 to stable/14, so not be bitten this time, but if I recall correctly, I've been bitten by it in the past.

And possibly, chflags -R noschg /usr/obj/ would be neede before rm -rf /usr/obj/.
 
Hmm.. cannot state that for sure anymore. Will try another build now with clean /usr/obj. It's going to take a few hours.
Ready to report now that after cleaning /usr/obj, recompiling and reinstalling kernel and world, no change occured. Receiving same errors as previously.
 
Rebuilding/reinstalling doesn't look helpful as freebsd-version reports that /boot/kernel/kernel is correct version (extracted command: what -qs /boot/kernel/kernel | sed 's/^FreeBSD \([-.0-9A-Za-z]\{1,\}\) .*$/\1/'). The question is why kernel that boots is different :)

PS: can you post your loader.conf ?
That should be useful, yes.
 
backup /boot/loader.conf.
rm -vfR /boot
make installkernel
make installworld
etcupdate
restore loader.conf
PS: can you post your loader.conf ?
content of /boot/loader.conf
Code:
aesni_load="YES"
geom_eli_load="YES"
security.bsd.allow_destructive_dtrace=0
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
kern.vty="vt"
cuse_load="YES"
coretemp_load="YES"
boot_mute="YES"
snd_hda_load="YES"
accf_http_load="YES"
kern.ipc.semmni=40
kern.ipc.semmns=300

Doing the steps suggested as we "speak".
 
backup /boot/loader.conf.
rm -vfR /boot
make installkernel
make installworld
etcupdate
restore loader.conf
PS: can you post your loader.conf ?
So the situation hasn't changed after performing these steps.

Additional message that I keep receiving during the boot are:
Code:
KLD if_iwm.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/kernel/if_iwm.ko - unsupported file type.

That happens to many modules, the above is just an example of one of them.
 
Rebuilding/reinstalling doesn't look helpful as freebsd-version reports that /boot/kernel/kernel is correct version (extracted command: what -qs /boot/kernel/kernel | sed 's/^FreeBSD \([-.0-9A-Za-z]\{1,\}\) .*$/\1/'). The question is why kernel that boots is different :)


That should be useful, yes.
The command gives 14.0-RELEASE
 
That happens to many modules, the above is just an example of one of them.
Strange.
This CANNOT happen IF make installkernel proceeded properly.
In this process, /boot/kernel.old of its contents are deleted, /boot/kernel/ is rotated (moved) to /boot/kernel.old, and then newly built kernel and in-tree modules are installed under newly created /boot/kernel/.
If everything went sane, the condition can happenes only with modules installed using ports or pkgs, which are not yet built/installed using new src.
 
Hi all,
I've tried to upgrade the 13.2 version to 14.0 from source, following the instructions in the Handbook, specifically chapter 26 (https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld). The build of both the kernel and world goes as expected, no problem. The installkernel and installworld do not generate any errors, however when I boot, I still boot into 13.2 version. I of course followed all the steps in the handbook.

freebsd-version output gives 13.2 running kernel and 14.0 userland. During the boot i receive many messages of modules not being loaded.
Any ideas on how to resolve and additional info that might be useful?
This is strange. Just did it and everything is OK.

After installing kernel you should get something like this.

Code:
--------------------------------------------------------------
>>> Installing kernel RHODIUM completed on Fri Dec  1 20:06:30 EET 2023
--------------------------------------------------------------

Assume you deleted the old source code. Good way to do it is just destroy the dataset and create a new one:

Code:
# zfs create hdd_sys/usr/src.releng.14.0

# zfs set mountpoint=/usr/src hdd_sys/usr/src.releng.14.0

... and you are sure that you have 14.0 source code

Code:
# head /usr/src/RELNOTES
Release notes for FreeBSD 14.0.

This file describes new user-visible features, changes and updates relevant to
users of binary FreeBSD releases.  Each entry should describe the change in no
more than several sentences and should reference manual pages where an
interested user can find more information.  Entries should wrap after 80
columns.  Each entry should begin with one or more commit IDs on one line,
specified as a comma separated list and/or range, followed by a colon and a
newline.  Entries should be separated by a newline.
 
This is strange. Just did it and everything is OK.

After installing kernel you should get something like this.

Code:
--------------------------------------------------------------
>>> Installing kernel RHODIUM completed on Fri Dec  1 20:06:30 EET 2023
--------------------------------------------------------------

Assume you deleted the old source code. Good way to do it is just destroy the dataset and create a new one:

Code:
# zfs create hdd_sys/usr/src.releng.14.0

# zfs set mountpoint=/usr/src hdd_sys/usr/src.releng.14.0

... and you are sure that you have 14.0 source code

Code:
# head /usr/src/RELNOTES
Release notes for FreeBSD 14.0.

This file describes new user-visible features, changes and updates relevant to
users of binary FreeBSD releases.  Each entry should describe the change in no
more than several sentences and should reference manual pages where an
interested user can find more information.  Entries should wrap after 80
columns.  Each entry should begin with one or more commit IDs on one line,
specified as a comma separated list and/or range, followed by a colon and a
newline.  Entries should be separated by a newline.

Code:
# head /usr/src/RELNOTES
gives the same as what you show.

"Installing kernel completed" is also what I see and yes, I have deleted the old source code from /usr/src
 
Magic words not yet present in this topic:
  • reboot
  • restart
potzilov please, can you confirm that you restart the operating system whenever it's appropriate?

shutdown -r now would be good; reboot -r would not.
 
I always use shutdown -r now. So this case was no exception.
ls -ld /boot/k*

You should have and old kernel and new kernel with new date.
Also
grep kern /boot/loader.conf

Post it here. Check if you are booting the right kernel.

sysctl kern.bootfile
 
ls -ld /boot/k*

You should have and old kernel and new kernel with new date.
Also
grep kern /boot/loader.conf

Post it here. Check if you are booting the right kernel.

sysctl kern.bootfile

# ls -ld /boot/k*
drwxr-xr-x 2 root wheel 863 Dec 2 15:01 /boot/kernel

Old kernel was removed after one of the posts above.

grep kern /boot/loader.conf
see https://forums.FreeBSD.org/threads/...om-source-is-not-successful.91263/post-631558 in this thread.

# sysctl kern.bootfile
see https://forums.freebsd.org/threads/...om-source-is-not-successful.91263/post-631523
 
Back
Top