Install debootstrap and qemu-user-static
Create a big sparse file for the image:
$ truncate -s 100G vivid_base.img
Create a mount directory:
$ mkdir -p ~/vivid_armhf/mount
Make the filesystem (ignore the warning):
$ mkfs.ext4 vivid_base.img
Mount the filesystem:
$ sudo mount -o loop vivid_base.img ~/vivid_armhf/mount
Create the base system:
$ sudo debootstrap --arch armhf --foreign vivid ~/vivid_armhf/mount
Copy qemu to the base system:
$ sudo cp /usr/bin/qemu-arm-static ~/vivid_armhf/mount/usr/bin/
Mount proc and sys:
$ sudo mount -t proc /proc ~/vivid_armhf/mount/proc
$ sudo mount -t sysfs /sys ~/vivid_armhf/mount/sys
Chroot in:
$ sudo chroot ~/vivid_armhf/mount
Finish the install (note that vivid debootstraps are buggy and this will partially fail):
(chroot)# debootstrap/debootstrap --arch=armhf --second-stage
(chroot)# exit
Create a decent sources.list, using "ports.ubuntu.com/ubuntu-ports" as the mirror and copy to ~/vivid_armhf/mount/etc/apt/sources.list
Chroot back in:
$ sudo chroot ~/vivid_armhf/mount
Fix the broken install:
# apt-get install -f
Enjoy!
vivid_base.img can be copied to act as a "snapshot". If you copy with "cp --reflink=auto" you'll make a copy-on-write snapshot (to save space) if your filesystem supports it e.g. btrfs.