# How to populate ezjail with same release as host?



## Ed_Flecko (Aug 3, 2015)

In my host, I'm trying to follow the "security patched" (that's what I call it) release of 10.1, so my svn command on my host machine is:

`svn co [URL]https://svn.freebsd.org/base/releng/10.1[/URL] /usr/src`

I'm setting up my first ezjail, and I want to use the very same release as what I'm following on my host, so I'm not sure what my initial command would be to populate the ezjail. I don't care about installing the man pages, so is my command simply:

`sudo ezjail-admin install -sp`

Is this correct?

Ed


----------



## SirDice (Aug 3, 2015)

Add the -b option to install from an already built world that's in /usr/src/ on the host.


----------



## Ed_Flecko (Aug 3, 2015)

Excellent, thank you!

So my command is: `sudo ezjail-admin install -spb` ???

Ed


----------



## SirDice (Aug 3, 2015)

There's probably no need to include -s, it will install a complete source tree in the jail.


----------



## Ed_Flecko (Aug 3, 2015)

Hmmm...I tried -pb , -spb , and just -b and none of those will work. It clearly doesn't like the -b

Suggestions?

Ed


----------



## SirDice (Aug 3, 2015)

It assumes you had already done a `make buildworld` on the host. This is usually the case if you use the sources to update the system.


----------



## Ed_Flecko (Aug 3, 2015)

Thank you for the clarification.

Ed


----------



## Ed_Flecko (Aug 3, 2015)

I get the impression that *most* people don't keep their systems patched like they used to, i.e., - `make buildworld`, `make buildkernel`, and `make installkernel`. Don't most people simply: `freebsd-update fetch` and then `freebsd-update install` to keep their systems patched? If I understand correctly, the new way (i.e, `freebsd-update fetch` and then `freebsd-update install`) is recommended and not what I *thought* I needed to do by using devel/subversion to checkout the source and rebuild stuff the "old" way.

If that's true and people don't run `make buildworld` anymore, that brings me back to my original question - how to do create your basejail with the same, patched OS as your host? Is it just:

`sudo ezjail-admin install -sp`

and that's all I need to do?



Ed


----------



## kpa (Aug 3, 2015)

It depends on what you prefer. I don't use freebsd-update(8) even if the machine is running a release version of FreeBSD. I just don't trust it enough and I prefer to build everything from sources.


----------



## Ed_Flecko (Aug 3, 2015)

What don't you trust?

Ed


----------



## kpa (Aug 3, 2015)

I've just been burned by freebsd-update(8) quite a few times and left with an unbootable system. It's usually fine but since it's a shell script it can not handle some of the unusual error conditions gracefully.


----------



## wblock@ (Aug 4, 2015)

Both methods of updating ezjails are shown in the Handbook: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-ezjail.html#jails-ezjail-update.


----------

