Home > Support > HOWTO List > Installing Debian / Ubuntu using debootstrap

This page is obsolete. We may update it soon.

Installing Debian / Ubuntu using debootstrap

Do you have a running Linux server and need to install Debian / Ubuntu on it?

Got a Centos / Fedora machine and want Debian / Ubuntu on it?

Got Debian already but want a fresh (maybe newer?) install on a separate partition?
<!-- script is currently unsupported, we may update it soon and link it back here. -->
<!-- Then the RimuHosting debootstrap.sh script may be of interest to you. -->

RimuHosting's Debian / Ubuntu Install Procedure

RimuHosting staff are not based in the data centers.  Rather we manage our servers remotely.  Doing this via SSH is easy.  We also have KVM (over IP) devices that we use.  However these can be slow and clunky to use.  So we prefer to minimise the time we spend on them.

We need to use the KVM devices typically just when we install servers.  e.g. so that we can set the correct BIOS options.  And so that we can initiate the distro install.  After the distro is installed we almost never need to use the KVM on that server again (unless someone does a boo-boo and makes the server inaccessible).

We do a lot of Red Hat-based distro installs.  We do these using kickstart (which makes automating the installs quite easy).  Meaning we do not have to do very much using the KVM.  And it means we can get ssh access to the server quickly.

Years back we had customers order Debian- or Ubuntu-based servers.  At that time the Debian installer a) would not work (due to old kernel and new hardware) and b) required lots of 'KVM time'.

So we decided to do a base install of a RedHat-based distro (nowadays, Centos5).  Then use that to 'bootstrap' the server to the Debian- or Ubuntu-based distro.

To do that we installed the RedHat-based distro into a small (1.5GB) partition.  Then used Debian's debootstrap tool to 'bootstrap' an install of Debian (Sarge, Etch, etc) or Ubuntu (e.g. Hardy) onto a separate partition.

The debootstrap tool installs a minimal set of Debian tools.  Which basically gets you up and running with apt.  And once you have apt you can use it to install the regular base Debian/Ubuntu distro.  The end result is what you would get if you went through the regular installers.

We created the RimuHosting debootstrap.sh script to help automate the steps in the debootstrapping process.


The user of this script will:

The script then figures out the running server's IP address, hostname, gateway, etc.

The script then:

Then you just reboot and the server comes up pinging and ssh-able with the distro you selected.

With the added bonus that you now also have a 'rescue boot' RedHat-based distro.  e.g. so if you make your server inaccessible it can be booted into the RedHat-based (and separate) distro.  Which will have the same network settings and be ssh-able.


The script 'often' works unattended.  Sometimes with different hardware than we normally use, or when there are package updates things break and you would need to manually resolve issues.  e.g. the server not booting into the new install.

The 'most tested' partitioning scheme

The system we usually do this on is a Centos5 server (32 bit or 64) parititoned as follows:

/dev/sda1 100mb software raid
/dev/sda2 4096mb ext3 /
/dev/sda3 software raid remainder

/dev/sdb1 100mb software raid
/dev/sdb2 swap
/dev/sdb3 software raid remainder

/dev/md0 software raid1 on /dev/sda1 and /dev/sdb1 mounted as /boot
/dev/md1 software raid1 on /dev/sda3 and /dev/sdb3 mounted as /raid

After the Debian install /dev/md1 will be the Debian / partition.