How to freebsd-update only the jail's components?

japoc

Active Member

Reaction score: 1
Messages: 102

Hello,

I read that freebsd-update uses the /etc/freebsd-update.conf file to determine which components to update.
The /etc/freebsd-update.conf file of my host contains the following line:

Code:
Components src world kernel

So I'm guessing that each time I'm trying to update a jail using

freebsd-update -b /var/jails/myjail_directory/ fetch install

freebsd-update is going to try to update the src component (which is absent in my jail) and also update the kernel (which is shared with the host) as well as the boot loader and stuff like that that are absent in the jail. This is going to fail, or create unnecessary work for the system, or maybe update the host's kernel each time I update a jail. I don't know what will happen but it doesn't look good.

How can I make sure that each time I update a jail, I only update the components I populated the jail with (base, lib32 and doc) ? Do I have to create a special freebsd-update.conf file to use when I update the jails? If so, what do I have to put in the "Components" line to only update base, lib32 and doc?

Thanks for your help.
 

abishai

Aspiring Daemon

Reaction score: 185
Messages: 767

Copy /etc/freebsd-update.conf to /etc/freebsd-update-jail.conf or whatever you wish, remove components your jails don't have and provide it to freebsd-update with -f key.
freebsd-update -f /etc/freebsd-update-jail.conf -b /var/jails/myjail_directory fetch install
 

ShelLuser

Son of Beastie

Reaction score: 2,097
Messages: 3,790

How can I make sure that each time I update a jail, I only update the components I populated the jail with (base, lib32 and doc) ?
Why not run the command from within the jail itself?
 
Top