In these times of fast paced computing and burgeoning bandwidth, one Operating System stands out from the rest — Linux.
Of the many Linux distributions available, one of the most endearing is the Debian. Although the other distributions are largely commercial affairs, Debian changes the recipe. Every piece of software that’s part of the Debian distribution is about as free as you can get. Debian does not contain any commercial software.
Although you may see this determination to ensure that Debian is totally free as being a little extreme, it makes sense in the long term. There is a distinct possibility that some Linux vendors may close up shop, change their business direction or adjust their practices in some other way. Thus, the distribution you use today may not be around in 10 years.
This is not the case with Debian. The Debian project is entirely volunteer-run and doesn’t seek to generate profit. This essentially means that, while the will is there to continue to improve Debian, the project will always progress, irrespective of economic matters.
This article will take a look at Debian, what it can do and a guide to installing it.
The Benefits of Debian
In addition to the long term benefits we’ve just discussed, there are also a number of distinct technical advantages to using Debian, the first of which is its wide availability. Debian is freely available from the Internet, and on CD. There are no sign-up forms to complete, nor any convoluted processes to follow in order to obtain the software.
But possibly the biggest attraction to Debian is its software upgrading tool, apt-get. Anyone who has used other Linux distributions will be familiar with the tool RPM. RPM was originally developed by Red Hat to package pre-compiled software so that it could be installed easily, and without the user having to compile the source code.
Although good in theory, in practice the RPM technology experienced problems with dependencies. A dependency occurs when a piece of software requires the running of another piece of software, in order for it to function. Let’s imagine we wish to use the GIMP, for example. This package requires that we also run wget, aalib, libc6, libgimp, libglib, libgtk, xlibs and others. Obviously, finding all these packages (and, in turn, their dependencies) is a frustrating and time consuming process, and it’s not surprising that the term “dependency hell” has been coined to describe this scenario.
Debian by-passes this process, thanks to apt-get. In apt-get, the developers have created a powerful tool, which, when a package is installed, will automatically have Debian retrieve all dependencies and install them in the correct order. So, in our previous example, I could install GIMP with a single command — I wouldn’t have even had to find the GIMP download file! Debian will retrieve the package direct from its servers.
Debian isn’t just a handy system for upgrading software, though. It offers a variety of tools that make the tasks of compiling kernels, configuring packages and handling modules (to name a few) very easy. Debian is by no means a beginners’ system, however, and offers users no GUI wizard-led walkthroughs, but if you have a brave streak in you, or you’ve already had experience with Linux, it’s a wise choice.
Let’s take a look at some of the key concepts involved in Debian’s installation. This discussion is meant only as a guide, as we don’t have the space to cover the entire process in depth. It’s suggested that you use these guidelines in conjunction with the documentation included with Debian, and presented on the Debian Website.
As it’s a community-driven project, Debian is generally fairly easy to get hold of. There are a variety of installation methods available, including network installation, CDROM, boot floppies and more. The easiest of these is to create your own Debian installation CD (or buy one from a Linux vendor).
To create an installation CD, we first need to obtain an ISO image. This ISO file describes the exact contents of an installation CD, so that it can be burned to a CDROM. There are 7 Debian installation ISOs in total, but only the first is needed for installation. I recommend you simply obtain the first ISO, and retrieve any other required software over the Internet, using apt-get. To find the ISO images you need, visit http://www.debian.org/CD/http-ftp/.
The Debian project will allow you to download the ISO images from the mirrors listed on that page, or you can use the Jigdo application to more clearly specify how your ISO is assembled. See http://www.debian.org/CD/jigdo-cd/ for more. Although Jigdo is a better solution, I recommend that new Debian users get a normal ISO, to smooth the installation process.
One important thing to point out here is that Debian comes in 3 versions: Stable, Testing and Unstable. The stable version contains older software, but has been through a rigorous testing procedure that has no outstanding bug reports. Debian’s testing version is newer, but the packages included here have gone for 10 days with no bug reports (so it is, generally-speaking, a stable system). The unstable system contains new packages that go straight into Debian, and may have problems that need to be fixed.
The unstable version is only recommended if you know what you’re doing. I suggest that you use the Stable or Testing versions.
Once you’ve found the ISO image(s), you’ll need to burn them to CD. This can be achieved in Windows with most CD burners, by selecting the menu’s Burn CD From Image option. In Linux, you can burn the CD using the following command:
cdrecord fs=12m speed=4 isoname.iso
Booting the System
Once you’ve burned your ISO or purchased an existing Debian CD set, pop the CD into your CDROM drive and restart the machine. You may need to reset some options in your BIOS to ensure you can boot from a CD. If all goes well, you will be presented a screen containing a lot of text. You can then press Enter to continue and boot the installer.
Having booted the installation program, you’ll see a blue screen from which you can begin to proceed through the installation. You’ll be asked a series of simple questions, such as which Country you’re in, your keyboard layout, and more. You can use the Tab key to move between options, and the Enter key to select options as answers to these questions.
Setting up Partitions
At some point in the installation process, you’ll be asked to partition your disk. This is an important step, so you should be clear about where you want to put Debian before you reach it.
The Debian system uses 3 base partitions; a ‘
boot' partition that holds the kernel, a ‘
/‘ partition that holds the filesystem and associated files, and a swap partition that’s used when system memory is exhausted. There are other mount points available (such as ‘
/home‘ for keeping your home directories on another partition), however, the 3 I just described are suitable for a beginner’s set up.
Something else you’ll need to take into consideration is whether or not you’re dual booting your machine with another OS, such as Windows. If you are, I recommend that you keep each OS on a different disk, though, if you are keeping them both on the same disk, Debian will simply make use of the free space.
First, you’ll be asked which disk to partition. Linux refers to each as
n refers to a letter (e.g. the first disk will be
hda). SCSI disks are treated slightly differently, but have a similar naming concept. When you’ve selected which disk to partition, you’ll enter cfdisk. This utility allows you to create a partition and set its type. Create a
/boot partition of about 50MB, and set its type to Linux. The swap size should be set to twice the amount of RAM you have, its type should be Linux Swap, and your ‘
/‘ partition should take up rest of the free space. Also, ensure your 50MB partition is bootable.
Although you have created the partitions, you are yet to set the mount points (such as /boot). Debian will ask which partition you wish to set a mount point on, and you can then set the appropriate point to the relevant partition.
Setting up Modules
After these initial steps, you’ll be asked to set up modules for your devices. If you are aware of which modules your devices require, you can select them from the different categories displayed. However, if you’re unsure of which modules you require, you can browse through the categories until you find the appropriate modules. If your device is not listed, it’s likely you will need to recompile a kernel that includes your device. This can be done after installation.
When you have configured your disk and modules you will be asked to restart the system, and the installation will continue. In this latter stage of installation, you’ll be asked to select the packages you want to install. Simply select the different packages you need, and the installer will install them straight from the CD.
This part of the process generally splits the applications into task lists (a bit like groups of packages). If you select a group, such as C++ Programming, you’ll get a C++ compiler, libraries and so on. You may also need to install other groups, such as text editors, though. I suggest that, if you can, you install everything (assuming that you’re working on a desktop machine) and then remove unwanted packages later.
Setting Up Accounts
Another important part of the installation routine is the user and root account setup. Debian, like other Linux distributions, has a main super user called ‘root’, which can perform system maintenance such as upgrades and configuration. Normal users should be set up their own account, which is somewhat more restricted than root.
During the installation process, Debian will ask for the root password and have you create an account. Once you’ve created an account, you’ll be all set to log into your system after installation. Further accounts can be created in Debian with the ‘adduser’ command.
When you have completed the installation routine, you will be presented with a Login screen. At this point you can log into the system and begin using it. Although the system is installed, there are many other things you’ll want to set up and configure. Unfortunately we don’t have the time to cover all these items here, so instead, I’ll cover the main areas: getting online and upgrading your system.
Getting online depends on the hardware you use to connect to the Internet. The most common options are the humble modem, and the cable modem. Setting up a modem is a fairly simple process. You will need to know which port your modem is on, and have your login details handy. The port number will most likely be in the form of
/dev/ttyS(n), where n refers to your port number.
You can use a variety of programs to set up your modem or edit the files directly, but I recommend the pppconfig program. Using this command line program, you can specify your connection details, such as telephone number, username and password, and the program will attempt to detect your modem. The program also offers a variety of advanced settings with which you can better configure your connection. This setup assumes you’re using an external modem. You’ll need to configure an internal modem with the kernel first. Debian may have autodetected it, but if you have trouble, there is plenty of help on the ‘net.
When your modem is set up, you can connect by typing:
You can use ‘
poff‘ to disconnect.
Setting up a cable modem is a little different in the sense that it’s always on, and simply needs to grab an IP address using DHCP. Various cable modems may need different drivers (a quick Google search should help here), and there may variations in the set up and connect processes, but generally you just need to edit the /etc/network/interfaces file. Add the following lines:
iface eth0 inet dhcp
You can then grab an IP address by restarting the Debian networking:
Upgrading Your System With apt-get
As we discussed earlier, one of the strongest elements of the Debian distribution is the ease with which you can upgrade the system. But before you can upgrade, you first need to configure the Advanced Package Tool (apt). If you type apt-setup at the prompt as root, you can set the location of the apt servers from which to retrieve packages. When this process has finished, you can update your list of available packages using this command:
You can then upgrade the entire distribution with:
You will be shown how many — and which — packages will be upgraded, and how much data needs to be downloaded. You can stop this download if you need to, after which apt will resume without losing your downloaded packages. As well as upgrading the entire distribution you can search for packages with ‘
apt-cache search <term>‘. As an example, if I want to search for maths-based programs:
apt-cache search maths
You will then be presented with a list of packages. If you see a package you wish to install such as mathwar, type:
apt-get install mathwar
You can also remove it with:
apt-get remove mathwar
Finally, to change which version of Debian you’re using (Stable, Testing or Unstable), just edit
/etc/apt/sources.list and change the word ‘
stable‘ to ‘
testing‘ or ‘
unstable‘. You will then need to perform an update of your package list, and a distribution upgrade, to completely upgrade your system. One warning, though: downgrading is generally not a good idea; it is possible, but it’s not recommended.
This article has taken a brief look at the various issues and processes involved in installing the Debian distribution. As I said at the start, Debian is by no means a beginners’ distribution. It involves a number of more complex steps to really get the package running, although it ultimately benefits from increased flexibility. This short article alone may not be enough to guide you fully through the process of installing Debian, though it has covered the major areas you’ll need to be aware of.
Debian is a Linux distribution that is stable, powerful and here to stay. The system is growing every day, and offers over 8710 packages for installation. The time it will take you to learn the system will truly pay off, and to get you started, here are a few valuable resources.