The following was built on a Raspberry Pi 2 running Raspbian. I chose to build it on the Pi because the host and guest architecture are both armhf and hence the bootstrapping process is easier. Should you choose to build it on an x86 based architecture, using qemu for emulation is a good idea.
Create a directory where you wish to build the system -
D=/path/to/folder
mkdir -p $D
Bootstrap a base armhf system -
debootstrap vivid $D http://ports.ubuntu.com
Note: vivid can be replaces with trusty, utopic etc.
Mount required filesystems -
mount -t proc none $D/proc
mount -t sysfs none $D/sysfs
Setup the initial sources.list in $D/etc/apt/sources.list -
deb http://ports.ubuntu.com vivid main restricted universe multiverse
deb http://ports.ubuntu.com vivid-updates main restricted universe multiverse
deb http://ports.ubuntu.com vivid-security main restricted universe multiverse
deb http://ports.ubuntu.com vivid-backports main restricted universe multiverse
Update your installation -
chroot $D apt-get update && apt-get -y -u dist-upgrade
Install Standard packages -
chroot $D apt-get -y install ubuntu-standard initramfs-tools language-pack-en
Install the MATE Desktop Environment -
chroot $D apt-get -y install ubuntu-mate-core ubuntu-mate-desktop
If you are building for the Raspberry Pi 2, you will have to download packages from Ryan Finnie’s PPA and install them manually using dpkg -
chroot $D dpkg -i <packagename>.deb
Copy the kernel to the boot directory -
VMLINUZ="$(ls -1 $D/boot/vmlinuz-* | sort | tail -n 1)"
[ -z "$VMLINUZ" ] && exit 1
cp $VMLINUZ $D/boot/firmware/kernel7.img
Setup the following -
-
fstabby editing$D/etc/fstab -
hostnameby editing$D/etc/hostname -
hostsby editing$D/etc/hosts - Add a default user using
adduserand set a password. -
interfacesby editing$D/etc/network/interfaces - Load the sound modules on boot by adding
snd_bcm2835andbcm2708_rngto$D/lib/modules-load.d/rpi2.conf
Unmount mounted filesystems -
umount $D/proc
umount $D/sys
Now you have a fully functional Ubuntu MATE 15.04 armhf system present in the directory, which can also be converted to an image file 