migrating jails from FreeNAS 9 to 11

Status
Not open for further replies.

birnbacs

Cadet
Joined
Jul 26, 2018
Messages
5
After upgrading FreeNAS from 9 to 11.1 my existing jail ("gollum") seems to have a version problem:

Code:
root@gollum:/usr/ports/graphics/pecl-imagick # portmaster install
make: "/usr/ports/Mk/bsd.port.mk" line 1211: UNAME_r (11.1-STABLE) and OSVERSION (1003000) do not agree on major version number.
make: "/usr/ports/Mk/bsd.port.mk" line 1211: UNAME_r (11.1-STABLE) and OSVERSION (1003000) do not agree on major version number.

===>>> The value of DISTDIR cannot be empty
===>>> Aborting update


I created a new jail ("lami") with FreeNAS UI. In this one I can work with ports no problem.
(I understand that graphic jail management has changed in FreeNAS 11 (warden vs. whatever) and that I am restricted to the shell for older jail management, which is fine with me)

freebsd-version indicates that the host system and both jails run different versions of freebsd:
FreeNAS: 11.1-STABLE
gollum: 10.3-RELEASE
lami: 11.0-RELEASE-p1


Question: how I can update FreeBSD in gollum to a version I can work with, i.e. 11.0-RELEASE-p1 ?

Updating FreeBSD the usual way did not work:
Code:
freebsd-update upgrade -r 11.0-RELEASE-p1
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching public key from update4.freebsd.org... failed.
Fetching public key from update5.freebsd.org... failed.
No mirrors remaining, giving up.
 
Last edited:

birnbacs

Cadet
Joined
Jul 26, 2018
Messages
5
https://www.freebsd.org/releases/ states that anything up to and including 11.0 is EOL and 11.1 / 11.2 are current production releases.
Ports will only work with *-RELEASE versions, so neither of the indicated FreeBSD versions should work.

To make the confusion perfect: I have another "old" jail (from FreeNAS 9 times) called pepsi which I never used. It reports FreeBSD version 11.0-RELEASE-p1 but fails on using the ports collection:
Code:
root@pepsi:/usr/ports/ports-mgmt/portmaster # make install clean
===> Building/installing dialog4ports as it is required for the config dialog
===>  Cleaning for dialog4ports-0.1.6
/!\ ERROR: /!\

Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.
...


Pepsi and gollum report the same OS version, but pepsi has a 'fake' one while lami has a 'good' one?

I am quite reluctant to rebuild gollum as a FreeNAS 11 jail as it runs a production service.
 

birnbacs

Cadet
Joined
Jul 26, 2018
Messages
5
More surprises: I analysed the initial error message and tried to figure out wether it was safe to manually set one of the two version numbers. It appears that both the OSVERSION 1003000 and the FreeBSD version 11.1-RELEASE were never officially assigned. 1003000 stands for 10.3.

What is used as OSVERSION is defined as __FreeBSD_version in /usr/include/sys.h, l. 61; the list of versions was found in https://www.freebsd.org/doc/en/books/porters-handbook/versions-11.html.


Heelp pleeease!
 

birnbacs

Cadet
Joined
Jul 26, 2018
Messages
5
OK, in case anybody has the same problem:

You can't.

FreeNAS appears to run a customized, non-official FreeBSD version. The version number of FreeNAS is not the same as FreeBSD's. freebsd-upgrade does not work because FreeBSD's upgrade server does not host the customized versions and FreeNAS does not run a download server. Upgrading as described is not supported. Manual upgrade may be possible but will probably result in problems.

For a real OS upgrade you must start over and create a new jail with the OS version you prefer and re-install everything in it. The future of jails suport in FreeNAS seems uncertain. You may want to consider running a VM instead.
 
D

dlavigne

Guest
The issue is the ABI change from version 9 (based on FreeBSD 10) to version 11 (based on FreeBSD 11). The recommendation when moving between major FreeBSD version (eg from 10 to 11 and in the future to 12) is to reinstall any jails and their apps to ensure there aren't any ABI mismatches. It would be ditto for VMs with BSD installed.
 
Status
Not open for further replies.
Top