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:
- Migrate my workstation from
Slackware to Debian.
I was able to get almost all of the apps I required installed
and working before I rebooted into Debian for the first time.
- Create a Linux-on-Linux system: a small "guest" Linux system inside a
chroot jail, within
a host Linux system. This may be done for security purposes,
although the root user is always able to escape the jail. I used
it to run an i386 guest inside an x86-64 host.
- Remote setup of a Linux system. Linux installers do not normally
offer the facility to run an install remotely, but with debootstrap,
you can do the entire install through an existing Linux system.
(This can be done using a Knoppix CD by enabling the SSH daemon.)
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:
- Visit
http://packages.debian.org/stable/admin/debootstrap and
download the appropriate version for your architecture.
- Move this file to a temporary directory (not the directory you
want to install Debian in).
- Extract the .deb file using ar x debootstrap*.dev
(yep, .deb files are ar archives).
- This produces three files:
- control.tar.gz
- data.tar.gz
- debian-binary
- Extract data.tar.gz with tar xzf data.tar.gz
(this is where the package files actually are - the other files
are metadata).
- That extracts the debootstrap distribution in a usr
subdirectory.
- Set the environment variable DEBOOTSTRAP_DIR to point
to $PWD/usr/lib/debootstrap.
- Make sure you have wget installed.
- Now you can run usr/sbin/debootstrap as specified in the
instructions here.
| |
 |
|
|
| |
Copyright (C) Jack Whitham 1997-2008
|
|