Solved 14.3-RELEASE upgrade to 15.0-RELEASE fails - no network problem

I wanted to upgrade a 14.3-RELEASE-p2 system to 15.0-RELEASE but encountered a problem.

I followed the traditional upgrading method using 'freebsd-update' using the instructions here - see Upgrading using "FreeBSD Update":
https://www.freebsd.org/releases/15.0R/installation/

All went well until I had to reboot the first time, as after rebooting I had no working network - I use the Realtek RTL8125 driver: net/realtek-re-kmod198.

Without a working network I was unable to proceed with the installation.

As I have invested a lot of time into this 14.3 system configuration, I would like to be able to update to 15.0 without doing a full reinstall. Is this possible?

Any ideas what I can do next?
 
I wanted to upgrade a 14.3-RELEASE-p2 system to 15.0-RELEASE but encountered a problem.

I followed the traditional upgrading method using 'freebsd-update' using the instructions here - see Upgrading using "FreeBSD Update":
https://www.freebsd.org/releases/15.0R/installation/

All went well until I had to reboot the first time, as after rebooting I had no working network - I use the Realtek RTL8125 driver: net/realtek-re-kmod198.

Without a working network I was unable to proceed with the installation.

As I have invested a lot of time into this 14.3 system configuration, I would like to be able to update to 15.0 without doing a full reinstall. Is this possible?

Any ideas what I can do next?
Is your system UFS or ZFS based?
If ZFS:
reboot into the 14.3 boot environment; if you've been following standard practice the BE named "default" is probably the 15.0 so you want the one "before that" (check timestamps).
After booting into use the bectl command to create a new BE name it something like 15.0-RELEASE-p0, use bectl to mount it
Then you can do freebsd-update and pkg commands into this new BE (they both have chroot options).

At the end you should wind up with a fully coherent 15.0 BE, the pkg upgrade -f command into that BE should wind up pulling in the appropriate package for the realtek hardware.

More exact steps are around on the forums, may take a bit to hit the correct search terms, but a combination of ZFS Boot Environments Upgrade should get you close.
One method by vermaden is here:
 
If you have a second computer, the FreeBSD ports tree, and a USB stick (not with exfat - you won't be able to mount it without updated packages…):

  1. change to the directory of the realtek-re-kmod198 port
  2. execute "make"; without network an error will occur as it tries to fetch the source code - but this will tell you the URL of the source that matches the port…; you will also find out the name of the downloaded source as it is expected in the distfile directory (filenames may differ)
  3. on the second computer, retrieve the source and copy it to a USB stick
  4. on the target computer, copy the source to /usr/ports/distfiles/ with the desired file name
  5. the next call to "make" now uses the existing source from the distfile directory, and a "make reinstall" updates the unusable 14 package; reboot and be happy ;)
That's how I upgraded from 14.3 to 15.0; I also had to re-install all packages with "pkg clean -a && pkg upgrade -f" afterwards.

…for such cases it would be nice to be able to get a link to the binary packages again. Sometimes you can guess them, but in case of "realtek-re-kmod" I tried in vain.
 
Is your system UFS or ZFS based?
If ZFS:
reboot into the 14.3 boot environment; if you've been following standard practice the BE named "default" is probably the 15.0 so you want the one "before that" (check timestamps).
After booting into use the bectl command to create a new BE name it something like 15.0-RELEASE-p0, use bectl to mount it
Then you can do freebsd-update and pkg commands into this new BE (they both have chroot options).

At the end you should wind up with a fully coherent 15.0 BE, the pkg upgrade -f command into that BE should wind up pulling in the appropriate package for the realtek hardware.

More exact steps are around on the forums, may take a bit to hit the correct search terms, but a combination of ZFS Boot Environments Upgrade should get you close.
One method by vermaden is here:
Thank you.

Yes, I'm using ZFS.

Re this method to update - you mean like detailed under "Example: Testing an OS Upgrade" shown here?:
https://klarasystems.com/articles/managing-boot-environments/

When I attempted the update last night, like you said, the update created one or two 15.0 BE's but I have now deleted those. However, the update also first updated the system from 14.3-RELEASE-p2 to 14.3-RELEASE-p6 so have made this "-p6" BE the active BE and will create a new BE from that before trying to update further to 15.0 as shown in the link above.

I will take a look at vermaden's link too.
 
If you have a second computer, the FreeBSD ports tree, and a USB stick (not with exfat - you won't be able to mount it without updated packages…):

  1. change to the directory of the realtek-re-kmod198 port
  2. execute "make"; without network an error will occur as it tries to fetch the source code - but this will tell you the URL of the source that matches the port…; you will also find out the name of the downloaded source as it is expected in the distfile directory (filenames may differ)
  3. on the second computer, retrieve the source and copy it to a USB stick
  4. on the target computer, copy the source to /usr/ports/distfiles/ with the desired file name
  5. the next call to "make" now uses the existing source from the distfile directory, and a "make reinstall" updates the unusable 14 package; reboot and be happy ;)
That's how I upgraded from 14.3 to 15.0; I also had to re-install all packages with "pkg clean -a && pkg upgrade -f" afterwards.

…for such cases it would be nice to be able to get a link to the binary packages again. Sometimes you can guess them, but in case of "realtek-re-kmod" I tried in vain.
Thanks for this explanation.

I will first try the 'standard' way that mer mentioned, as detailed in the klara systems link and if it doesn't work then I will give this a try. 👍
 
You can simply comment out what you have in /boot/loader.conf about realtek-re-kmod and let the base driver does the job until you upgrade all your ports/packages to 15.0-RELEASE. Then, when realtek-re-kmod has been upgraded, you can reactivate it.
 
Thank you.

Yes, I'm using ZFS.

Re this method to update - you mean like detailed under "Example: Testing an OS Upgrade" shown here?:
https://klarasystems.com/articles/managing-boot-environments/

When I attempted the update last night, like you said, the update created one or two 15.0 BE's but I have now deleted those. However, the update also first updated the system from 14.3-RELEASE-p2 to 14.3-RELEASE-p6 so have made this "-p6" BE the active BE and will create a new BE from that before trying to update further to 15.0 as shown in the link above.

I will take a look at vermaden's link too.
Yes the klarasystems method is also viable.
 
Verify that have actually the latest patch aplied in your running 14.3-RELEASE BE, it should be p6. On my system I have:
Code:
[1-0] # freebsd-version -kru
14.3-RELEASE-p5
14.3-RELEASE-p5
14.3-RELEASE-p6
You should have updated to the latest patch, as is mentioned in FreeBSD 15.0-RELEASE Release Notes.

I assume you are running on a amd64 architecture, verify by using uname -p.

As to your realtek driver, when running in the p6 14.3-RELEASE (BE) environment , you can try downloading the appropriate realtek versions for 15.0-RELEASE to an appropriate user directory:
Rich (BB code):
[1-0] # pkg -o 'OSVERSION=1500068' -o 'ABI=FreeBSD:15:amd64' fetch -r FreeBSD -o ./ realtek-re-kmod
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
FreeBSD is up to date.
The following packages will be fetched:

New packages to be FETCHED:
        realtek-re-kmod: 1101.00.1500068 (157 KiB: 100.00% of the 157 KiB to download)

Number of packages to be fetched: 1

157 KiB to be downloaded.

Proceed with fetching packages? [y/N]: y
Fetching realtek-re-kmod-1101.00.1500068~aeee46fb8f.pkg: 100%  157 KiB 160.6kB/s    00:01
[2-0] # pkg -o 'OSVERSION=1500068' -o 'ABI=FreeBSD:15:amd64' fetch -r FreeBSD -o ./ realtek-re-kmod198
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
FreeBSD is up to date.
The following packages will be fetched:

New packages to be FETCHED:
        realtek-re-kmod198: 198.00.1500068 (102 KiB: 100.00% of the 102 KiB to download)

Number of packages to be fetched: 1

102 KiB to be downloaded.

Proceed with fetching packages? [y/N]: y
Fetching realtek-re-kmod198-198.00.1500068~21236f904c.pkg: 100%  102 KiB 104.7kB/s    00:01
[3-0] # ls -l All/Hashed/
total 265
-rw-r--r--  1 root eric 160623 Dec  4 19:51 realtek-re-kmod-1101.00.1500068~aeee46fb8f.pkg
-rw-r--r--  1 root eric 104690 Dec  5 00:50 realtek-re-kmod198-198.00.1500068~21236f904c.pkg
[4-0] #

Upgrade to 15.0-RELEASE and use pkg-add(8) by specifying the appropriate file from the <relpath>/All/Hashed/ directory to install either:
  • realtek-re-kmod
    or
  • realtek-re-kmod198
Activate/verify the appropriate settings for the installed realtek driver, then reboot; after that I expect you'll have a working internet connection.

EDIT: Note that the specifc downloaded packages shown are from latest, when you have your packages on your 14.3-RELEASE configured to use quarterly the actual file names may be different.
 
Verify that have actually the latest patch aplied in your running 14.3-RELEASE BE, it should be p6. On my system I have:
Code:
[1-0] # freebsd-version -kru
14.3-RELEASE-p5
14.3-RELEASE-p5
14.3-RELEASE-p6
You should have updated to the latest patch, as is mentioned in FreeBSD 15.0-RELEASE Release Notes.

I assume you are running on a amd64 architecture, verify by using uname -p.

As to your realtek driver, when running in the p6 14.3-RELEASE (BE) environment , you can try downloading the appropriate realtek versions for 15.0-RELEASE to an appropriate user directory:
Rich (BB code):
[1-0] # pkg -o 'OSVERSION=1500068' -o 'ABI=FreeBSD:15:amd64' fetch -r FreeBSD -o ./ realtek-re-kmod
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
FreeBSD is up to date.
The following packages will be fetched:

New packages to be FETCHED:
        realtek-re-kmod: 1101.00.1500068 (157 KiB: 100.00% of the 157 KiB to download)

Number of packages to be fetched: 1

157 KiB to be downloaded.

Proceed with fetching packages? [y/N]: y
Fetching realtek-re-kmod-1101.00.1500068~aeee46fb8f.pkg: 100%  157 KiB 160.6kB/s    00:01
[2-0] # pkg -o 'OSVERSION=1500068' -o 'ABI=FreeBSD:15:amd64' fetch -r FreeBSD -o ./ realtek-re-kmod198
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
FreeBSD is up to date.
The following packages will be fetched:

New packages to be FETCHED:
        realtek-re-kmod198: 198.00.1500068 (102 KiB: 100.00% of the 102 KiB to download)

Number of packages to be fetched: 1

102 KiB to be downloaded.

Proceed with fetching packages? [y/N]: y
Fetching realtek-re-kmod198-198.00.1500068~21236f904c.pkg: 100%  102 KiB 104.7kB/s    00:01
[3-0] # ls -l All/Hashed/
total 265
-rw-r--r--  1 root eric 160623 Dec  4 19:51 realtek-re-kmod-1101.00.1500068~aeee46fb8f.pkg
-rw-r--r--  1 root eric 104690 Dec  5 00:50 realtek-re-kmod198-198.00.1500068~21236f904c.pkg
[4-0] #

Upgrade to 15.0-RELEASE and use pkg-add(8) by specifying the appropriate file from the <relpath>/All/Hashed/ directory to install either:
  • realtek-re-kmod
    or
  • realtek-re-kmod198
Activate/verify the appropriate settings for the installed realtek driver, then reboot; after that I expect you'll have a working internet connection.

EDIT: Note that the specifc downloaded packages shown are from latest, when you have your packages on your 14.3-RELEASE configured to use quarterly the actual file names may be different.

Yes I have the latest patch from when I attempted to install 15.0-RELEASE:
Code:
# freebsd-version -kru
14.3-RELEASE-p5
14.3-RELEASE-p5
14.3-RELEASE-p6

Yes AMD architecture:
Code:
# uname -p
amd64

Freebsd-update created the BE from my attempt to update to 15.0:
Code:
# bectl list
BE                                Active Mountpoint Space Created
14.3-RELEASE-p2-20251005          -      -          1.12G 2025-10-05 01:12
14.3-RELEASE-p2_2025-12-06_014806 -      -          128M  2025-12-06 01:48
14.3-RELEASE-p6_2025-12-06_020126 -      -          2.25M 2025-12-06 02:01
14.3-RELEASE-p6_2025-12-06_144500 NR     /          33.8G 2025-12-06 14:47

I will download the realtek-re-kmod198 driver package as you suggest. Thanks for the detailed instructions!

One last thing, in your example above when downloading the 2 driver packages, it reports:

"pkg: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended"

Is this something that needs doing too?

Also, as there are some differences (e.g. chroot) in the 2 links I was considering using for the update to 15.0-RELEASE, do you happen to know which is more likely to work?

This:
https://klarasystems.com/articles/managing-boot-environments/ - see the section Example: 'Testing an OS Upgrade'

or this?:
https://vermaden.wordpress.com/2021/02/23/upgrade-freebsd-with-zfs-boot-environments/
 
One last thing, in your example above when downloading the 2 driver packages, it reports:

"pkg: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended"

Is this something that needs doing too?
No, AFAIK, that is the result of using the appropriate 15.0-RELEASE settings in the two arguments for the -o options while your current OS and pkg conf settings use your 14.3-RELEASE environment. You can most likely suppress these by adding -o 'IGNORE_OSVERSION=true'; however, under these circumstances I find it helpful as a reminder to get these warnings.

As to the two articles, I like both sources, however, I haven't recently practised with these procedures. IIRC the Klara article prepares a complete new BE in a temporary place and then 'transforms/makes' that into a BE for the next boot into the upgraded OS environment. As I remember, the main advantage of this is that you prepare a complete OS upgrade in-waiting and can choose running the actual upgraded OS at a time of your choosing; also diminishes the number of system reboots in an OS upgrade process as, in preparation, you can also choose to upgrade all your packages; one should be able to upgrade everything with only one (re)boot (Edit: just saw: also in the vermaden article).

You have the availability of ZFS BEs, if appropriate use the boot once feature. For some more 'BE' links, you may find Boot Environment & snapshot - important ZFS features helpful (contains klara articles links).
 
Update:

I have now managed to upgrade my 14.3-RELEASE system to 15.0-RELEASE and have networking with the realtek-re-kmod198 driver working for the Realtek RTL8125 network device.
I kept a log and have attached it for anyone in a similar situation, as I think it should help.

TL;DR:
I used 2 ZFS Boot Environments to achieve this:
14.3 BE: as this had working internet, this BE was used to do the updating for the 15.0 system - see notes to see how this was achieved if interested.
The main problem with updating to 15.0 using the published notes using the traditional freebsd-update method, was that after booting into the 15.0 system I had no working internet so was unable to continue with the final update instructions.

Thanks to all of you who helped out with this - especially mer who deserves a medal for his patience in helping a newbie get this working! :)
 

Attachments

was that after booting into the 15.0 system I had no working internet so was unable to continue with the final update instructions.
Doesn't need internet access at that stage though, everything is already downloaded during the freebsd-update -r <version> upgrade stage and saved in /var/db/freebsd-update/. The only problem you may encounter at this point is the realtek kernel module failing to load or, if it does load, crash the kernel. But you could just disable the module to get the system booted and continue the upgrade process without network access (although if you do the upgrade remotely that might be a bit of a problem). The two/three freebsd-update install stages don't require network access.
 
Doesn't need internet access at that stage though, everything is already downloaded during the freebsd-update -r <version> upgrade stage and saved in /var/db/freebsd-update/. The only problem you may encounter at this point is the realtek kernel module failing to load or, if it does load, crash the kernel. But you could just disable the module to get the system booted and continue the upgrade process without network access (although if you do the upgrade remotely that might be a bit of a problem). The two/three freebsd-update install stages don't require network access.
I wish I had kept the logs but it seemed to be trying to fetch something and of course failed due to no network.
Also when I tried to build the network driver it seemed to be missing some files in /usr/ports/distfiles (see the attachment). I don't know why.
Anyway it's working now and I am pleased.

Next issue to deal with - identify the reason for the kernel panic on boot when enabling the amdgpu (drm-kmod) driver - looks like missing firmware but not 100% sure - will create new post for that issue.
 
I wish I had kept the logs but it seemed to be trying to fetch something and of course failed due to no network.
After the second freebsd-update install you're supposed to update your installed ports/packages, that would certainly require network access.

Neat little trick to remember; env ABI=FreeBSD:15:amd64 pkg fetch realtek-re-kmod198 would fetch the correct package for 15 regardless of the version you're currently running. So do this before starting the upgrade, and save that package somewhere safe. Then you can use it to update the driver, restore network access, and finish off upgrading the ports/packages.

Next issue to deal with - identify the reason for the kernel panic on boot when enabling the amdgpu (drm-kmod) driver - looks like missing firmware but not 100% sure - will create new post for that issue.
Probably the same reason the Realtek module failed, it might be a version that was built for 14. It's a kernel module, it needs to match the kernel's version exactly.
 
After the second freebsd-update install you're supposed to update your installed ports/packages, that would certainly require network access.

Neat little trick to remember; env ABI=FreeBSD:15:amd64 pkg fetch realtek-re-kmod198 would fetch the correct package for 15 regardless of the version you're currently running. So do this before starting the upgrade, and save that package somewhere safe. Then you can use it to update the driver, restore network access, and finish off upgrading the ports/packages.
Thanks for this useful tip.
I'm sure what I did to get it working was probably unnecessary and there was an easier way, but I'm still beginner level with FreeBSD so... I have a lot to learn still. 👍
 
Neat little trick to remember; env ABI=FreeBSD:15:amd64 pkg fetch realtek-re-kmod198 would fetch the correct package for 15 regardless of the version you're currently running.
That certainly is a neat trick; if one is using ZFS andf BEs, even better to know the trick.
 
After the second freebsd-update install you're supposed to update your installed ports/packages, that would certainly require network access.

Neat little trick to remember; env ABI=FreeBSD:15:amd64 pkg fetch realtek-re-kmod198 would fetch the correct package for 15 regardless of the version you're currently running. So do this before starting the upgrade, and save that package somewhere safe. Then you can use it to update the driver, restore network access, and finish off upgrading the ports/packages.


Probably the same reason the Realtek module failed, it might be a version that was built for 14. It's a kernel module, it needs to match the kernel's version exactly.
Re the kernel panic on boot for the drm-kmod/amdgpu driver I think you may well be right as when I looked at the version numbers they were showing 14.3 IIRC.
However when I tried to delete the driver/firmware packages and reinstall with newer versions from 'pkg install ...' or building from ports, it was trying to remove multiple packages and I got scared and aborted that idea. I will dig out my notes on this and make a new post.
 
Back
Top