# Raspberry Pi 2 and jails



## KingBabylon (Dec 26, 2015)

Hi,

first I'm a new user of FreeBSD, and I really enjoy it. I'm testing FreeBSD-11.0-CURRENT on my Raspberry Pi 2, and try to make Jails work, but sysutils/ezjail or sysutils/cbsd can't get base.txz.

Is it because FreeBSD 11.0 is still under development or Rpi2 (armv6) doesn't support jails? Is there a workaround?

Thanks.


----------



## junovitch@ (Dec 26, 2015)

From the looks of things poking around on http://ftp.FreeBSD.org/pub/FreeBSD/snapshots/, it seems the ARM platform only has ISO images.  So you'll have to use the compiling method of creating a jail.


----------



## KingBabylon (Dec 28, 2015)

Thanks.

I will try that


----------



## SirDice (Dec 28, 2015)

Both try to download release versions by default. And there is no 11.0-RELEASE yet.


----------



## KingBabylon (Dec 28, 2015)

10-RELEASE doesn't work with rpi2, that's why I took 11.0. As this is just for playing around, it's not a problem


----------



## lme@ (Dec 29, 2015)

10.2-RELEASE kernel doesn't work on an RPI2, but I cannot think of anything preventing you to run a 10.x jail on CURRENT.


----------



## KingBabylon (Dec 29, 2015)

I look for 10.x CURRENT image, but I can't find it. Only 11.0-CURRENT, 10.2-RELEASE and 10.2-STABLE. 

Am I mixing up branches terms?


----------



## lme@ (Dec 29, 2015)

Yes, you do. 

11.0-CURRENT is the branch for the upcoming 11.0-RELEASE. The 10.x branch has 10.[012]-RELEASE which are release snapshots and 10-STABLE which is the development version of 10.

It looks like this:


----------



## junovitch@ (Dec 29, 2015)

lme@ is right.  I didn't think of that.  Having various versions of userland is how ports-mgmt/poudriere compiles packages against different releases of FreeBSD.  Unless something on ARM doesn't behave properly, the new 11.0-CURRENT base system and kernel should be able to run userland applications from older releases just fine.  Off the top of my head the only incompability I've seen on my 11.0-CURRENT amd64 system with 10.2-RELEASE jails is sockstat(1) run in a jail doesn't interpret some values from the kernel properly.

If you can select the release than that should work.  I think with sysutils/ezjail you would just override it with `env UNAME_r=10.2-RELEASE ezjail-admin <blah>` to pick what gets used/updated.  However I haven't used sysutils/ezjail a while so you'll have to double check that the expected result does indeed happen.


----------



## KingBabylon (Dec 30, 2015)

I will give it a try.

Thanks you both for your explanations, it really helps!


----------



## SirDice (Dec 30, 2015)

junovitch@ said:


> Off the top of my head the only incompability I've seen on my 11.0-CURRENT amd64 system with 10.2-RELEASE jails is sockstat(1) run in a jail doesn't interpret some values from the kernel properly.


You get similar issues if you run 9.x jails on a 10.x host.


----------



## KingBabylon (Jan 2, 2016)

It seems that for armv6, there is no basejail for 10.X-RELEASE nor 10.2-STABLE. So my only option is to make my own. 

First I have to build the world for the host system. On Raspi (my only machine on FreeBSD), someone have an idea on how much time does it take? Hours, days, more? And how much space disk I need (i only have a 8Gb sd card)?


----------



## junovitch@ (Jan 2, 2016)

From /usr/src/Makefile (https://svnweb.FreeBSD.org/base/head/Makefile?view=markup#l59)



> If you want to build your system from source be sure that /usr/obj has at least 6GB of diskspace available.



It would take a while, days not hours.  This is probably the territory to just crossbuild on a faster amd64 host and mount it's /usr/obj from the Raspberry.  I haven't looked into the syntax on that but it should be out there somewhere.


----------



## piekielny (Jan 4, 2016)

Hi.

I'm having same problem.
Where can I find instructions to build base.txz? Googling returned nothing usefull so far...


----------



## SirDice (Jan 4, 2016)

You basically need to build your own release. See release(7).


----------

