The Detail Guide To Perform A Debian 5.0 Network Install

Almost two years after Etch, Debian is putting the much-anticipated Lenny release on the proverbial shelves.  There are some pretty nice new features in this release. In this article, we’re going to cover installation, basic setup, disk encryption, and try out some of Lenny’s new moves.


Before we begin, I’d like to put in a quick word about Debian.

Most operating systems these days come in pre-arranged all-in-one packages. This is true of systems like OSX, Windows, and most Linux distributions like Ubuntu. The analogy I prefer to use is to liken these systems to a toy house. It comes pre-assembled in a ready-to-use package.

Debian, on the other hand, is more like a box of Legos. You get all the pieces you need to build your own toy house any way you like.  This can mean more work, and your finished product might not be as shiny as a pre-built toy house, but you get complete control over the end product.  You choose the size, number of rooms, the furniture, etc.  It’s quite likely that when you’re finished with the setup, your “house” might not look much like the next guy’s. To me, having that flexibility right from the start is one of Debian’s major advantages over pre-built systems.  Before I stretch this analogy to the breaking point, let’s get started.

Hard drive installation

There are LOTS of ways to install Debian. The normal would probably be downloading the full 700MB CD and installing everything at once. For this guide, we’re going to do things a little differently and install from a minimal boot CD and download all the packages as needed.

Get it

Doing your install from the minimal CD has a few advantages over using the full installation CD/DVD. For starters, you don’t have to wait to download the whole CD, burn the whole CD, then install all the packages, just to download their updates a few minutes later. Instead, you just pull everything as needed from the repositories.

That brings me to the next advantage, you only have to download what you’ll actually use. Personally I don’t use Gnome or KDE, so I see no reason to wait for them to download/burn/install/update. You can get the minimal Lenny iso from here and burn it as an image file to a CD. Reboot onto the CD and you’ll get the standard boot screen. As we’re running this install from the minimal CD, it won’t be nearly as pretty as, for example, a graphical Ubuntu install.

Startup screen

Choose Install and move on to the next screen. Go ahead and pick your language and region. The installer will attempt to detect your hardware, including network interfaces.

Installing Debian 5

The next screen you’re likely to see is choosing a hostname. Chances are, you can make up whatever you want.  If you were in a situation that required a particular hostname, you probably wouldn’t need me to tell you. The same goes for domain name, I usually set mine to josh.lan.

Now it’s time to pick a local mirror. After choosing your country, you’ll be asked which mirror to use.  You can’t always tell where they are from the server name, but there are a lot of colleges on there so you might recognize one near you.

Picking a mirror

Now that we know where the rest of the system is coming from, we can proceed with the install. Enter proxy information on the next screen, if necessary. If you don’t know, then it probably isn’t necessary.

Once it downloads the rest of the installer components, it’ll ask for timezone. The new Lenny installer includes NTP support, so it syncs up online for perfect time right away.

Now comes partitioning. This can be kind of a big topic, a bit too big for this guide. You may want to refer to to partitioning guide before you carry on. In this guide, we’re going to use the whole disk, with encryption. That will wipe out ALL the data on the hard drive it’s going into. If in doubt shut down, unplug any hard drives you don’t plan to wipe and start over.

Choosing guided partitioning with encryption

Then select your hard drive.  The installer will then ask you how to partition your drive(s).  If you’re not sure, go with All files in one partition. Reminder:  if you chose to use the whole disk, all data currently on that disk will be lost.

Choosing partitioning options

You may have noticed from the screenshot, I’m installing mine from a virtual machine into a 2 GB virtual partition.  For more info on using virtual machines for OS installs, check out Damien Oh’s article, How to Install Windows In Ubuntu Hardy with VirtualBox.

The installer will confirm that you want to write your changes to disk. Once you’re sure you’re doing the right thing, proceed with the install. It will erase all data currently on the drive/partition first. This, on my machine, took a really long time, but that may be because I’m running the installer in an unaccelerated virtual machine on an old desktop. Your mileage may vary. If it takes an outrageously long time, you can cancel this step. It’s mostly a security precaution.

Following the drive erasure, you will be asked to enter an encryption passphrase. As the screen says, longer is better, but make sure you don’t forget it, or you will not be able to access anything on the drive. Next the installer will ask you to confirm your partition scheme. If you chose, as I did, to let the installer do the partitioning for you, then just accept what it has decided.

Final Partitioning Screen

Continue through the installation screens and, presuming they’re correct, allow the installer’s proposed changes to your disk.  Once your disks are partitioned, the installer will download and install the base packages for your system. Once it’s finished you’ll choose your root password. Choose your root password wisely and make sure not to lose/forget it.

Next you’ll set up the user account you’ll actually be using on your system. Pick whatever user/pass combination you like and proceed with the install. You may be asked about (anonymously) participating in the package usage survey. The Debian developers want to know which packages are being used most, so they know where to devote their resources. This is entirely optional.  Personally, I participate in it, as it’s another way to help improve Debian.

At this point the installer will ask which package groups to install on your system.  This is what has the biggest impact on the time it takes to install, and how much space your finished system will take up.  You can remove everything on this list to have a minimal install, or choose the groups you think you’ll want. I want to set up my own desktop environment, so I’m unchecking “Desktop environment” but leaving “Standard system”. That will give me just a base set of tools that I can use to construct the rest of the system any way I wish.

Choosing package groups

Now is the real system installation step.  The installer is fetching the packages from the mirror you chose earlier, as well as installing and configuring those packages. This could be very fast or very slow, depending on how much software it’s fetching and the speed of the mirror it’s fetching from.

When everything is finished, we have one last step, installing the bootloader. Debian does a great job of auto-detecting other operating systems currently installed, and will set up the boot loader accordingly. Chances are, you can say Yes without worrying too much about it. And now we’re done with the install!

Go ahead and reboot your system when the installer tells you to. After the first bootloader screen, you’ll be asked for the encryption passphrase you set up earlier. You didn’t forget it, did you?

The next step that we are going to do is to configure it for optimal performance.

Configuring Debian 5

Once everything finishes booting, you’ll be brought to a text-based login screen where you can enter your user/pass. JUST THIS ONCE it’s probably a good idea to log in as root, since sudo may not yet be installed. In case you don’t already know, logging in as root is generally NOT recommended. One fat-fingered typo could potentially hose your system. Once we get sudo installed we’ll switch to normal user mode.

Initial boot screen

Now my favorite part, deciding exactly which packages should be installed.  There are a few things you’ll almost certainly want installed, and plenty of optionals.  Here are the ones you’ll almost certainly want..

  • xorg – The base graphical system
  • iceweasel – Debian rebranding of Firefox (see this link for details on the rebranding)
  • sudo – Tool for running individual commands with root privileges

…as well as, most likely, a window manager/desktop environment. Some common options are (pick one)…

  • wmaker
  • fluxbox
  • lxde
  • xfce4
  • gnome
  • kde

… and of course some desktop software

  • vlc -Video Player
  • amarok -Audio Player

If you want a graphical login screen instead of the black and white text, also get GDM (if you plan to use Gnome) or KDM (if you plan to use KDE). With Lenny, Debian recommends using aptitude instead of apt-get. Either should work fine, but don’t mix and match. For my system, I’m installing my packages with:

At this point I suggest that you look for a quick guide on setting up sudo.  The most basic way to get it up and running is to install the package and then run the command

to edit the config file.  It will open your default text editor to sudo’s config file.  At the end of the file, add the lines

And save the file.  This will give that username the ability to run commands as root.  This is the most basic setup for sudo, and I would once again recommend looking for a more detailed guide online to help set up more options and improve security.

Now that I’ve got my essential software, I can reboot to access my desktop. If you don’t want to reboot, just logout of root, log back in as yourself, and type

to bring up your desktop. Continue to install whatever other software programs you require with aptitude or apt-get.  If you prefer a graphical tool to handle your package management, try Synaptic.

Finally, you may want to reduce the space that’s been taken up by the system.  There are many safe, effective ways to reduce clutter in Debian.  For some useful info on trimming down the hard drive usage, check out 8 Ways to Maintain a Clean, Lean Ubuntu Machine.  That article was written for Ubuntu but almost everything in there applies to Debian as well.


  1. I would have liked to see more information about the “software selection” step since i am a first time user.

Comments are closed.