Solved OSVERSION mismatch on a jail system.

Hello.
I try to upgrade a jail pkg system.

Bash:
root@six:/usr/home/sailorsamoor # pkg -j http upgrade
Updating FreeBSD repository catalogue...
[http] Fetching meta.conf: 100%    179 B   0.2kB/s    00:01  
[http] Fetching data.pkg: 100%   10 MiB   3.5MB/s    00:03  
Processing entries:   0%
Newer FreeBSD version for package ztrack:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1304000
- running userland: 1302001
Ignore the mismatch and continue? [y/N]:

Jail uname -a
Bash:
root@six:/usr/home/sailorsamoor # jexec http
root@http:/ # uname -a
FreeBSD http 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
root@http:/ #

Host uname -a
Bash:
root@six:/usr/home/sailorsamoor # uname -a
FreeBSD six 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
root@six:/usr/home/sailorsamoor #

What can I do?
 
Host freebsd version situation:
Bash:
root@six:/usr/home/sailorsamoor # freebsd-version -kru
14.2-RELEASE-p1
14.2-RELEASE-p1
14.2-RELEASE-p3
root@six:/usr/home/sailorsamoor #
 
You probably have a 13.2-RELEASE userland in this jail. You have to run freebsd-version inside this jail to see it.

The current repo for 13 is compiled for 13.4-RELEASE, hence the warning. You can ignore it, that will be fine.

That said, unless you're obliged to stick to 13.2-RELEASE for this jail, it's better to upgrade it to 13.4 or 14.2 if possible.
 
That's from host or from the jail?
That's from the jail.
You probably have a 13.2-RELEASE userland in this jail. You have to run freebsd-version inside this jail to see it.

The current repo for 13 is compiled for 13.4-RELEASE, hence the warning. You can ignore it, that will be fine.

That said, unless you're obliged to stick to 13.2-RELEASE for this jail, it's better to upgrade it to 13.4 or 14.2 if possible.
Yes, probably that is it:

Bash:
root@six:/usr/home/sailorsamoor # pkg -j http update
Updating FreeBSD repository catalogue...
[http] Fetching meta.conf: 100%    179 B   0.2kB/s    00:01   
[http] Fetching data.pkg: 100%   10 MiB   3.5MB/s    00:03   
Processing entries:   0%
Newer FreeBSD version for package ztrack:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1304000
- running userland: 1302001
Ignore the mismatch and continue? [y/N]: n
pkg: repository FreeBSD contains packages for wrong OS version: FreeBSD:13:amd64
Processing entries:   0%
Unable to update repository FreeBSD
Error updating repositories!
root@six:/usr/home/sailorsamoor # pkg -j http update
But how can I fix it? I see that inside the jail:
Bash:
FreeBSD http 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
root@http:/ # freebsd-version -kru
freebsd-version: unable to locate kernel
root@http:/ #
 
At the end.
I cleared host pkg cache
pkg clean
freebsd-update -b /usr/home/jails/http --currently-running 13.2-RELEASE -r 14.2-RELEASE upgrade
pkg-static -j http upgrade -f
And agreed to ignore one error.

Looks like it works.
 
It seems to have been resolved.

The userland version reported by pkg is the one in /usr/bin/uname, so replacing that should have worked.
fetch https://download.freebsd.org/ftp/releases/amd64/13.4-RELEASE/base.txz
tar xzf base.txz ./usr/bin/uname
and replace this with /usr/bin/uname of jail.

pkg.conf(5)
Code:
ABI: string
Default: derived based on ABI_FILE.
ABI_FILE: string
Default: /usr/bin/uname, or if not found, /bin/sh.
elfdump -a /usr/bin/uname | grep FREEBSD_ABI
 
Back
Top