Chroot build environment: Difference between revisions
Created page with "Working on this as I build a new virtual machine for semi-automated Linux and Windows builds. = Chroot = Our "weekly" builds are done in a virtual machine with a chroot pris..." |
mNo edit summary |
||
| Line 4: | Line 4: | ||
Our "weekly" builds are done in a virtual machine with a chroot prison for 32 and 64 bit builds and wine for the Windows build. Here I document step by step how to set one up. I write this as I go, so it is incomplete. | Our "weekly" builds are done in a virtual machine with a chroot prison for 32 and 64 bit builds and wine for the Windows build. Here I document step by step how to set one up. I write this as I go, so it is incomplete. | ||
Make snapshots after every section or so. | |||
== Base system == | == Base system == | ||
| Line 9: | Line 11: | ||
Install Ubuntu Trusty in a virtual machine. Straightforward :) Pick LVM in the setup options so you can resize partitions later. | Install Ubuntu Trusty in a virtual machine. Straightforward :) Pick LVM in the setup options so you can resize partitions later. | ||
Install bzr and (optinal, I use it for remote access) ssh: | Install bzr and (optinal, I use it for remote access) ssh and stuff: | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get install bzr ssh | sudo apt-get install bzr ssh schroot | ||
== Add common volume to host builds == | |||
Use LVM to add a new volume. My VM has 150 G total space: | |||
lvcreate -L 100G -n builds ubuntu-vg | |||
mkfs.ext4 /dev/ubuntu-vg/builds | |||
If there is not enough space, reduce existing volumes. This needs to be done from a Live CD: | |||
resize2fs /dev/ubuntu-vg/root 50G | |||
lvresize /dev/ubuntu-vg/root 50G | |||
Add the new volume to fstab: | |||
/dev/mapper/ubuntu--vg-builds /mnt/builds ext4 errors=remount-ro 0 1 | |||
This new volume will be mounted into the chroots for easy access. | |||
== Set up chroot environments == | |||
Follow this documentation: [https://wiki.ubuntu.com/DebootstrapChroot] | |||
Our | |||
Revision as of 16:35, 29 March 2015
Working on this as I build a new virtual machine for semi-automated Linux and Windows builds.
Chroot
Our "weekly" builds are done in a virtual machine with a chroot prison for 32 and 64 bit builds and wine for the Windows build. Here I document step by step how to set one up. I write this as I go, so it is incomplete.
Make snapshots after every section or so.
Base system
Install Ubuntu Trusty in a virtual machine. Straightforward :) Pick LVM in the setup options so you can resize partitions later.
Install bzr and (optinal, I use it for remote access) ssh and stuff:
sudo apt-get update sudo apt-get install bzr ssh schroot
Add common volume to host builds
Use LVM to add a new volume. My VM has 150 G total space:
lvcreate -L 100G -n builds ubuntu-vg mkfs.ext4 /dev/ubuntu-vg/builds
If there is not enough space, reduce existing volumes. This needs to be done from a Live CD:
resize2fs /dev/ubuntu-vg/root 50G lvresize /dev/ubuntu-vg/root 50G
Add the new volume to fstab:
/dev/mapper/ubuntu--vg-builds /mnt/builds ext4 errors=remount-ro 0 1
This new volume will be mounted into the chroots for easy access.
Set up chroot environments
Follow this documentation: [1]
Our
