JACK WHITHAM PhD MEng
Professional Activities - Publications - Software - Articles
   
       
    Home -> Articles -> How to use debootstrap on a non-Debian GNU/Linux system    

Introduction

Debootstrap is a Linux program that turns a regular directory into a Debian root filesystem that is almost ready to be used to boot Debian GNU/Linux. It does this by pulling the required "base" packages from the Debian software repositories.

Debootstrap is an incredibly effective way to build a new system when you have a Linux system (not necessarily Debian) that is already working. I have used it to:

There are many other situations in which this tool is useful.

Installing with debootstrap using a Knoppix CD

Here is a useful guide for initialising a new Debian system using debootstrap:
http://www.inittab.de/manuals/debootstrap.html
This guide is highly recommended. But it assumes you have booted from a Knoppix CD, which already has debootstrap on it. It is not hard to get a Knoppix CD, but you may want to set up your new Debian system while your old one is still working.

Installing with debootstrap on a Debian system

If you do not have debootstrap, but you do have a Debian system, you can install it with apt-get install debootstrap. It installs in /usr/sbin. You can then follow the instructions at the link above.

Installing with debootstrap on some other Linux system

If you don't have debootstrap or a Debian system, but you do have some kind of Linux system, you can get debootstrap as follows:

  1. Visit http://packages.debian.org/stable/admin/debootstrap and download the appropriate version for your architecture.
  2. Move this file to a temporary directory (not the directory you want to install Debian in).
  3. Extract the .deb file using ar x debootstrap*.dev (yep, .deb files are ar archives).
  4. This produces three files:
  5. Extract data.tar.gz with tar xzf data.tar.gz (this is where the package files actually are - the other files are metadata).
  6. That extracts the debootstrap distribution in a usr subdirectory.
  7. Set the environment variable DEBOOTSTRAP_DIR to point to $PWD/usr/lib/debootstrap.
  8. Make sure you have wget installed.
  9. Now you can run usr/sbin/debootstrap as specified in the instructions here.



       
  Copyright (C) Jack Whitham 1997-2008