Debootstrap

This page describes bootstrapping of a Debian Squeeze system.

Preparation

Boot a temporary system or live system.

Debootstrap and chroot

Debootstrap into an empty directory or mounted partition:

# debootstrap --arch=amd64 wheezy /mnt http://ftp.de.debian.org/debian/

Mount "virtual" filesystems:

# mount -o bind /dev /mnt/dev
# mount -t proc none /mnt/proc

Network settings:

# cp /etc/network/interfaces /mnt/etc/network/
# cp /etc/resolv.conf /mnt/etc/

Setup /etc/fstab.

Now chroot:

# chroot /mnt

First thing: set root password

# passwd root

Configure APT

This is the configuration for Wheezy including contrib and non-free.

Add the following sources to /etc/apt/sources.list:

deb http://ftp.de.debian.org/debian wheezy main contrib non-free
deb http://ftp.de.debian.org/debian wheezy-updates main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free

Update

# apt-get update

Configure console

Configure locales

# apt-get install locales
# dpkg-reconfigure locales

Configure keyboard

# apt-get install console-data

Configure tzdata:

# dpkg-reconfigure tzdata

Install basic tools

Local mailserver

See Local mailserver

Syslog

# apt-get install rsyslog

Git and etckeeper

# apt-get install git etckeeper
# git config --global user.name "Foo Bar"
# git config --global user.email foo@example.com

Editor

# apt-get install vim
# apt-get purge nano

Other tools

# apt-get install less tree zip man
# apt-get install curl wget telnet iputils-ping dnsutils

Sources