Solved Upgrade to 15.1 Doesn't Proceed

I am following the official instructions for the upgrade to 15.1. pkg upgrade seems to think we are already up to date.

Code:
# pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
FreeBSD-base is up to date.
Checking for upgrades (218 candidates): 100%
Processing candidates (218 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
[root@l1 ~/system.notes]# freebsd-version -kru
15.0-RELEASE-p2
15.0-RELEASE-p2
15.0-RELEASE-p1
[root@l1 ~/system.notes]#

But 15.0 is obviously not 15.1. Seems like this should be trivially easy. Did I miss something?

I did deviate from the instructions in that I upgraded pkg itself before getting started. I had started looking at some older RC instructions before I happened upon the post release date instructions.
 
Don't you need to run freebsd-update to get freebsd-version -kru to the same levels first?

If you don't you are likely to encounter some problems sooner or later.

Once all at the same level you can proceed to upgrade to 15.1-RELEASE and then you can run pkg upgrade.
 
What is the output of pkg repos?
And the content of any file in /usr/local/etc/pkg/repos/?
And, as we are there, the content of /etc/pkg/FreeBSD.conf?
 
Balanga is right here, your safest bet is to use freebsd-update(8). The thing is... pkgbase is still in development (as also mentioned in the handbook) so... there might still be some quirks here and there. Not to mention that as far as I can tell freebsd-update will eventually also support pkgbase, so there's really no need for manual tinkering.
 
Balanga is right here, your safest bet is to use freebsd-update(8). The thing is... pkgbase is still in development (as also mentioned in the handbook) so... there might still be some quirks here and there. Not to mention that as far as I can tell freebsd-update will eventually also support pkgbase, so there's really no need for manual tinkering.
He uses pkgbase, freebsd-update should refuse to run. And if it run anyway, it will damage the system.
 
jcw
From the instructions page
Before upgrading to a new release, ensure the installed system is up to date
[root@l1 ~/system.notes]# freebsd-version -kru
15.0-RELEASE-p2
15.0-RELEASE-p2
15.0-RELEASE-p1
Your system has not been updated for a long time.
Don't know if it will help but it's a start.
In case it doesn't do anything, reinstall all packages pkg upgrade -f, then try again to upgrade to 15.1.

so there's really no need for manual tinkering
That's the thing with the actual form of pkgbase, it's a bit of tinkering this tinkering that. The user experience will be better with 16 and 17 for sure but for now it is what it is until freebsd-update comes to cover everything for us :)
 
  • Thanks
Reactions: jcw
Yes, OP used the commands to upgrade a pkgbase system, but as it says nothing is installed I'm doubtful it's actually a pkgbase installation.
I think that there is a problem with pkgbase conversion here. But, if pkgbase had been never used, pkg with -r FreeBSD-base had answered that this repo doesn't exist or something like that. Here, it's enabled.

Maybe, it's time to let the Op answer?
 
But, if pkgbase never used, pkg with -r FreeBSD-base had answered that this repo doesn't exist or something like that. Here, it's enabled.
You can enable it, even if you don't actually use it.

jcw what does pkg info -x FreeBSD show?
 
I do remember having a similar issue. I'm trying to remember what I did to fix it. I think SirDice gave me the answer but I can't find the thread. If I do, I'll put it here.
 
Ok, I mention it in this post. https://forums.freebsd.org/threads/good-news-today.102946/post-763983, but the post was more about Nvidia.
In my case, I had more than one machine, one updated properly the other didn't. The one that didn't had a /usr/local/etc/pkg/repos/FreeBSD-base.conf as well as /usr/local/etc/pkg/repos/FreeBSD.conf and that FreeBSD.conf had the line
Code:
FreeBSD-base: { enabled: yes }

Renaming the FreeBSD-base.conf file to conf.orig fixed the problem for me. So, if you do have two files in /usr/local/etc/pkg/repos and one is FreeBSD-base.conf, you can try removing or renaming it and seeing if that helps.
 
Thanks for the input folks. I'm on travel and will get back to this next week.

I did the pkg-base conversion when I upgraded to 15.0. At the time I thought that everything was perfect. I'll look at what is posted above real soon now.
 
But, if pkgbase had been never used, pkg with -r FreeBSD-base had answered that this repo doesn't exist or something like that. Here, it's enabled.
Tried pkg upgrade -r FreeBSD-base on a non pkgbase machine and conversly at what I said, there is no error; rather an output like you got.

The upgrade instructions have a simple test to check if you are on pkgbase or not:
pkg which /usr/bin/uname.
If it answers: "/usr/bin/uname was not found in the database". You definitively aren't under pkgbase.

You may believe you converted the system, but the script may have failed and you didn't notice it. By the way, how did you convert your system?

Also, as some have already said, you're far to be up-to-date for 15.0-RELEASE. This is the first thing to do before upgrade to 15.1.
 
Ok, I mention it in this post. https://forums.freebsd.org/threads/good-news-today.102946/post-763983, but the post was more about Nvidia.
In my case, I had more than one machine, one updated properly the other didn't. The one that didn't had a /usr/local/etc/pkg/repos/FreeBSD-base.conf as well as /usr/local/etc/pkg/repos/FreeBSD.conf and that FreeBSD.conf had the line
Code:
FreeBSD-base: { enabled: yes }

Renaming the FreeBSD-base.conf file to conf.orig fixed the problem for me. So, if you do have two files in /usr/local/etc/pkg/repos and one is FreeBSD-base.conf, you can try removing or renaming it and seeing if that helps.
Thanks. This had gotten me, too (just getting around to upgrading my 15.0 - 15.1). I think my root cause is an automation meant to disable the default FreeBSD Ports repos in favor of my Poudriere server in /usr/local/etc/pkg/repos that was overriding the settings in /etc/pkg/* and not understanding that there were default settings in /etc/pkg I could have used instead for pkgbase, rather than trying to fix it with an incorrect URL for FreeBSD-base. Still need to fix the automation, but at least now I know why it was causing problems :)
 
How did I convert the system? I don't remember. I followed some set of lengthy instructions and every thing seemed to work as expected.

BTW, kudos. This is the first time I've had any trouble at all on a major version change since the great a.out transition. And by trouble I mean, I have working system. Rough life, eh?

OK. Back at it. Some steps gleaned from above.

Code:
$ pkg which /usr/bin/uname
/usr/bin/uname was installed by package FreeBSD-runtime-15.0p1

FreeBSD-base: { enabled: yes }

# pkg upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
Fetching data: 100%    97 KiB  99.4 kB/s    00:01   
Processing entries:   0%
Newer FreeBSD version for package FreeBSD-zstd-lib32:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1501501
- running userland: 1500068
Ignore the mismatch and continue? [y/N]: y
Processing entries: 100%
FreeBSD-base repository update completed. 512 packages processed.
FreeBSD-base is up to date.
Checking for upgrades (218 candidates): 100%
Processing candidates (218 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

#  freebsd-version -kru
15.0-RELEASE-p2
15.0-RELEASE-p2
15.0-RELEASE-p1

It seems that the report that "Your packages are up to date" is not correct as 15.0 is at patch level p12. So it would seem my first order of business it to get to p12.

By a comment above, pkg which shows I've got uname at least installed by a package.

Did the first step "# pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base" cause something that I have to undo in order to fix the upgrade within 15.0?

Running '# pkg upgrade -f -r FreeBSD-base' as we speak based on gotnull's comment.

Based on the comments to upgrade 15.0 first, I gather we cannot upgrade from the "middle" of one minor version to the subsequent minor version with pkg-base. We have to upgrade minor versions all the way to the end of that minor version before we can move the next minor version. I don't recall ever caring where a minor version was in times past. Is that the correct understanding?
 
Rich (BB code):
   [...]
# pkg upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
Fetching data: 100%    97 KiB  99.4 kB/s    00:01   
Processing entries:   0%
Newer FreeBSD version for package FreeBSD-zstd-lib32:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1501501
- running userland: 1500068
   [...]
#  freebsd-version -kru
15.0-RELEASE-p2
15.0-RELEASE-p2
15.0-RELEASE-p1
In the process of unsuccessfully upgrading to 15.1-RELEASE, it looks like something of 15.1-RELEASE got mixed into your installed OS while the majority of packages/files are still of 15.0-RELEASE.

Please post the output of:
grep -EH '^[^#].*' /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/*.conf
pkg query '[%R] %n %v'| awk '$3=="15.1"'
pkg -v
 
You should first update and then upgrade and don't forget to rebuild these ports before rebooting after upgrading to 15.1 :


net/wifi-firmware-iwlwifi-kmod


graphics/gpu-firmware-radeon-kmod


graphics/gpu-firmware-intel-kmod


graphics/gpu-firmware-amd-kmod


graphics/drm-66-kmod


do :
freebsd-update fetch
and then
freebsd-update install
until it told you there is nothing to install and to return to fetch. When done do:
freebsd-update upgrade -r 15.1-RELEASE and then
freebsd-update install
and then rebuild those port mentioned above or if you use pkg do :
pkg update && pkg upgrade
and then
freebsd-update install
again until it told you to return to fetch. When all that is done input
reboot
and voila!
 
You should first update and then upgrade and don't forget to rebuild these ports before rebooting after upgrading to 15.1 :


net/wifi-firmware-iwlwifi-kmod


graphics/gpu-firmware-radeon-kmod


graphics/gpu-firmware-intel-kmod


graphics/gpu-firmware-amd-kmod


graphics/drm-66-kmod


do :
freebsd-update fetch
and then
freebsd-update install
until it told you there is nothing to install and to return to fetch. When done do:
freebsd-update upgrade -r 15.1-RELEASE and then
freebsd-update install
and then rebuild those port mentioned above and then
freebsd-update install
again until it told you to return to fetch. When all that is done input
reboot
and voila!
The system is under pkgbase. Use of freebsd-update is prohibited.
 
in that case I would reboot in a previous boot env before pkgbase was enabled if possible and then proceed like mentionned.
That is only possible* if two conditions are met:
  1. OP's system is a ZFS on root install
  2. OP explicitly created a boot environment before starting the upgrade, with an appropriate bectl(8) for example
OP has not mentioned either.

___
* Unfortunately, at the moment, pkg-upgrade(8) does not create a BE when upgrading a packaged based install.
 
gotnull's comment above used the -f switch on pkg-upgrade. That got me some forward progress. Then I had a boot problem due to self inflicted GSW with zfs.ko. Then I had kernel version problems with gpu modules. No big deal there. That's old hat now.

The only trouble I have now is that I overshot my intended version. This was probably because I was monkey-see-doing gotnull's command and omitted the -oOSVERSION=1501000 switch.

Code:
$ freebsd-version -kru
15.1-STABLE
15.1-STABLE
15.1-STABLE

FWIW, I was running zfs root. I had a boot environment before the upgrade which proved useful. I also had the old school "cp -rp kernel kernel.works" kernel which I had to use.

Here's an interesting observation though. I never did upgrade 15.0 from p1 to p12. A few of you said I would have to do that. It turns out that I didn't. I'm not throwing shade. I'm just documenting this for posterity.

I'm not sure what the original cause was. Some aspect of the upgrade from 14.X to 15.0 and pkg-basifying my system must have got messed up.

Thanks all. Everything above was food for thought. Even though I never figured out what as wrong, I'm up and running again.

Does anybody have any pointers to "audit" my pkg-base system to avoid future trouble? This is the first minor upgrade since pkg-base went prime time. I'm sure we've learned a couple things.
 
Back
Top