1 1

Armbian build environment in chroot jail

Recommended Posts

Probably the easiest and fastest way to set up an Ubuntu Xenial build environment (needed by the armbian build scripts) is using a chroot jail. This thread should be a quick copy paste "tutorial" to create your own chroot jail and on an Debian based linux installation.


1.) Install debootstrap

$ sudo apt install debootstrap


2.) Chreate chroot jail using debootstrap

$ sudo debootstrap --variant=buildd --arch=amd64 xenial ./system/ http://archive.ubuntu.com/ubuntu/


3.) Mount your local system into the chroot

$ for f in dev dev/pts proc sys ; do sudo mount -o bind /$f ./system/$f ; done

4.) Mount resolv.conf from host system into chroot

$ sudo mount --bind /etc/resolv.conf ./system/etc/resolv.conf


5.) Enter the chroot and install some important packages

$ sudo chroot ./system
$ apt install -y sudo nano git

6.) Add universe to your chroots repo list (needed by the build scripts)

$ sudo nano /etc/apt/sources.list

change from:
deb http://archive.ubuntu.com/ubuntu xenial main

deb http://archive.ubuntu.com/ubuntu xenial main universe

$ sudo apt update

7.) Download and start build script in root users home directory

$ cd
$ git clone https://github.com/armbian/build
$ cd build
$ service apt-cacher-ng start
( $ export EXPERT=yes )
$ ./compile.sh

Now you can start building your images from source :)

I know this is not rocket science, but I think this might help some people getting into Armbian!

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

1 1