debootstrap is a tool which will install a Debian base system into a subdirectory of another, already installed system. It doesn’t require an installation CD, just access to a Debian repo.
It can also be installed and run from another operating system, so, for instance, you can use debootstrap to install Debian onto an unused partition from a running Gentoo system.
It can also be used to create a rootfs for a machine of a different architecture, which is known as “cross-debootstrapping”.
To setup a stable system:
To setup an Ubuntu system from Debian: