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



## japoc (May 23, 2017)

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:


```
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 (May 23, 2017)

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 (May 24, 2017)

japoc said:


> 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?


----------



## abishai (May 24, 2017)

ShelLuser said:


> Why not run the command from within the jail itself?


`freebsd-update` is not designed to update jail from jail - default jail permissions prohibit to change immutable bit from inside.


----------



## ShelLuser (May 25, 2017)

abishai said:


> default jail permissions prohibit to change immutable bit from inside.


Nothing which can't be changed if you'd wanted to.


----------

