# freebsd-update how to update jail?



## bryn1u (May 6, 2014)

Hey,

I was wondering how I can update a jail with freebsd-update(). ezjail is using binary update/upgrade, so why can't I do that the same way? I don't know how to. Can someone help?


----------



## fonz (May 7, 2014)

bryn1u said:
			
		

> ezjail is using binary update/upgrade, so why can't I do that the same way?


What makes you think you can't? Just make sure the jail's root has been mounted read-write (if that isn't already the case anyway), that the jail has access to the Internet (or to a mirror on your LAN) and run freebsd-update in the usual manner.

Note: if you have several jails sharing a read-only root (as described in the Handbook somewhere), make sure the root is mounted read-write in _one_ of the jails. Running freebsd-update in that particular jail should then result in all those jails being updated at once. Be sure to check whether freebsd-update updates any files that are not shared between jails and copy them manually if necessary.

Also, always update jails before updating the host.


----------



## bryn1u (May 7, 2014)

Ah, so it's the normal procedure like on the host. Ok. Thank you for the advice.


----------



## SirDice (May 8, 2014)

It can also be run from the host side using the -b option of freebsd-update(8). That's how ezjail does it.


----------



## fonz (May 8, 2014)

SirDice said:
			
		

> It can also be run from the host side using the -b option of freebsd-update(8). That's how ezjail does it.


Thanks for the hint.

In some cases that's probably even easier because one wouldn't need to remount a jail root that's normally only mounted read-only as read-write first.


----------

