Article
Getting to Know Debian
Page: 1 2
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 /dev/hd(n), where 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.
Installing Packages
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.
Post-installation Setup
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:
pon <accountname>
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:
auto eth0
iface eth0 inet dhcp
You can then grab an IP address by restarting the Debian networking:
/etc/init.d/networking restart
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:
apt-get update
You can then upgrade the entire distribution with:
apt-get dist-upgrade
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.
Conclusion
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.
- Debian Homepage - http://www.debian.org/
- Linux Documentation Project - http://www.tldp.org/
- Debian Planet - http://www.debianplanet.org/
- apt-get.org - http://www.apt-get.org/