Debian Operating System Installation


This procedure will install the base Debian GNU/Linux operating system.

Note: If you have rebooted your computer since you created the RAID volume, then you must manually restart the md0 device with this command:

# mdrun

The RAID volume will be started automatically after the operating system is fully installed.


  1. Verify that the network interface was configured with DHCP.

    # ifconfig eth0
    [screenshot]

    Check for a line that begins with "inet addr". If this line does not exist, then your ethernet interface was not automatically configured with DHCP and you must configure the interface manually.

    If an error like this is returned, then your network adapter was not automatically detected:
    eth0: error fetching interface information: Device not found

  2. Change the hostname.

    # hostname -v vmwoody
    [screenshot]

    In this example, the computer has been named "vmwoody". Use a different name for your computer.

    Note: Choose a unique name for this computer. Generic names like "mail", "smtp", and "pop" are especially poor choices that will cause conflicts later.

  3. Create the target directory.

    # mkdir -v /target
    [screenshot]

    We will use this directory as a filesystem "mount point".

  4. Mount the target directory.

    # mount -v /dev/md0 /target
    [screenshot]

    The contents of /dev/md0 will become accessible under the /target directory. (You can do the same thing in Windows 2000 with the "Computer Management" MMC panel.)

  5. Download the operating system.

    # debootstrap woody /target
    [screenshot]
    [screenshot]

    The base Debian install is appoximately 200 megabytes. Depending on the speed of your Internet connection, it may take a long time to download.

    Note: The distribution name for Debian 3.0 is "woody". This command will download woody to the /target directory. The distribution name for Debian 3.1 will be "sarge". When Debian 3.1 is released, you must run "debootstrap sarge /target" instead.

  6. Remove the hostname symlink.

    # rm -v /target/etc/hostname
    [screenshot]

  7. Create the hostname file.

    # hostname > /target/etc/hostname
    [screenshot]

  8. Verify that the hostname file is correct.

    # cat /target/etc/hostname
    [screenshot]

  9. Remove the resolv.conf symlink.

    # rm -v /target/etc/resolv.conf
    [screenshot]

  10. Copy the resolv.conf file.

    # cp -v /etc/resolv.conf /target/etc/resolv.conf
    [screenshot]

    Note: If you manually configured your network interface earlier, then you must also manually create this file.

  11. Create the hosts file.

    # echo "127.0.0.1 $(hostname) localhost" > /target/etc/hosts
    [screenshot]

  12. Verify that the hosts file is correct.

    # cat /target/etc/hosts
    [screenshot]

    The hostname that you specified earlier should appear in this file.

  13. Change root into the target filesystem.

    # HOME=/root chroot /target /bin/bash
    [screenshot]

    Notice how the command prompt changes.

  14. Configure the base system.

    # base-config
    [screenshot]

    Answer the questions as follows:

    1. [screenshot] Is the hardware clock set to GMT? No
    2. [screenshot] What area do you live in? Canada
    3. [screenshot] Select a city or time zone: Eastern
    4. [screenshot] Shall I enable MD5 passwords? Yes
    5. [screenshot] Shall I enable shadow passwords? Yes
    6. [screenshot] Enter a password for root: Choose a secure password.
    7. [screenshot] Re-enter password to verify: Enter the same password again.
    8. [screenshot] Shall I create a normal user account now? No
    9. [screenshot] Do you want to use a PPP connection to install the system? No
    10. [screenshot] Choose the method apt should use to access the Debian archive: http
    11. [screenshot] Use non-US software? Yes
    12. [screenshot] Use non-free software? Yes
    13. [screenshot] Use contrib software? Yes
    14. [screenshot] Select a country: United States
    15. [screenshot] Choose a Debian mirror to use: ftp.us.debian.org
    16. [screenshot] Enter http proxy information, or leave blank for none: Leave blank. (Network access.)
    17. [screenshot] Add another apt source? No
    18. [screenshot] Use security updates from security.debian.org? Yes
    19. [screenshot] Run tasksel? No
    20. [screenshot] Run dselect? No
    21. [screenshot] Do you want to continue? y
    22. [screenshot] Should PCMCIA support be stopped on upgrades? ask
    23. [screenshot] Would you like to start PCMCIA support after installation? No
    24. [screenshot] Do you want to erase any previously downloaded .deb files? y
    25. [screenshot] Select a number from 1 to 5, from the list above. 5

  15. Copy this file to a floppy disk.

  16. Put that floppy disk into the target computer and mount it.

    # mount -v /dev/fd0 /floppy
    [screenshot]

  17. Unpack the debian-etc.tar.gz file from the floppy disk.

    # cd /; tar xzvf /floppy/debian-etc.tar.gz
    [screenshot]

  18. Unmount the floppy disk.

    # umount -v /dev/fd0
    [screenshot]

  19. Install a sensible text editor.

    # apt-get install mc
    [screenshot]

  20. Update the fstab file.

    # mcedit /etc/fstab
    [screenshot]

    Notice /dev/md0 in this file. If you are not using a RAID volume, then you must change it to the the name of the partition that contains the Debian operating system. In most computers, this will be /dev/hda1 or /dev/sda1.

  21. Update the lilo.conf file.

    # mcedit /etc/lilo.conf
    [screenshot]

    Notice both instances of /dev/md0 in this file. If you are not using a RAID volume, then you must change it to the the name of the partition that contains the Debian operating system. In most computers, this will be /dev/hda1 or /dev/sda1.

    (The suggested Lilo configuration is consistent with the usage of install-mbr in the previous chapter, but contrary to most other Linux documentation.)

  22. Mount the proc filesystem

    # mount -v /proc
    [screenshot]

  23. Install the mdadm package. (Skip this step if you have only one disk.)

    # apt-get install mdadm
    [screenshot]

    Answer the questions as follows:
    Do you want to start the RAID monitor daemon? No

    The mdadm package provides tools for managing and monitoring RAID volumes. Automatic fault notifications may be enabled after the MTA is configured.

  24. Install a recent initrd-tools package.

    # apt-get install --target-release testing initrd-tools
    [screenshot]

    The initrd tools are used to start your computer. The initrd-tools package in Debian/woody does not support mdadm-style volume autodetection, so we must use the "--target-release" switch to get a more recent version. As of this writing, the "testing" distribution is Debian/sarge.

  25. Install a kernel package.

    # apt-get install kernel-image-2.4.18-386
    [screenshot]
    [screenshot]

    Answer the questions as follows:
    Install a boot block using the existing /etc/lilo.conf? Yes.

    Note: You may receive modprobe warnings after installing this package. These warnings are safe to ignore. They happen because the running Knoppix kernel is different than the Debian kernel.

  26. Install the discover package.

    # apt-get install discover
    [screenshot]

    The discover program automatically detects hardware and loads drivers when the computer starts. If you do not install this package, or if your hardware is not properly identified, then you can manually specify drivers in the /etc/modules file.

  27. Exit the chroot'd shell.

    # exit
    [screenshot]

    Notice how the prompt changes.

  28. Reboot the computer.

    # reboot
    [screenshot]


The base operating system has been configured. The computer should reboot into the Debian operating system.