OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: franco on January 19, 2018, 09:13:45 am

Title: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: franco on January 19, 2018, 09:13:45 am
Hello everyone,

The question has been asked a number of times: "... but how can we upgrade to 18.1-RC2?"

Well, the answer up to now has been you don't unless you really know what you are doing. :)

With 17.7.12 more update glue and extensive QA was done to make sure the upgrade experience is not so bad, though the decision has been to not enable upgrade paths for the 17.7.x track just yet.

However, the development version can be upgraded and switched back to the release version if that is what you are looking for.

It follows 4 simple steps in 17.7.12 with OpenSSL with a physical or virtual console in front of you. If you own a VM, snapshots are cool.

1. From the console switch to the development version.

# opnsense-update -t opnsense-devel

2. Then via console option 12, type "18.1.r2" and hit enter to invoke the major upgrade. Your system will fetch all updates and reboot 3 times.

3. If the system is ready do another upgrade from the GUI which will move you to the release version "18.1.r2". The GUI is now aware of the release type that you want to use. The default is "Production". The other option is "Development" in case you need it as it is the GUI equivalent of step 1 above.

4. After "18.1.r2" is installed apply two patches from the console to ensure alias consistency after boot. These two patches[1][2] will be in the final 18.1 update.

# opnsense-patch bba40c97 947718b

So that's it... As soon as 18.1 is out you will be able to upgrade to it and 18.1.x subsequently. If you have any questions please let us know.



Cheers,
Franco

--
[1] https://github.com/opnsense/core/commit/bba40c97
[2] https://github.com/opnsense/core/commit/947718b
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: Floppsi1 on January 20, 2018, 01:38:33 pm
Hello Franco,

I have one question. I have 17.7.11 + FreeBSD 11.1.
I did use instruction from another post here for 18.1
# opnsense-update -bkgr 18.1.b -n "snapshots\/beta"
# opnsense-update -L
# /usr/local/etc/rc.reboot

What’s the best way to switch to the 18.1r2 or the official release 18.1.
First unlock the update again and than downgrade to 17.7.12 and that the upgrade?

Sorry for this perhaps obvious question.

Thanks. Floppsi
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: franco on January 20, 2018, 02:24:03 pm
Hi Floppsi,

You don't have to do anything other than what was written:

The major upgrade will ignore your beta version and unlock it in order to do a full upgrade. :)

Once you are on "18.1.r2" all you have to do is wait for 18.1 to be released and all updates will be 18.1, 18.1, etc. as usual.


Cheers,
Franco
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: interfaSys on January 23, 2018, 09:28:52 am
I was on 18.1.b + 17.7.11 and the upgrade process described above doesn't work.

System did not reboot a single time.

Code: [Select]
Kernel locked at 18.1.b-amd64, skipping.
Base locked at 18.1.b-amd64, skipping.


1 patch didn't apply cleanly.

Code: [Select]
# opnsense-patch bba40c97 947718b
...
|diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc
|index e93a9f4f6..cc6a08317 100644
|--- a/src/etc/inc/filter.inc
|+++ b/src/etc/inc/filter.inc
--------------------------
Patching file etc/inc/filter.inc using Plan A...
Reversed (or previously applied) patch detected!  Assuming -R.Hunk #1 succeeded at 510.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
...

Post was edited because I was missing a step.
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: franco on January 23, 2018, 09:38:59 am
Yes, if the patch did not apply it was not 18.1-RC2 package on top.


Cheers,
Franco
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: interfaSys on January 23, 2018, 09:45:06 am
I've followed the steps above, but it doesn't work. I've edited my message too many times.

Started with 18.1.b + 17.7.11.

After using option 12, I get:

Quote
Kernel locked at 18.1.b-amd64, skipping.
Base locked at 18.1.b-amd64, skipping.

Console says I'm on 18.1.r_82. Not sure if it's the same as R2 or if it's still b1

No reboots were performed.

GUI says my current version is "N/A" and that I can upgrade to 17.7.12.

So it seems the upgrade process is missing some steps.
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: interfaSys on January 23, 2018, 09:48:03 am
Re-read the instructions...

Missed this: type "18.1.r2"

So, it's my fault, but I find the interactive menu confusing. When reading it, I thought it was asking me if I wanted to update to 18.1.r2 and so I pressed "y".

Seems to be downloading base + kernel now, so it should work :)
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: franco on January 23, 2018, 09:48:21 am
So in step 12, it says "[18.1.r2/y/N]". If it doesn't you can't upgrade. I'm not sure why but it looks solvable.

If you see that prompt, type "18.1.r2" (without quotes) and hit enter.


Cheers,
Franco
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: franco on January 23, 2018, 09:48:53 am
Yay, awesome. :)
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: interfaSys on January 23, 2018, 09:58:31 am
Post reboots, the console tells me I'm on r66 and the GUI still says my version is NA, but I can upgrade to 18.1.r2.

Is this the normal behaviour?
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: interfaSys on January 23, 2018, 12:48:42 pm
OK, so the last step is to upgrade via the GUI.

1. console:

Code: [Select]
select 8
# opnsense-update -t opnsense-devel
# exit

2. console

Code: [Select]
select 12
type "18.1.r2" and hit enter

3. GUI

Check for update and upgrade to 18.1.r2

4. console

Code: [Select]
select 8
# opnsense-patch bba40c97 947718b
Title: Re: 17.7.12 to 18.1-RC2 in half a breeze (the trickier part of a breeze)
Post by: franco on January 23, 2018, 04:51:11 pm
Yes, that behaviour is expected.

The development GUI package is called "opnsense-devel" and when you want to install the release version it's "opnsense", so it tells you it's not yet installed. This is consistent with how pkg handles such cases.


Cheers,
Franco