jails Jail with newer version (13.2) than host system (13.1)?

I am running a system with TrueNAS-13.0-U6.1, which currently is the most recent release. This is based on FreeBSD 13.1 (which is EOL):

Code:
# uname -a
FreeBSD storage.example.com 13.1-RELEASE-p9 FreeBSD 13.1-RELEASE-p9 n245429-296d095698e TRUENAS amd64

This is a bit of a shame (it tends to happen with TrueNAS that the latest version is running an EOL'd version of FreeBSD) because I cannot use
pkg in the jails.

I always was under the impression, also based on what I know from "FreeBSD Mastery, Jails", that the host system and the jails should (read: must?) be running the same version of FreeBSD (maybe differing in the patch level). This is because they share the same kernel (the one of the host system). So I assumed I have to wait for a TrueNAS upgrade to 13.2 before I could use pkg again.

Also, the handbook suggests at least, that the jails cannot be "newer" than the host:
To upgrade the jail to a new major or minor version, first upgrade the host system as described in Performing Major and Minor Version Upgrades. Once the host has been upgraded and rebooted, the jail can then be upgraded.

Now, looking at the TrueNAS GUI, it suggests I can create/install 13.2-RELEASE jails (or 12.4-RELEASE)... Also, there is a post in the TrueNAS forum that states (unfortunately without a reference to the source, emphasis is mine):

As long as you jails are of the same *major* version or lower than the host then you are fine.

Would/should this work? Running a 13.2 jail on a 13.1 host? It seems "strange" as the 13.2 jail would use the system's 13.1 kernel, no? If so, is it "usually working" or is it "supported"?

Then again, the handbook states something confusing in an info box in the section "Jail Upgrading":

It is necessary to execute the install step two times. The first one upgrades the kernel, and the second one upgrades the rest of the components.

How can the kernel in a jail be upgraded? There is no kernel...
Does it maybe just mean,
freebsd-update
is operating the same way in/outside with/without jails and "tries to upgrade the kernel first" (without actually being able to do so)?

To be honest, the reverse is also not 100% clear to me: how could a jail be on a lower version than the host? Although I can (better) imagine, that this can work (because everything is (backwards) ABI compatible).

I would appreciate any pointers to information or explanations that shed some light on this.
 
Would/should this work? Running a 13.2 jail on a 13.1 host?
No.
If so, is it "usually working" or is it "supported"?
Not supported. At all.
How can the kernel in a jail be upgraded?
You don't.
There is no kernel...
Exactly. A jail runs on the host's kernel. You therefor cannot run a newer version in a jail than the host system.

how could a jail be on a lower version than the host?
The GENERIC kernel has compatibility options set.

 
To be honest, the reverse is also not 100% clear to me: how could a jail be on a lower version than the host? Although I can (better) imagine, that this can work (because everything is (backwards) ABI compatible).
On the issue of supporting much older releases: in his Absolute FreeBSD (3rd Edition) at pages 580-581, Lucas relates a tale of woe in which he was asked to jail an application that would only run on FreeBSD 4.10. At the time, it had been more than ten years since 4.10 had been released, and running the jail on an up-to-date host, he found that some of the jail's userland programs wouldn't run because the kernel interfaces had diverged too much.
 
Thank you very much for the information, SirDice and samjenk! I am somewhat comforted, that I did not misunderstand everything, it seems.
Still, I wonder (even more) what happens, when I choose to install a 13.2 jail on my/a 13.1 TrueNAS...

But maybe that is rather a question for the TrueNAS forum.
 
Back
Top