Clean Debian Etch Install

My first Linux install was actually a BSD install of OpenBSD and I was quite impressed that nothing was installed except for the operating system. I am now minimalist and when installing operating systems this principal works to my advantage. The ideology is: you only install what is needed and nothing more, thus reducing the surface of attack and lowering wasted process time. So I have put a guide together that was inspired by the Linux how to for “The Perfect Setup – Debian Etch”. This guide was created with screenshots from VMware.

  1. Download the latest current build from the Debian website http://www.debian.org/distrib/. You’ll only need to download and burn the first ISO for CD1, since all the other CDs contain packages that can be downloaded via the ‘apt-get’ command.
  2. Insert the CD and set your BIOS or ‘first boot’ menu to boot from CD. As the CD spins up you will be brought to a prompt with the Debian logo. Debian Etch defaults to install the Linux 2.6 kernel so just hit enter.
  3. [image title=”debian-fig-2″ size=”full” id=”68″ align=”none” alt=”Debian Boot Screen” linkto=”viewer” ]

  4. The ‘Choose language’ screen will appear, select ‘English’ or your preferred language.
  5. [image title=”debian-fig-3″ size=”full” id=”70″ align=”none” alt=”Choose the language Dialog” linkto=”viewer” ]

  6. The ‘Choose country or region’ screen will appear, select ‘United States’ or your preferred country.
  7. [image title=”debian-fig-4″ size=”full” id=”73″ align=”none” alt=”Choose Country or Region Dialog” linkto=”viewer” ]

  8. The ‘Select a keyboard layout’ screen will appear, select ‘American English’ or your preferred layout.
  9. [image title=”debian-fig-5″ size=”full” id=”74″ align=”none” alt=”Select the Keyboard Layout Dialog” linkto=”viewer” ]

  10. The pre-installer will start to scan your hardware, scan the packages available on the CDROM, load the components of the Debian installer, then detect and configure the network with DHCP if detected.
  11. [image title=”debian-fig-6″ size=”full” id=”75″ align=”none” alt=”Pre-Installer Dialog” linkto=”viewer” ]

  12. You be prompted at the ‘Configure the network’ screen, were you will be asked to select a hostname for your system.
  13. [image title=”debian-fig-7″ size=”full” id=”77″ align=”none” alt=”Configure the Hostname Dialog” linkto=”viewer” ]

  14. Then you’ll be prompted with the ‘Domain name’ prompt, were you will select your domain name for your system.
  15. [image title=”debian-fig-8″ size=”full” id=”78″ align=”none” alt=”Domain Name Dialog” linkto=”viewer” ]

  16. The installer will detect all disks and start the partition utility. It is preferable to select the ‘Erase entire disk’.
  17. [image title=”debian-fig-9″ size=”full” id=”79″ align=”none” alt=”Auto Partition Dialog” linkto=”viewer” ]

  18. The next prompt will ask you for a partitioning scheme, again it is preferable to select the default of ‘All files in one partition’.
  19. [image title=”debian-fig-10″ size=”full” id=”82″ align=”none” alt=”Partitioning Scheme Dialog” linkto=”viewer” ]

  20. You will then have a chance to confirm your selection and ‘Finish partitioning and write the changes to disk’.
  21. [image title=”debian-fig-11″ size=”full” id=”85″ align=”none” alt=”Confirm Partitioning Scheme” linkto=”viewer” ]

  22. You’ll be prompted again to write the changes, select ‘Yes’ the default is ‘No’.
  23. [image title=”debian-fig-12″ size=”full” id=”86″ align=”none” alt=”Final Prompt to Write Changes” linkto=”viewer” ]

  24. The installer will ask for your time zone, enter the desired time zone.
  25. [image title=”debian-fig-13″ size=”full” id=”87″ align=”none” alt=”Time Zone Configuration Dialog” linkto=”viewer” ]

  26. The installer will ask for the root’s password (privileged user account).
  27. [image title=”debian-fig-14″ size=”full” id=”88″ align=”none” alt=”Root Password Dialog” linkto=”viewer” ]

  28. You will need to type the password again for confirmation.
  29. [image title=”debian-fig-15″ size=”full” id=”89″ align=”none” alt=”Root Password Confirmation” linkto=”viewer” ]

  30. You will also be required to create an initial user (non-privileged user account) account.
  31. [image title=”debian-fig-16″ size=”full” id=”92″ align=”none” alt=”Non-Root Account Dialog” linkto=”viewer” ]

  32. You will need to supply a login name for the account.
  33. [image title=”debian-fig-17″ size=”full” id=”93″ align=”none” alt=”Login Name Dialog” linkto=”viewer” ]

  34. Set the password for this user and confirm it like the previous account.
  35. [image title=”debian-fig-18″ size=”full” id=”95″ align=”none” alt=”Non-Root Password Dialog” linkto=”viewer” ]

  36. The system installer will begin installing the entire system now.
  37. [image title=”debian-fig-19″ size=”full” id=”96″ align=”none” alt=”System Installation Dialog” linkto=”viewer” ]

  38. The package manager will now require configuration, select ‘Yes’ for a mirror.
  39. [image title=”debian-fig-20″ size=”full” id=”98″ align=”none” alt=”Select a Mirror Dialog” linkto=”viewer” ]

  40. Choose ‘United States’ for the mirror’s country or your country.
  41. [image title=”debian-fig-21″ size=”full” id=”99″ align=”none” alt=”Mirror Country Dialog” linkto=”viewer” ]

  42. Choose ‘ftp.us.debian.org’ or the first mirror that appears for you prior selection.
  43. [image title=”debian-fig-22″ size=”full” id=”100″ align=”none” alt=”Select Mirror Dialog” linkto=”viewer” ]

  44. Select ‘Enter’ if you are not using a proxy.
  45. [image title=”debian-fig-23″ size=”full” id=”102″ align=”none” alt=”Select Proxy Dialog” linkto=”viewer” ]

  46. The developers ask that you participate in a feedback survey, for this how-to we will answer ‘No’.
  47. [image title=”debian-fig-24″ size=”full” id=”103″ align=”none” alt=”Feedback Survey Dialog” linkto=”viewer” ]

  48. Unselect all software using the spacebar and arrow keys and select ‘Continue’.
  49. [image title=”debian-fig-25″ size=”full” id=”104″ align=”none” alt=”Select Software to Install Dialog” linkto=”viewer” ]

  50. Answer ‘Yes’ to the Grub loader screen, this will install the boot manager of Grub on the system; this is used for emergency purposes.
  51. [image title=”debian-fig-26″ size=”full” id=”106″ align=”none” alt=”Grub Install Dialog” linkto=”viewer” ]

  52. Finish the install by selecting ’Continue’.
  53. [image title=”debian-fig-27″ size=”full” id=”107″ align=”none” alt=”Finish the Install Dialog” linkto=”viewer” ]

  54. You will reboot and see the Grub boot loader.
  55. [image title=”debian-fig-28″ size=”full” id=”108″ align=”none” alt=”Grub Boot Screen” linkto=”viewer” ]

  56. You can now login as ‘root’ with the password you supplied for ‘root’.
  57. [image title=”debian-fig-29″ size=”full” id=”109″ align=”none” alt=”Initial Login” linkto=”viewer” ]
    Now that we have an installed and running system we need to tweak a few settings. The network was installed and DHCP had been automatically configured, however since this will be a server DHCP is not the right choice; we will need to manually configure an IP address.

  58. Edit ‘/etc/network/interfaces’ by typing:
    nano -w /etc/network/interfaces# This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    #auto eth0
    #iface eth0 inet dhcp

    auto eth0
    iface eth0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

  59. Set the resolver for proper DNS servers.
    nano -w /etc/resolv.confsearch foo.com
    nameserver 192.168.1.3
    nameserver 192.168.1.4
  60. Next you will need to restart the network component.
    /etc/init.d/networking restart
  61. Add your new static IP to the hosts table.
    nano -w /etc/hosts

    127.0.0.1 localhost.localdomain localhost debian

    192.168.1.2 debian.foo.com debian

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

  62. Set the system’s hostname.echo server1.example.com > /etc/hostname
    /bin/hostname -F /etc/hostname
  63. Install some needed software packages and services.apt-get install wget bzip2 rdate unzip zip ncftp nmap lynx fileutils dnsutils
    apt-get install tcpdump less make tftp rdate file gcc g++ ssh
  64. Sync the time with an atomic clock.crontab -e

    # update time with time.nist.gov
    0 3,9,15,21 * * * /usr/sbin/rdate time.nist.gov | logger -t NTP

  65. Set up the ‘bashrc’ file.nano -w /root/.bashrc

    # ~/.bashrc: executed by bash(1) for non-login shells.

    export PS1=’\h:\w\$ ‘
    umask 022

    # You may uncomment the following lines if you want `ls’ to be colorized:
    export LS_OPTIONS=’–color=auto -h’
    eval “`dircolors`”
    alias ls=’ls $LS_OPTIONS’
    alias ll=’ls $LS_OPTIONS -l’
    alias l=’ls $LS_OPTIONS -lA’

    # Some more alias to avoid making mistakes:
    alias rm=’rm -i’
    alias cp=’cp -i’
    alias mv=’mv -i’

    # Bohack’s stuff
    alias nano=’nano -w -K’
    alias pico=’nano -w -K’
    alias ptree=’ps axf’

    PS1=’\[\033[36;1m\w \[\033[35;1m\h \[\033[0m\$ ‘
    export PS1
    export GREP_OPTIONS=”–color=auto”
    TERM=xterm-color
    export TERM
    cd /

Done! You now have a minimal install of Debian as a clean install. Don’t forget to do an ‘apt-get update’ and an ‘apt-get upgrade’, to install any major/minor updates.

2 thoughts on “Clean Debian Etch Install”

  1. Bruno Fath

    Wow, Awesome post – Clean Step by Step Debian Etch Install | Bohack was a wonderful read. I’m such a newbie when it comes to all this, Thanks for this!

  2. Migdalia Tecklenburg

    It is sweet that you blogged about this. I found you on google and I had been searching for info about this. Nice blog, thank you for the info. I will return to check for new info

Comments are closed.