This short tutirial only takes care of installing Ubuntu 14.04 in a directory.
More preparations are needed before the system can run and they will only be listed here but not explained… for now.
# Bootstrapping UBUNTU 14.04 LTS
# present Settings
# Installation destination of Ubuntu: /dev/sda2
# Temporary work space for bootsctrap: /dev/sda3, no need to be a partition, can be any directory with enough space (>1GB)
– Constants
tempdir=/mnt/sda3
newsysdir=/mnt/sda2

1 – Mount the 2 partitions(one for temporary bootstrapping and the other for the new system.
mkdir $newsysdir
mkdir $tempdir
mount /dev/sda2 $newsysdir
mount /dev/sda3 $tempdir

2 – Get and extract the latest bootstrap script from Ubuntu archives:
cd $tempdir
wget "http://de.archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.67_all.deb"
ar -xf debootstrap_1.0.67_all.deb
tar xzf data.tar.gz
tar xzf control.tar.gz

3 – Get and extract the Ubuntu keyrings
wget "http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-keyring/ubuntu-keyring_2012.05.19.tar.gz"
tar xzf ubuntu-keyring_2012.05.19.tar.gz

4 – Bootstrapping Ubuntu system into the mounted future system partition ($newsysdir)
DEBOOTSTRAP_DIR=$tempdir/usr/share/debootstrap usr/sbin/debootstrap --arch amd64 --keyring=ubuntu-keyring_2012.05.19/keyrings/ubuntu-archive-keyring.gpg trusty $newsysdir http://de.archive.ubuntu.com/ubuntu/

5 – Extra preparations needed before being able to run the new system:
CHROOT to the system:
mount /proc $newsysdir/proc -o bind
mount /sys $newsysdir/sys -o bind
mount /dev $newsysdir/dev -o bind
chroot $newsysdir

– Adapt /etc/fstab
– Adapt /etc/network/interfaces
– Adapt /etc/resolv.conf
– Adapt /etc/hosts
– Install the current kernel
– Install grub2
– Set the root password
– Set ssh to start at boot time

Finish CHROOT
exit
umount $newsysdir/proc
umount $newsysdir/sys
umount $newsysdir/dev
umount $newsysdir