Upgrading 13.2 -> 14.0 from source is not successful

bectl list -c creation

As a last resort (although I'll be more interested in eventual diagnosis): do you have a boot environment that precedes the attempted upgrade?
 
bectl list -c creation

As a last resort (although I'll be more interested in eventual diagnosis): do you have a boot environment that precedes the attempted upgrade?
There are several boot environments:
Code:
BE                                 Active   Mountpoint  Space Created
default                             NR        /         428G  2021-02-27 09:56
13.2-RELEASE-p4_2023-10-25_080740   -        -          68.8G 2023-10-25 08:07
13.2-RELEASE-p4_2023-11-09_111135   -        -          22.8G 2023-11-09 11:11
13.2-RELEASE-p5_2023-11-19_223438   -        -          50.6G 2023-11-19 22:34
 
FreeBSD 13.2-RELEASE-p3 FreeBSD 13.2-RELEASE-p3 GENERIC amd64 1302001 1400097
I have this -

Code:
# uname -aKU
FreeBSD Testsystem 14.0-RELEASE-p1 FreeBSD 14.0-RELEASE-p1 #6 305be1f36: Fri Dec  1 19:59:54 EET 2023     root@Testsystem:/usr/obj/usr/src/amd64.amd64/sys/RHODIUM amd64 1400097 1400097

You are booting wrong kernel or have not actually installed it.
 
What about update to 13-stable first? I pulled the latest 13-stable branch and updated to it from 13.0-RELEASE. Finally updated to 14.0-RELEASE from source successfully.
 
What about update to 13-stable first? I pulled the latest 13-stable branch and updated to it from 13.0-RELEASE. Finally updated to 14.0-RELEASE from source successfully.
Would be happy to, but none of the network drivers are being loaded due to mentioned errors while booting.
 
I have this -

Code:
# uname -aKU
FreeBSD Testsystem 14.0-RELEASE-p1 FreeBSD 14.0-RELEASE-p1 #6 305be1f36: Fri Dec  1 19:59:54 EET 2023     root@Testsystem:/usr/obj/usr/src/amd64.amd64/sys/RHODIUM amd64 1400097 1400097

You are booting wrong kernel or have not actually installed it.
so how do I install / boot the right kernel if installkernel and installworld aren't able to do this?
 
so how do I install / boot the right kernel if installkernel and installworld aren't able to do this?
Check if the kernel you just built is the same you are booting. I would remove all these boot environments, however these seem to be not active.

make installkernel KERNCONF=xxx

Again and check if the kernel built is actually installed in the /boot/kernel/kernel
In my case

Code:
# ls -l /boot/kernel/kernel
-r-xr-xr-x  1 root wheel 26288888 Dec  1 20:00 /boot/kernel/kernel*
 
Check if the kernel you just built is the same you are booting. I would remove all these boot environments, however these seem to be not active.

make installkernel KERNCONF=xxx

Again and check if the kernel built is actually installed in the /boot/kernel/kernel
In my case

Code:
# ls -l /boot/kernel/kernel
-r-xr-xr-x  1 root wheel 26288888 Dec  1 20:00 /boot/kernel/kernel*
So I did:
# make installkernel KERNCONF=GENERIC
>>> Installing kernel GENERIC completed on Sun Dec 3 13:24:22 CET 2023


When doing ls -l /boot/kernel/kern* I get:

-r-xr-xr-x 1 root wheel 27003712 Dec 2 14:19 /boot/kernel/kernel


So I still have the old generic kernel installed (compiled yesterday), but then I'm not sure if I explicitely mention GENERIC to KERNCONF it makes any difference. I haven't tried compiling and installing a custom kernel (thus with different kernel config name).
 
Does the usb driver works? You can copy the /usr/src from another pc.
USB drive seems to work.
So the idea is to:
  1. Get the source of 13.2-RELEASE onto another machine
  2. Copy it to a USB-drive
  3. Attach the USB-drive with 13.2-RELEASE source to the non-functioning machine and copy the source tree
  4. Compile and install world and kernel of 13.2-RELEASE
  5. See if it works
  6. Pull 14.0-RELEASE and try to build kernel and world again
Is that what you're suggesting?

Edit: I can of course try binary update to 14.0-RELEASE once confirmed that 13.2-RELEASE compiles and installs ok.
 
USB drive seems to work.
So the idea is to:
  1. Get the source of 13.2-RELEASE onto another machine
  2. Copy it to a USB-drive
  3. Attach the USB-drive with 13.2-RELEASE source to the non-functioning machine and copy the source tree
  4. Compile and install world and kernel of 13.2-RELEASE
  5. See if it works
  6. Pull 14.0-RELEASE and try to build kernel and world again
Is that what you're suggesting?
What I did is:
1. Get the /usr/src of 13-STABLE branch via git from another machine. gzip it as src13-stable.tar.gz.
2. Copy it to a USB-drive, mount as msdosfs.
3. rm the old /usr/src first. Attach the USB-drive with src13-stable.tar.gz to the non-functioning machine and ungzip the source tree.
4. Compile and install world and kernel of 13-STABLE.
5. See if it works
6. Pull 14.0-RELEASE and try to build kernel and world again

Yeah, you can try binary update. But I had no luck with that, the downloading process after patched spent too much time. Maybe it was a network problem.
 
mount

zfs list -o canmount,mountpoint

What's listed?



Have you ever had a separate /boot partition?



Why not a release engineering branch?
Output of zfs list -o canmount,mountpoint is:
IMG_0112.jpg


Output of mount is:
IMG_0113.jpg



I cannot state for certain that I had a separate boot partition. Normally I stick to the defaults of the installation. Having said that I cannot exclude that the separate boot partition existed...
 
So just an update on the situation. As suggested by CanvisMe in one of the posts above I copied the 13.2-RELEASE source and recompiled / installed everything from scratch. No problems encountered. After that I tried to install 14.0-RELEASE as a binary update from 13.2-RELEASE. Here I encountered the same issues as in this thread (long install during 2nd freebsd-update install):

But eventually the update finished. Unfortunately this didn't help as I still experience the problems described at the start of this thread. Basically I'm at the same point now as when I started this thread.
 
Let's review (yes, some of this is repetitive):

freebsd-version -kru ; uname -aKU

bectl list -c creation

grep -v \# /etc/freebsd-update.conf | sort | uniq

ls -hln /var/db/freebsd-update
freebsd-version -kru:
Code:
14.0-RELEASE-p2
13.2-RELEASE-p3
14.0-RELEASE-p2

uname -aKU:
Code:
FreeBSD <hostname> 13.2-RELEASE-p3 FreeBSD 13.2-RELEASE-p3 GENERIC amd64 1302001 1400097

bectl list -c creation:
20231210_150247_HDR.jpg

grep -v \# /etc/freebsd-update.conf | sort | uniq:
IMG_0117.jpg


ls -hln /var/db/freebsd-update:
IMG_0118.jpg
 
Try:
  1. activate a boot environment that does not have a 14.0⋯ kernel or userland
  2. shutdown -r now
  3. remove the contents of /var/db/freebsd-update (not the directory itself)
  4. freebsd-update fetch
  5. the usual commands to complete a minor update then the major upgrade.
Keep a careful note of the name of your chosen boot environment, because default will no longer be the default.
 
Tried to set boot environment to one of the BE's of 14.0-RELEASE from the previous post with # bectl activate -t <name_of_the_BE>. "T" flag appears next to it after that, but during the next boot the regular 13.2-RELEASE is booted.
 
Don't activate temporarily, activate.

Postscripts:

Tried to set boot environment to one of the BE's of 14.0-RELEASE

I think, that's the opposite of step 1.

If you want to not update any environment that is not named default, you can use the clone feature of bectl.

 
Don't activate temporarily, activate.
Why not? Why would that matter? I don't want to finish with a brick after all. From what I understand if the system isn't able to boot with the new BE I can shut it down and the next time it starts will be with the working "BE" (changes rolled back).
 
Back
Top