How To: Installing Debian Etch From a running Debian based system

2 minute read

This How To will show how you can install Debian Etch and basically any Debian based distribution from a chroot environment. This way you don’t need to download the (net)install CD, neither to burn it.

This is as well a good training in order to understand how a debian system works.

##1. Introduction

It’s a long time since I ran debian on my system, I’m kind of missing it and decided to use the 5G I got left on my hard disk to install Debian Etch.

I wanted to install it directly from my Ubuntu Dapper environment. It used to be quite easy in the past as you could use the base-config which would guide you through the installation process, but recently (2 month actually), Debian Installer Etch beta 2 was released, here is an excerpt of Debian News March 15th, 2006:

March 15th, 2006

The Debian Installer team is proud to announce the second beta release of the installer for Debian GNU/Linux Etch.

Improvements in this release of the installer include:

  • base-config has been pensioned off: the installation is now done entirely before the reboot. Finally the entire Debian package installation process runs behind a user-friendly progress bar.
  • ….

Well, the debian installer is now run while on the install cd and base-config was removed from the repository, this means that I will have to do the job done by base-config, basically, setting up locale, console-data, timezone, network and fstab.

2. Preparing your system

The first thing you need to do is to prepare a partition to host your new system. Your filesystem might be more or less complex (having separate /boot, /usr, /var …), in my case, as I don’t have much space left, I will create a / partition on sda11 of type ext3 and a separate /home partition (the one I’m already using on my Ubuntu Dapper system) which is located on partition /dev/sda5 and is of type reiserfs. The swap partition will be the one I use on my running system, namely: sda9.

So here we go, we have to format /, mount / on our file system and prepare our future debian filesystem using debootstrap which is a tool to bootstraps a basic Debian system.

Let’s go to it, open a terminal and type:

# mkfs.ext3 /dev/sda11
# mkdir /mnt/debian
# mount /dev/sda11 /mnt/debian/ 

now, the filesystem is prepare and we have mounted our system on /mnt/debian, now, we install a basic system with debootstrap:

# debootstrap etch /mnt/debian/ ftp://ftp.de.debian.org/debian/
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional base dependencies: libdb4.2 libgnutls12 libreadline5 libsigc ++-2.0-0c2aopenbsd-inetd readline-common
...
...
I: Configuring netbase...
I: Configuring openbsd-inetd...
I: Base system installed successfully.

Done! Now we are going to chroot (a tool provided by the package coreutils), chroot runs command or interactive shell with a special root directory, in order to let our new system being informed of what is in the system, we need to mount /proc filesystem:

# mount -t proc none /mnt/debian/proc
# chroot /mnt/debian/

Let’s carry on with the configuration.

Carry on with page 2.