Upgrading jail

sompi

New Member


Messages: 8

Hello, need help with upgrading jail, i don't have ezjail.
My host system is 11.4 (world and kernel), my jails system is 11.4 kernel and 11.2 world, i want to upgrade world to 11.4.
I stoped jail and made
Code:
freebsd-update -b /usr/local/jails/first --currently-running 11.2-RELEASE -r 11.4-RELEASE upgrade
the result is on the screenshot
1.png

It supose to be more files no? So how to update world at jail ?
I tried
Code:
freebsd-update -b /usr/local/jails/first --currently-running 11.2-RELEASE -r 11.4-RELEASE install
but got error
Code:
src component not installed, skipped
Installing updates...mtree: /usr/local/jails/first//boot/kernel: No such file or directory
cd: /usr/local/jails/first//boot/kernel: No such file or directory
install: /usr/local/jails/first//boot/kernel/amdgpio.ko: No such file or directory
install: /usr/local/jails/first//boot/kernel/ccr.ko: No such file or directory
install: /usr/local/jails/first//boot/kernel/if_qlnxev.ko: No such file or directory
install: /usr/local/jails/first//boot/kernel/mlxfw.ko: No such file or directory
install: /usr/local/jails/first//boot/kernel/xz.ko: No such file or directory

Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.
With command
Code:
freebsd-update -b /usr/local/jails/first install
i got
Code:
src component not installed, skipped
Installing updates... done.
But world is still 11.2, i know there is a way with "installworld" and "mergemaster" but can i make it with freebsd-update?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,085
Messages: 33,642

Run the install three times in a row. The first run only updates the kernel (which a jail doesn't have), the second run updates world, the third run does some clean up of old files.
 
OP
S

sompi

New Member


Messages: 8

Run the install three times in a row. The first run only updates the kernel (which a jail doesn't have), the second run updates world, the third run does some clean up of old files.
You mean freebsd-update -b /usr/local/jails/ftp install ? it's not helping, i made it
Hmm maybe it's because when i'm doing "upgrade" command to jail

1.png


It says that only kernel/generic installed at jail, so it trying upgrade only it, why's that?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,085
Messages: 33,642

I think you messed things up somewhere. You can spend a lot of time trying to fix it but it's going to be easier to just create a new jail (with 11.4) and migrate the data from the old to the new jail.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,085
Messages: 33,642

No, that would actually not be safer. Every upgrade has a certain risk, things could always break of course. But by talking the 'long' route you run that risk with every upgrade step, instead of just once.
 
OP
S

sompi

New Member


Messages: 8

I think you messed things up somewhere. You can spend a lot of time trying to fix it but it's going to be easier to just create a new jail (with 11.4) and migrate the data from the old to the new jail.
Interesting, what the easiest way to migrate data from one jail to another? If there is an easy way i will use it.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,085
Messages: 33,642

Interesting, what the easiest way to migrate data from one jail to another?
I'm assuming you set it up originally. So I would hope you have documented what you installed and how it was configured. If you haven't documented it, now would be a good time to do so. Just look at what's installed on the old one and install what you need in the new jail. Then look at the data your application stored and copy that too.
 

zomar

New Member

Reaction score: 1
Messages: 10

I'm using separate /etc/freebsd-update-jail.conf

with:
...
# Components of the base system which should be kept updated.
Components world
...
And then:
freebsd-update -b JAIL_PATH -f /etc/freebsd-update-jail.conf --currently-running JAIL_VERSION -r JAIL_TARGET_RELEASE upgrade
Jail has nothing to do with "Components kernel" and in my case with "Components src" as well.
 
Top