Setting up a chroot Baserock
First, install the following packages from your distribution:
Clone the baserock-chroot setup git repository:
$ git clone git://git.baserock.org/baserock/baserock/baserock-chroot
Generate the tools
Now we build and install the manage-baserock and enter-baserock tools. First, change to the
$ cd baserock-chroot
On Debian based systems, you can create and install a .deb package:
$ sudo apt-get install debhelper $ make pkg $ cd ../
Now you should have
$ sudo apt-get install socat $ sudo dpkg -i baserock-chroot_3_all.deb
On other systems, the tools can be created and installed as follows:
$ sudo make install
The first step is to add a baserock chroot, using the manage-baserock tool.
$ manage-baserock add 14-22 http://download.baserock.org/baserock/baserock-current-build-system-x86_64-chroot.tar.gz
Here we use manage-baserock with the add command, and create an installation with the name 14-22 from the URL given. Note that on Debian-based systems you may need to run
The location of the chroot is in
Finally, we enter Baserock as follows:
Note: on Debian-based systems you may need to run
Note: In Arch-based systemd you need to comment
Your development system is now running in the chroot: return to the 'Quick start' page and follow the instructions there to finish configuring it it.
Deploying a Build
To add a new build it must be deployed as a tar. For example the following cluster morphology could be used to deploy the devel system on 64-bit x86.
name: devel-system-x86_64-chroot kind: cluster systems: - morph: systems/devel-system-x86_64-chroot.morph deploy: devel-system-x86_64-chroot: type: extensions/tar location: /src/devel-system-x86_64-chroot.tar
Once deployed leave the chroot and add the new system to the chroot tool, in this example it has been named
$ manage-baserock add devel /opt/baserock/src/devel-system-x86_64-chroot.tar
The new system is entered as follows:
$ enter-baserock devel
Removing a Chroot
In order to properly remove a Baserock chroot use
$ manage-baserock rm <name of chroot to be removed>
For example, to remove the devel system from the previous example do
$ manage-baserock rm devel
Notes on using Baserock in a chroot
modprobe btrfsoutside the chroot may be necessary, to ensure that the kernel support for btrfs is available. This is needed to e.g.
morph deployto a raw image from within the chroot.
- Morph can deploy to a tar file suitable for installing with
manage-baserock. Just set
type: extensions/tarin the deployment morphology.
- When installing from a local tar file, run
manage-baserock add <name> <path>and then use