Jail maintenance: Difference between revisions
From wikinotes
Line 15: | Line 15: | ||
= Updating Jails = | = Updating Jails = | ||
<blockquote> | <blockquote> | ||
See also [[Freebsd release management]] | |||
== Patch Updates == | == Patch Updates == | ||
<blockquote> | <blockquote> |
Revision as of 01:45, 9 June 2022
Updating Jail Packages
# Updating Packages # If all you're looking to do is to maintain your packages, # you can update all of your jails from your root system pkg -j wikinotes upgrade for jid in `jls | awk '{print $1}'`; do yes | sudo pkg -j $jid upgrade; done
Updating Jails
See also Freebsd release management
Patch Updates
freebsd-update -b /usr/local/jails/myjail/filesystem fetch freebsd-update -b /usr/local/jails/myjail/filesystem installMinor/Major Updates
NOTE:
jails run the host's kernel, so
uname -a
won't show the release installed to the jail.
You might be able to usefreebsd-version
, but I haven't tested it.first update the host
freebsd-update upgrade \ --currently-running 12.0-RELEASE \ -r 13.0-RELEASE # 1st run freebsd-update install sudo reboot # 2nd run freebsd-update install sudo pkg upgradenext update each jail
freebsd-update \ -b /usr/local/jails/${JAIL}/filesystem \ --currently-running 12.0-RELEASE \ -r 12.1-RELEASE \ upgrade freebsd-update \ -b /usr/local/jails/${JAIL}/filesystem install service jail restart ${JAIL} freebsd-update \ -b /usr/local/jails/${JAIL} \ install pkg -j ${JAIl} upgrade