Upgrade FreeBSD 10 && Jails - very confused :(

Hi everyone,

I'm the lucky owner of FreeBSD 10.0-RELEASE and as always I have a problem with upgrade FreeBSD host system and jails. I'm little confused.

First of all maybe show how can I upgrade.
Code:
freebsd-update fetch install
I have created jails by bsdinstall jail /path/to/jail
Code:
Upgrade jails
# svnlite co svn://svn.freebsd.org/base/releng/10.0 /usr/src
# svnlite update
# make buildworld
# make installworld DESTDIR=/jails/Oksymoron
# make installworld DESTDIR=/jails/Mysql
# mergemaster -i -C -D /jails/Oksymoron
# mergemaster -i -C -D /jails/Mysql
Done.

When I logged I wrote freebsd-update fetch install and got:
Code:
root@mysql:/ # freebsd-update fetch install
Looking up update.FreeBSD.org mirrors... 5 mirrors found.
Fetching public key from update5.freebsd.org... done.
Fetching metadata signature for 10.0-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 14 files... done.

The following files will be updated as part of updating to 10.0-RELEASE-p1:
/bin/freebsd-version
/lib/libcrypto.so.7
/rescue/chown
/rescue/chroot
/rescue/clri
/rescue/fsck
/rescue/fsck_4.2bsd
/rescue/fsck_ffs
/rescue/fsck_msdosfs
/rescue/fsck_ufs
/rescue/fsdb
/rescue/zfs
/rescue/zpool
/usr/lib/libcrypto.a
/usr/lib/libcrypto_p.a
/usr/lib/libssl.a
/usr/lib/libssl.so.7
/usr/lib/libssl_p.a
/usr/lib32/libcrypto.a
/usr/lib32/libcrypto.so.7
/usr/lib32/libcrypto_p.a
/usr/lib32/libssl.a
/usr/lib32/libssl.so.7
/usr/lib32/libssl_p.a
Installing updates...
The same action with second jail.

So it means that my jails wasn't upgraded ? I'm confused with upgrade FreeBSD.
This command is really need it? What for?
Code:
mergemaster -i -C -D /jails/Oksymoron

When it shows on screen:
Code:
root@ks3360102:/usr/src # mergemaster -i -C -D /jails/Oksymoron

*** The directory specified for the temporary root environment,
    /var/tmp/temproot, exists.  This can be a security risk if untrusted
    users have access to the system.

  Use 'd' to delete the old /var/tmp/temproot and continue
  Use 't' to select a new temporary root directory
  Use 'e' to exit mergemaster

  Default is to use /var/tmp/temproot as is

How should I deal with this? [Use the existing /var/tmp/temproot]
What should I choose? I don't want to change anything.

Is there any easier way to upgrade host and jail with sources?

Help someone :(
Greetz
 
bryn1u said:
Upgrade jails
Code:
# make installworld DESTDIR=/jails/Oksymoron
# make installworld DESTDIR=/jails/Oksymoron
# mergemaster -i -C -D /jails/Oksymoron
# mergemaster -i -C -D /jails/Oksymoron
Why are you doing everything twice?

And use either the source upgrade/update or use freebsd-update(8), not both.
 
Do not use freebsd-update(8) on jails that you have already upgraded with a make buildworld installworld, mergemaster cycle. The two different upgrade methods are not aware of each other in any way and you'll only create a mess if you use both.
 
SirDice said:
bryn1u said:
Upgrade jails
Code:
# make installworld DESTDIR=/jails/Oksymoron
# make installworld DESTDIR=/jails/Oksymoron
# mergemaster -i -C -D /jails/Oksymoron
# mergemaster -i -C -D /jails/Oksymoron

Why are you doing everything twice?
Ehhh my mistake.

I mean:
Code:
# make installworld DESTDIR=/jails/Oksymoron
# make installworld DESTDIR=/jails/Mysql
# mergemaster -i -C -D /jails/Oksymoron
# mergemaster -i -C -D /jails/Mysql

kpa said:
Do not use freebsd-update(8) on jails that you have already upgraded with a make buildworld installworld, mergemaster cycle. The two different upgrade methods are not aware of each other in any way and you'll only create a mess if you use both.

Soo how can i check if my jails are upgraded ?
 
bryn1u said:
Soo how can i check if my jails are upgraded ?
Basically you can't. Well, actually you can but there is no foolproof way of knowing, which has both advantages and disadvantages.

One approach could be: head -1 /etc/motd. For example:

Code:
smtp2:/usr/jails/dogma $ head -1 /etc/motd
FreeBSD 9.2-RELEASE-p4 (SECKERNEL) #4 r261185: Sat Feb  1 19:24:21 CET 2014
smtp2:/usr/jails/dogma $ head -1 etc/motd
FreeBSD 9.2-RELEASE-p1 (SECKERNEL) #4 r261185: Sat Feb  1 19:24:21 CET 2014
smtp2:/usr/jails/dogma $
Simply because when upgrading, under some circumstances, these files will also be updated with a new version "tag" (not the official naming).

But as said it's also not fullproof since I can easily chose not to update these files. After all; a "tag" which says 9.1 or 9.2 in my /etc/passwd (or any other like motd) makes absolutely no difference for the operation of the system. In my example above the jail is actually fully on-par with the host.

So in the end there's no way to know for sure if a jail has been updated, apart from keeping your own records. Or, optionally, checking binaries with those of the host or another system.
 
Back
Top