[Jail] Fail to update FreeBSD Jail once the host is updated to latest patch

Hi everyone,

Today I wanted to create a simple Jail template ZFS dataset so that I can just do a zfs clone template_dataset@snapshot mynewjail_dataset to create a new one.

However, when I do freebsd-update fetch and freebsd-update install to install the latest security patch, I find that I no longer can do:

freebsd-update -b zroot/jails/template/thick/14.1-RELEASE --currently-running 14.1-RELEASE fetch install

It shows "No updates needed to update system to 14.1-RELEASE-p6." but the new base system is not patched.

If I clone the dataset to create a new jail, start the jail, and jexec into the jail shell, I can do freebsd-update fetch and install the patch.

What is going wrong? I searched posts and some suggest changing the chroot but I will have to unset it once the job is finished. Is this currently a bug, or a known issue?
 
Have you tried freebsd-update -b $jailroot -d $jailroot/var/db/freebsd-update ... ?

Also, you can do freebsd-update -j ... to update a running jail without explicitely jexecing.
 
Split up the fetch and install with two separate freebsd-update(8) commands, if I recall correctly something did change, if the fetch wasn't able to fetch anything (or if it already fetched what was needed), freebsd-update(8) would exit without doing the install if it was added on the command line.
 
Have you tried freebsd-update -b $jailroot -d $jailroot/var/db/freebsd-update ... ?
I tried, but it still shows No updates needed to update system to 14.1-RELEASE-p6.

Also, you can do freebsd-update -j ... to update a running jail without explicitely jexecing.
I want to make a template jail that has the latest patch, so that I can create a jail using zfs clone. It seems that the -j option is just jexec to the jail and runs freebsd-update, and I also have to start the jail to do this.

Split up the fetch and install with two separate freebsd-update(8) commands, if I recall correctly something did change, if the fetch wasn't able to fetch anything (or if it already fetched what was needed), freebsd-update(8) would exit without doing the install if it was added on the command line.
Today, I tried to split it into two commands. This time, it does fetch, but the result is strange. I am not sure why there are double slashes in the path; maybe this is causing the problem.

However, when I run the command again, the same message appears.
Code:
[root@freebsd-nas0 ~]# freebsd-update -b /zroot/jails/template/thick/14.1-RELEASE --currently-running 14.1-RELEASE fetch
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 14.1-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 14.1-RELEASE-p6.

Code:
[root@freebsd-nas0 ~]# freebsd-update -b /zroot/jails/template/thick/14.1-RELEASE --currently-running 14.1-RELEASE fetch
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 14.1-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 48 files... ....10....20....30....40.... done.
The following files will be added as part of updating to
14.1-RELEASE-p6:
/bin/freebsd-version
/boot/kernel/cfiscsi.ko
/boot/kernel/cfumass.ko
/boot/kernel/ctl.ko
/boot/kernel/kernel
/boot/kernel/nfscl.ko
/boot/kernel/pf.ko
/boot/kernel/zfs.ko
/lib/libc++.so.1
/lib/libcrypto.so.30
/lib/libnv.so.1
/lib/libzpool.so.2
/rescue/[
/rescue/bectl
/rescue/bsdlabel
/rescue/bunzip2
/rescue/bzcat
/rescue/bzip2
/rescue/camcontrol
/rescue/cat
/rescue/ccdconfig
/rescue/chflags
/rescue/chgrp
/rescue/chio
/rescue/chmod
/rescue/chown
/rescue/chroot
/rescue/clri
/rescue/cp
/rescue/csh
/rescue/date
/rescue/dd
/rescue/devfs
/rescue/df
/rescue/dhclient
/rescue/disklabel
/rescue/dmesg
/rescue/dump
/rescue/dumpfs
/rescue/dumpon
/rescue/echo
/rescue/ed
/rescue/ex
/rescue/expr
/rescue/fastboot
/rescue/fasthalt
/rescue/fdisk
/rescue/fetch
/rescue/fsck
/rescue/fsck_4.2bsd
/rescue/fsck_ffs
/rescue/fsck_msdosfs
/rescue/fsck_ufs
/rescue/fsdb
/rescue/fsirand
/rescue/gbde
/rescue/geom
/rescue/getfacl
/rescue/glabel
[root@freebsd-nas0 ~]# freebsd-update -b /zroot/jails/template/thick/14.1-RELEASE --currently-running 14.1-RELEASE install
src component not installed, skipped
Installing updates...install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/boot/kernel/INS@96rvdt: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/boot/kernel/INS@YM1nu0: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/boot/kernel/INS@sQfrvr: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/boot/kernel/INS@vyCzrm: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/boot/kernel/INS@4ILwZY: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/boot/kernel/INS@WvcLdg: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/boot/kernel/INS@0C7ced: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/lib/INS@KHzgOA: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/lib/INS@Vz3xx4: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/lib/INS@NXGoJu: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/lib/INS@EoVos4: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/sbin/INS@IEGOuI: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@cVVpTv: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@HI97Bu: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@COhOg2: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@YwrV6e: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@3HTLRi: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@W4TOoL: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@y0EeHy: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@HcKSSX: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@LXHeVd: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@T8VIfY: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@XUYD5t: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@4uHVjt: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@MDBldv: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@twGPfG: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@Ujuhf0: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@q485LH: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@oBMNbF: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@jKC4z3: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@e2Duds: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/bin/INS@w1DjGL: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib/INS@y71IJ0: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib/INS@MWlXda: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib/INS@59RdJH: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib/INS@wb30BJ: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib/INS@Mtgxch: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib/INS@348s3w: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib/INS@RdUffI: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib/INS@bvZa1W: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib32/INS@5gIOm7: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib32/INS@ZU2hwz: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib32/INS@403VxY: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib32/INS@lrTT2J: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib32/INS@RMXFrx: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib32/INS@yEYJmx: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib32/INS@i2FEOo: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/lib32/INS@XMwXFd: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/libexec/INS@3nsTZT: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/libexec/INS@VUEtr6: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/libexec/INS@EcJeix: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/sbin/INS@EYoExL: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/sbin/INS@aUClzh: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/sbin/INS@WP8A4a: No such file or directory
install: /zroot/jails/template/thick/14.1-RELEASE//usr/lib/debug/usr/sbin/INS@QuoL1r: No such file or directory
Scanning /zroot/jails/template/thick/14.1-RELEASE/usr/share/certs/untrusted for certificates...
Scanning /zroot/jails/template/thick/14.1-RELEASE/usr/share/certs/trusted for certificates...
 done.
 
Back
Top