FreeBSD 9.3 -> 12.0 upgrade

Reaperzx

Member

Thanks: 1
Messages: 43

#1
Hello

I have a FreeBSD 9.3 home server, that has been frozen for couple of years, but now I consider upgrading. I am still a bit reluctant to do that, since everything is running fine, just as I need, but eventually I should upgrade it anyway. I have upgraded couple of less important machines 11.2->12.0 and after some trouble everything seems working.

One thing I have not tested - is Virtualbox running on 12.0 in bridged mode? I have several virtual machines running on this machine.

Hardware is Intel Core i5-3570 CPU and Areca ARC-1220 RAID

Or should I wait for 12.1?

From what I understand, I should do all those upgrades in order:
9.3->10.3->10.4->11.2->12.0
https://www.freebsd.org/releases/10.3R/installation.html#upgrade-binary
https://www.freebsd.org/releases/10.4R/installation.html#upgrade-binary
https://www.freebsd.org/releases/11.2R/installation.html#upgrade-binary
https://www.freebsd.org/releases/12.0R/installation.html#upgrade-binary

I plan not to recompile ports in between, because that would take forever. Only after final upgrade to 12.0.

My plan is to upgrade and then freeze again for 2 years.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,774
Messages: 28,526

#4
From what I understand, I should do all those upgrades in order:
9.3->10.3->10.4->11.2->12.0
No, you should be able to go to 12.0 in one go. No need for the intermediate versions. Just make sure you have at least 9.3-RELEASE-p45.

But I agree with VladiBG it's probably better to do a fresh install. Not only will it be faster it's also less error-prone. You may also have issues with the old partitioning scheme, partitions may not be big enough.
 
OP
OP
R

Reaperzx

Member

Thanks: 1
Messages: 43

#5
I have moved disks several times. This machine started as FreeBSD 6.2. Currently running FreeBSD 9.3-RELEASE-p9.

I have already moved to one system partition:
Code:
Filesystem                Size    Used   Avail Capacity  Mounted on
/dev/mirror/systeems1a    102G     41G     52G    44%    /
devfs                     1,0k    1,0k      0B   100%    /dev
/dev/da0p1                 16T    9,5T    6,5T    59%    /usr/home
/dev/md0                   14G    456k     13G     0%    /tmp
linprocfs                 4,0k    4,0k      0B   100%    /compat/linux/proc
devfs                     1,0k    1,0k      0B   100%    /var/named/dev
9.3 to 12.0 in one go? Are you sure? Because manual says only 11.2 can go to 12.0 "Systems running 11.2-RELEASE can upgrade as follows"
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,774
Messages: 28,526

#6
Currently running FreeBSD 9.3-RELEASE-p9.
Make sure you have at least 9.3-RELEASE-p45. There was a bug in freebsd-update(8) that prevented upgrades to 11.x. I presume that same bug will also pop up when trying to update to 12 (that didn't exist at the time the bug was discovered). This bug is also more or less proof you can upgrade and skip several intermediate major and minor versions.
https://www.freebsd.org/security/advisories/FreeBSD-EN-16:09.freebsd-update.asc

Because manual says only 11.2 can go to 12.0
No, it doesn't state only systems running 11.2 can upgrade to 12.0. The text simply assumes you're running the previous version. As far as I know you can go back as far as 8.x and still use freebsd-update(8) to get to the latest version in one go.

In any case, with upgrading there's always a certain amount of risk involved. So whichever path you take, make sure you have good backups.
 

olli@

Active Member
Developer

Thanks: 125
Messages: 142

#7
Make sure you have at least 9.3-RELEASE-p45. There was a bug in freebsd-update(8) that prevented upgrades to 11.x.
Maybe he confuses freebsd-update(8) with source-level updates (a.k.a. “make world”). The latter is supported only from one major version to the next, indeed, so in this case you have to take all the steps 9 → 10 → 11 → 12 if you want to be sure.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,774
Messages: 28,526

#8
Maybe he confuses freebsd-update(8) with source-level updates (a.k.a. “make world”). The latter is supported only from one major version to the next, indeed, so in this case you have to take all the steps 9 → 10 → 11 → 12 if you want to be sure.
I'm fairly certain source upgrades are supported from any version to any other version, as long as you're moving forward (downgrades are not supported, neither are architectural changes; i.e. i386 -> amd64).

Whether or not it's smart to source upgrade an ancient 4.11 for example to 12.0 is certainly debatable. It's not something I would try or recommend doing in any case. If you have to make that big a jump you're certainly better off with a clean install.
 

olli@

Active Member
Developer

Thanks: 125
Messages: 142

#9
I'm fairly certain source upgrades are supported from any version to any other version, as long as you're moving forward (downgrades are not supported, neither are architectural changes; i.e. i386 -> amd64).
Well, you can skip major versions if you know what you're doing (and you're feeling lucky), but this is not “officially” supported.
From /usr/src/UPDATING:
Code:
When upgrading from one major version to another it is generally best to
upgrade to the latest code in the currently installed branch first, then
do an upgrade to the new branch. This is the best-tested upgrade path,
and has the highest probability of being successful.  Please try this
approach if you encounter problems with a major version upgrade. Since
the stable 4.x branch point, one has generally been able to upgrade from
anywhere in the most recent stable branch to head / current.
Changing from i386 to amd64 via source upgrade is not officially supported either, but it is possible (I've done it), although it's rather complex. It involves creating a temporary installation that you can boot (on a spare partition, or on your swap, or by temporarily breaking a gmirror). I think someone has made a detailed description on the FreeBSD Wiki.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,774
Messages: 28,526

#10
Well, you can skip major versions if you know what you're doing (and you're feeling lucky), but this is not “officially” supported.
We're getting into semantics here but it doesn't state it's only "officially" supported from the previous major version either. It states "from one major version to another", it doesn't state "from the previous major branch to the next" or something to that extent. It only suggests making sure you at least have the last updates for your current version.
 
OP
OP
R

Reaperzx

Member

Thanks: 1
Messages: 43

#11
I certainly meant binary upgrade, not build world.

I have done the 32bit->64bit switch too. Was bit pain, but don't remember exactly any more, was years ago.

Now running FreeBSD 9.3-RELEASE-p49 after update and restart. Bit strange, since it said before "updating to 9.3-RELEASE-p53"

Well, whichever it is, will continue.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,774
Messages: 28,526

#12
Now running FreeBSD 9.3-RELEASE-p49 after update and restart. Bit strange, since it said before "updating to 9.3-RELEASE-p53"
I haven't checked but it's possible patch 50 to 53 have been userland updates only. In that case the kernel isn't updated and will show a lower patch version. That's fine, the only difference is a version string.
 
OP
OP
R

Reaperzx

Member

Thanks: 1
Messages: 43

#13
Seems I have to wait until this bug gets fixed (mentioned also in other topics):
Code:
# freebsd-update upgrade -r 12.0-RELEASE
Looking up update.FreeBSD.org mirrors... none found.
Fetching metadata signature for 9.3-RELEASE from update.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic src/src world/base world/lib32

The following components of FreeBSD do not seem to be installed:
world/doc world/games

Does this look reasonable (y/n)? y

Fetching metadata signature for 12.0-RELEASE from update.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.

The update metadata is correctly signed, but
failed an integrity check.
Cowardly refusing to proceed any further.
 
Top