Error updating jail

Hi there,

Each time I install a package in jail I get the following message:

Code:
Newer FreeBSD version for package pkg:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1203000
- running kernel: 1201000
Ignore the mismatch and continue? [y/N]: y

Then I go ahead the update the jail:
Code:
sudo freebsd-update -b /usr/jails/myjail --currently-running 12.1-RELEASE -r 13.1-RELEASE upgrade

The I get the error (always):
Code:
fetch: http://update2.freebsd.org/12.1-RELEASE/amd64/t/a78662fabf48fd2503fb500d264ddfd8ff29c8a0a3caf85568df48e5b3a0d12f: Operation timed out
 
FreeBSD 12.1 is EOL since November 2019. Seems you get packages from the 12.3 repository, the only FreeBSD supported version of the 12 branch for the moment.

Your host is 12.1, isn't it? If it is, you have no choice but upgrade your host to 12.3-RELEASE or 13.1-RELEASE, then upgrade your jails accordingly.
 
Your host is 12.1, isn't it? If it is, you have no choice but upgrade your host to 12.3-RELEASE or 13.1-RELEASE, then upgrade your jails accordingly.

Going by the schedule, 12.4 is being built and should be available from ~ Monday 5th. If it was me, I'd wait till then.

 
FreeBSD 12.1 is EOL since November 2019. Seems you get packages from the 12.3 repository, the only FreeBSD supported version of the 12 branch for the moment.

Your host is 12.1, isn't it? If it is, you have no choice but upgrade your host to 12.3-RELEASE or 13.1-RELEASE, then upgrade your jails accordingly.

The host has been upgraded to 13.1-RELEASE, I am upgrading the jails to the current version host. But uname -r in jail shows '13.1-RELEASE' which is confusing.
 
I run the following to upgrade the base jail
Code:
sudo ezjail-admin update -U -s 12.1-RELEASE

In the end it throws errors:

Code:
....
/boot/kernel/vmd.ko
/boot/kernel/xb360gp.ko
/boot/kernel/xdr.ko
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
src component not installed, skipped
Installing updates...mtree: /usr/jails/newjail//boot/kernel: No such file or directory
cd: /usr/jails/newjail//boot/kernel: No such file or directory
install: /usr/jails/newjail//boot/kernel/backlight.ko: No such file or directory
install: /usr/jails/newjail//boot/kernel/cp2112.ko: No such file or directory
install: /usr/jails/newjail//boot/kernel/ftwd.ko: No such file or directory
...

Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.
src component not installed, skipped
Installing updates...pwd_mkdb: /usr/jails/newjail/etc/master.passwd: No such file or directory
cap_mkdb: file argument: No such file or directory
 done.
src component not installed, skipped
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
 
It's normal that there are some errors concerning the kernel (and some others with ezjail).
The update / upgrade process with ezjail isn't very easy. I got several headaches with that.

I will see tonight in my own jails. Maybe in the meantime someone will find a solution for you.
 
Eventually, the following two commands get the basejail upgrade done:

Code:
sudo ezjail-admin update -u
sudo ezjail-admin install

But the docs says -u is for 'Update the basejail to the latest patched release of the version of FreeBSD on the host', while I am upgrading from 12.1-release to 13.1-release. And I did try the version according to 'Now use this information to perform the upgrade from 9.3-RELEASE to the current version of the host system:'

Code:
ezjail-admin update -U -s 12.1-RELEASE

with error posted above.
 
I didn't see anything wrong in your commands. And yes, -u is for patching. I think that somehow patching the basejail wrote the right kernel version in a file.

I was wondering how pkg determines the kernel version but hadn't time to dig in the code. Perhaps it uses freebsd-version().
 
Back
Top