SOLVED FreeNAS 11.3-BETA 1 - How to update jails from 11.2 to 11.3-RELEASE

Oriann

Explorer
Joined
Dec 15, 2018
Messages
84
Guys, serious question here...

I got now up and running 11.3 beta 1 BUT how to update jails that are still 11.2-patchlevel whatever?
When using pkg update it shows me now kernel mismatch and ask me if I want to IGNORE_OSVVERSION=yes

Found command iocage upgrade -r 11.3-RELEASE jailname, made snapshot for sure and after jails migration to newer version I cannot do iocage console jail1 any more because no login is valid and therefore no password too. Does this command works or it is broken ? Or does somebody worked out this ? Only functional command to get into jail is jexec 9 tcsh but after entering iocage it show this:

unknown@jailname:/ #

And no command works as expected or with errors.
Here are the docs from where I have used info and code: https://iocage.readthedocs.io/en/latest/advanced-use.html
 
Last edited:

Oriann

Explorer
Joined
Dec 15, 2018
Messages
84
SOLVED !
  1. Update jails you wanna upgrade to latest patchlevel - iocage update jailname
  2. Make sure you have a snapshot of currently functional jail - GUI > Storage > Pools > dataset > iocage> jails > click menu on your jail > Create snapshot
  3. SSH to you freenas box and call this command: iocage upgrade -r 11.3-RELEASE jailname
  4. Now spoiler part for every question

Here answer YES
Code:
The following components of FreeBSD seem to be installed:
world/base world/doc world/lib32

The following components of FreeBSD do not seem to be installed:
world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)? y


Here copy everything from /etc/freebsd-update.conf to vi editor and save/close
Code:
The following file could not be merged automatically: /etc/freebsd-update.conf
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/group
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/hosts
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/master.passwd
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/passwd
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/pkg/FreeBSD.conf
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Now 6th times answer YES when bsd asks if this does look reasonable it will confirm changes.

And finally iocage console jail1 and test pkg update && pkg upgrade

Voila....

Of course after every upgrade check if everything works for you, if not then roll back with snapshot we created earlier.
 
Last edited:

endcycle

Dabbler
Joined
Sep 7, 2018
Messages
13
So to upgrade... I have to go into the contents of each file, copy and paste from there into a vi window.... oy. Is this something that's going to get resolved eventually in a freenas patch?
 

Oriann

Explorer
Joined
Dec 15, 2018
Messages
84
So to upgrade... I have to go into the contents of each file, copy and paste from there into a vi window.... oy. Is this something that's going to get resolved eventually in a freenas patch?
Sadly this is only workaround I have found by myself, nobody responded with better solution so this is it for now.
I hope too that somebody will come with better idea how to upgrade, but as far as I know, once somebody from freenas group see this, they will say that best solution is to build up a new jail with new release :D
 

mow4cash

Contributor
Joined
Jan 20, 2017
Messages
132
Sadly this is only workaround I have found by myself, nobody responded with better solution so this is it for now.
I hope too that somebody will come with better idea how to upgrade, but as far as I know, once somebody from freenas group see this, they will say that best solution is to build up a new jail with new release :D
Does FreeNAS require you to make a new jail to upgrade or is this a bug not letting you upgrade?
 

Oriann

Explorer
Joined
Dec 15, 2018
Messages
84
Does FreeNAS require you to make a new jail to upgrade or is this a bug not letting you upgrade?
No FreeNAS does not want from me to build a new jail to upgrade, no this is not bug I suppose but a missing feature.
GUI jail update let you update just patchlevel so its possible to update oficially from 11.2-p5 to 11.2-p15 BUT its not possible to update from 11.2-p15 to 11.3-p3 for example.
Does it make sense ? :D
 

endcycle

Dabbler
Joined
Sep 7, 2018
Messages
13
Makes sense, it's just a huge pain in the neck for those of us who aren't versed in vi besides using :q! to quit and then apt install nano and never look at vi again. :)

for this, for example:
"Here copy everything from /etc/freebsd-update.conf to vi editor and save/close "

Well, let's see. I'll hop onto my linux laptop and ssh into the server, then use less to read the file and then highlight everything to copy everything out of that file in the old jail to clipboard and paste it into a text editor, then flip to the other terminal and figure out how to paste from the clipboard and.... well, vi is alien.

If there's an easier way to do it, I'm all ears. Any advice? :)
 

Oriann

Explorer
Joined
Dec 15, 2018
Messages
84
Makes sense, it's just a huge pain in the neck for those of us who aren't versed in vi besides using :q! to quit and then apt install nano and never look at vi again. :)

for this, for example:
"Here copy everything from /etc/freebsd-update.conf to vi editor and save/close "

Well, let's see. I'll hop onto my linux laptop and ssh into the server, then use less to read the file and then highlight everything to copy everything out of that file in the old jail to clipboard and paste it into a text editor, then flip to the other terminal and figure out how to paste from the clipboard and.... well, vi is alien.

If there's an easier way to do it, I'm all ears. Any advice? :)
I am using MobaXterm as SSH client and from SFTP panel I can just open the file, copy code and then click middle button in vi to paste.
OR there is one more help, install nano and before you start upgrading just call command setenv EDITOR nano, then the upgrade process should call nano editor rather than vi.
Try and report...
 

endcycle

Dabbler
Joined
Sep 7, 2018
Messages
13
I am using MobaXterm as SSH client and from SFTP panel I can just open the file, copy code and then click middle button in vi to paste.
OR there is one more help, install nano and before you start upgrading just call command setenv EDITOR nano, then the upgrade process should call nano editor rather than vi.
Try and report...

oh, that's a killer idea. didn't even think about setting the editor to nano. Will do in a bit!
 

endcycle

Dabbler
Joined
Sep 7, 2018
Messages
13
Update - yeah, that works. Thanks for the suggestion. Wound up just using vi anyway. Copy / paste in a standard terminal window with an ssh session worked a lot better than putty for the connection, too.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
I'm still on FreeNAS 11.2-U7 but I've just tried to create a new jail on the 11.3 release and surprisingly it worked. I used the new jail to test with Transmission and it's running fine as far as I can tell. I thought it was not possible to do a 11.3 jail on a 11.2 FreeNAS system.

When I do an iocage fetch and select 11.3 I do get a error saying it cannot fetch because the host system is still on 11.2. But then I tried it via the FreeNAS webinteface and during the creation process I selected 11.3 to see if it would work and it did.

Any comments on this? See below for proof.

1575125385862.png


This is the content of my iocage/downloads folder

1575125569045.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I thought it was not possible to do a 11.3 jail on a 11.2 FreeNAS system
That was a feature/change made in the last updates and is already in the 11.3 beta also (I think it may even be possible to have jail version 12 on a FreeNAS 11.3 at some point).
 

Oriann

Explorer
Joined
Dec 15, 2018
Messages
84
I'm still on FreeNAS 11.2-U7 but I've just tried to create a new jail on the 11.3 release and surprisingly it worked. I used the new jail to test with Transmission and it's running fine as far as I can tell. I thought it was not possible to do a 11.3 jail on a 11.2 FreeNAS system.

When I do an iocage fetch and select 11.3 I do get a error saying it cannot fetch because the host system is still on 11.2. But then I tried it via the FreeNAS webinteface and during the creation process I selected 11.3 to see if it would work and it did.

Any comments on this? See below for proof.

View attachment 34256

This is the content of my iocage/downloads folder

View attachment 34257
Wow..now thats interesting :D I have not been so lucky as you because everytime this ended with error when I was last on 11.2-U6/7
About that you cannot make 11.3 jail on 11.2 system, devs said that they are backporting a lot of things, I have mixed feeling about that but I think some backport allowed this and now its possible to have newer jail BSD than on host. My opinion that its absolutely normal when you wanna test new version before upgrading.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I've updated to 11.2-U7 and have successfully upgraded an iocage jail running 11.2-RELEASE-p6 to 11.3-RELEASE-p5! It was only running emby, although it shouldn't make any difference. Once upgraded, I also managed to update the packages inside the jail without any of the EOL warning I'm getting with the 11.2-p6 jails.

Upgrading does take a little time though (40-50 minutes), and I have another 8 to do!
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
I didn't upgrade my existing jails, I created new ones. I have a separate dataset for the confguration directory of my jail applications such as Transmission, Radarr... so for me it's very simple. Created a new jail, installed the application and then mounted the configuration directory and put in the correct variables in rc.conf. I kept my old jails intact in case it wouldn't work and create a snapshop of the configuration directory before beginning.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
I finished "upgrading" all my jails to 11.3-RELEASE and haven't encountered any issues. As said I didn't upgrade the jails themselves but rather I created a fresh new jail for each on. Because I have a separate dataset for all of the configuration directors of the applications listed below it wasn't too difficult. I was worried most about Plex and I even assigned new IP addresses to each jail to find out of that would be difficult to change also but it wasn't. I just did a final check of all the various log files and couldn't find any errors.

Happy so far!

Previously I had Plex, Radarr, Sonarr and Transmission installed through the plugin system but I switched to all manual jails.

1575708197383.png
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I think it may even be possible to have jail version 12 on a FreeNAS 11.3 at some point
That won't be possible since 12 uses a newer kernel than 11.3. 11.2 and 11.3 share the same kernel and that's why it's possible to run 11.3 jails on FreeNAS 11.2U-7.
As said I didn't upgrade the jails themselves but rather I created a fresh new jail for each on
That's a lot of unnecessary work. I just want to point that out for anyone who happens across this thread so they don't think that this is the way you have to do this. An in place upgrade of your jails from 11.2 to 11.3 is simple and works fine.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Well, I eventually upgraded all mine, bar one which I'd been struggling to update from 11.1 to 11.2. It's still there as I'm running an active survey, but once that's finished it will be deleted as I've already created a new 'survey' jail. It takes a little time but is such an improvement on the previous warden jails that were locked in the version you created them in.

Screen Shot 2019-12-07 at 09.56.08.jpg
 

ByteNick

Explorer
Joined
Jan 24, 2015
Messages
98
SOLVED !
  1. Update jails you wanna upgrade to latest patchlevel - iocage update [B]jailname[/B]
  2. Make sure you have a snapshot of currently functional jail - GUI > Storage > Pools > dataset > iocage> jails > click menu on your jail > Create snapshot
  3. SSH to you freenas box and call this command: iocage upgrade -r 11.3-RELEASE jailname
  4. Now spoiler part for every question

Here answer YES
Code:
The following components of FreeBSD seem to be installed:
world/base world/doc world/lib32

The following components of FreeBSD do not seem to be installed:
world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)? y


Here copy everything from /etc/freebsd-update.conf to vi editor and save/close
Code:
The following file could not be merged automatically: /etc/freebsd-update.conf
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/group
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/hosts
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/master.passwd
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/passwd
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Same as above
Code:
The following file could not be merged automatically: /etc/pkg/FreeBSD.conf
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...


Now 6th times answer YES when bsd asks if this does look reasonable it will confirm changes.

And finally iocage console jail1 and test pkg update && pkg upgrade

Voila....

Of course after every upgrade check if everything works for you, if not then roll back with snapshot we created earlier.

For me the iocage upgrade -r 11.3-RELEASE jailname works just fine, without prompts, even though it displays the message:

Code:
The following components of FreeBSD do not seem to be installed:
world/base-dbg world/lib32-dbg


Does it mean the upgrade is somehow incomplete?

Please advise.
 

Mickey B

Dabbler
Joined
Oct 16, 2016
Messages
19
Adding a question to the thread: I have just deleted 11.2 release p9 and installed 11.3 release p5. Do i install plex for instance from the plugins tab? The current version available is 1.18.2.2129. While i am glad to be moving forward, it seems like plex breaks every update and i am so tired of trying to figure out what to do. Can someone confirm?
 
Top