Installing any operating system on a desktop computer, whether it be Microsoft Windows, MacOS X, Debian GNU/Linux, or anything else, can occasionally be an exercise in frustration. That is particularly true if you are unfamiliar with the installation process for the operating system you're installing or, worse yet, unfamiliar with the operating system entirely. Microsoft has conquered this problem to some extent by ensuring that when you go to a retail outlet to purchase a computer you'll be able to buy one with Windows pre-installed. Apple has solved the problem to an even greater degree by ensuring that its Macintosh computers are sold as hermetically sealed "black box" appliances with everything pre-installed and preconfigured.
Linux distributions do not really have such solutions. There are places you can purchase a computer with some Linux distribution already installed by the vendor, of course, but they are few and far between -- and Linux-based operating systems are designed specifically with the expectation that the user may want to monkey around with their innards.
The real problem is that people trying to make the transition from Windows to Linux are often not willing, able, or well-enough informed to buy a system with Linux pre-installed. Often, they want the process of getting a usable computer running to be as simple and brainless as possible. Every day someone takes a whack at installing some Linux distribution on a computer and ultimately gives up out of frustration. Even self-described "power users" and "experts" often have this problem, because they are dealing with an operating system with which they are not familiar.
Surprisingly, people who haven't used Microsoft Windows since Windows 95, and who have found themselves suddenly needing to install Windows XP, have had a similar experience. Being out of practice with Windows, they find the process of installing an unfamiliar operating system daunting. What do you do?
For the new user of Windows XP, you probably talk to the family computer geek or give up and buy a new computer to avoid the hassle, but if you are trying to install a Linux distribution you might try a Linux User Group for help or go to the help forum for the distribution you're trying to install -- or perhaps you try to find a step by step how to with Google. Maybe you try a different distribution to see if the installation process seems more "intuitive" for you. Maybe you give up, and use Windows, and then tell everyone that Linux is too difficult and user-unfriendly for the average user.
Or maybe you read this article, and learn something about the process of installing Debian GNU/Linux.
Getting the installer
Debian may not be the first distribution that comes to mind for a Linux newbie to try out. It has a reputation for being difficult to install, and that reputation was earned by several years of being one of the more difficult distributions to install. The reputation was, unfortunately, deserved. Things have changed, however: with the Stable release of Debian 3.1, codenamed Sarge, the new debian-installer is standard for Debian installs, and it has greatly simplified the process of getting your system up and running.
The installation process for Debian is relatively short. On equivalent hardware, depending on how quickly you make selections and type things like the hostname you assign to the machine and your user account password, you could conceivably install Debian three times in the same time it takes to install Windows XP SP2 once. With that in mind, don't be afraid to start over if you screw something up. Because the base system install is liberally salted with options for backing out of your choices, you should not have to restart the installation process, although the initial configuration part of the install can be restarted without having to do the whole system install from scratch if you must. Additionally, it's easy to change most configuration options after the installation is complete once you learn how. An important point, however, is this: don't be afraid to screw up a little your first time. Take it as a learning experience, and move on.
Some things that you'll need, or that might be useful, are the official Debian Installation Manual, the netinstall CD image, and a computer on which to install it. You'll also need some CD burning software that is capable of burning a bootable CD image to a CD-R, such as the CD recording applications available from Nero and Roxio. The CD recording software provided by Microsoft with Windows XP will not work for this.
Alternatively, you can order a Debian installation CD set for nominal prices from any of a number of vendors, in which case you will receive a 14 CD set including literally thousands of applications to choose from when deciding what software you want to install. The full 14 CD set can also be downloaded as bootable CD images, but if you have a broadband connection suitable for downloading fourteen CD images, I recommend you just do the network install instead. You'll still have access to all the same software during installation as you'd get on the 14 CD set, but you won't have to carry the CDs around with you, and any improvements to the software such as security patches will be included from the moment you install the software rather than needing to be downloaded immediately after install.
The Linux Store is now offering free Linux installation CDs and DVDs, shipped directly to you for no charge. You can request Debian installation DVDs from The Linux Store's free Linux distribution project, as well as installers for a number of other popular Linux distributions. If you have the ability to purchase installers rather than simply requesting them for free, or to download the ISOs and burn them to CD-R yourself, however, you are encouraged to do so to reduce the financial burden on The Linux Store.
There are provisions for setting up an installation server if you want to be able to install many times over a local network without having to use a CD at all, but this is probably somewhat outside the realm of what the first-time Linux user should be attempting. If you are that ambitious, however, have fun with it.
Debian can be installed on a wide range of hardware, including standard x86 Intel-compatible architectures, SPARC, ARM, a number of Macintosh processor architectures, 64-bit processor architectures such as x86_64, and so on. For most users, as of this writing, the x86 architecture for processors such as Pentium or Athlon are most appropriate. When downloading installation CD images for those architectures, choose the i386 option.
This article assumes that a Debian install will be done on a clean hard drive and that it will be the only operating system on the machine, or (if the hard drive has data on it already) that the data on the hard drive isn't anything you need to keep. It is of course possible to install Debian in any number of ways, including as a dual-boot system with Windows on the same machine so that when you boot the computer you can choose which OS you want to use. To do this, you must ensure that there is ample room on the hard drive on which you want to install Debian, outside of the Windows partition, and you may be required to use a Windows-based partition management tool like Partition Magic, or Linux-based partition management software, to resize your Windows partition to make more room.
Partition management software can be found on a Knoppix LiveCD (see this resource -- which also discusses burning bootable CD images -- for more information)While preparing a computer for a multi-boot installation is outside the scope of this article, the installation process once you prepare the system is very similar.
To begin the installation of Debian, you will need to boot from the installation CD. This article will assume you are using the netinstall CD, which you need to insert into the drive before you restart the computer to get it to boot into the installer, just as though you were installing Windows from scratch with a Windows installation CD. You may have to change BIOS settings on your PC to ensure that the computer will boot from CD. Once it boots, however, you should see the splash page for the debian-installer pictured in Figure A.
The screen will tell you "Press F1 for help, or press Enter to boot:", and if you like you can press F1 and look through all the options that are available to you for starting the installation process. If you just want to get the show on the road, however, you should type linux26 in all lowercase letters, and then press [Enter]. The linux26 option ensures that you will get the Linux 2.6 kernel installed; simply pressing the [Enter] key would install the 2.4 kernel. Because the 2.6 kernel includes several enhancements for sound and other subsystems, and includes updated hardware drivers, it will almost certainly be the kernel you want to use for any new Debian install.
One of the options you can use for the installation process is known as the "expert mode". You probably don't want to use this unless you have obscure or nonstandard hardware issues. The expert mode will drop you into a less-friendly installation process similar to what was standard before the advent of the new debian-installer, but it gives you a lot more fine-grained control over the installation process. If at some point something goes horribly awry with your installation process, such as an inability to detect network hardware, you will be automatically dropped into the expert mode for the rest of the install. For the most part, accepting defaults should suit your needs even in expert mode, but you will probably have to deal with the problem that sent you into expert mode in the first place in a non-default manner.
The next screen prompts you to Choose a language:. Highlight the language of your choice and press [Enter] -- probably English if you are reading this article. After installation, if you decide you want to change your language choice or add additional languages, you can enter the command dpkg-reconfigure locales at any time, but for now you should just choose a language to get you started. Next, choose appropriately for Choose a country, territory or area: and Keymap to use:. Assuming you are in the United States and English is your native language, you should not have to do more than press the [Enter] key for each of these screens.
Assuming you have plugged your machine into a DHCP-enabled network, or your ISP provides a simple DHCP configuration if the computer is plugged into a cable modem or similar direct ISP connection, you will not be prompted to configure network settings. If you are using a network with static IP addresses, or otherwise using something other than a standard DHCP-enabled network connection, you will have to provide network configuration options. The needs of your configuration should be relatively self-evident to someone who has configured a static IP network, however. Once this is done, or if it is unnecessary, you will automatically move along to the next step.
At the next screen, you are asked to enter a Hostname:. This is the name you give your computer, which is almost useless in most Windows installs, but is something that should be given careful consideration for a Linux install. You may choose something descriptive or something dramatic (on his last Debian install, this article's author used the hostname "mimir", naming the computer after the well of wisdom from Scandinavian mythology), but make it something you will not mind having to deal with when you browse your network. You can accept the default hostname if you have absolutely no idea what to call the machine, and change it later by editing the /etc/hostname file on the installed system. Though detailed instructions for changing the hostname of your computer are not part of this article, it is a very straightforward process.
After choosing a hostname, you will be prompted to enter a Domain name:, which is just the name of your network. For many home Windows networks, this will be "Workgroup" or "MSHOME". Use whatever name you gave your local network, if you have one.
Next, you come to disk partitioning. You will be prompted to choose a "Partitioning method:" and, assuming you are using the entire hard drive, you should choose the option that says "Erase entire disk:" with some information about your hard drive following it. Obviously, if you are setting up a dual-boot system, you will want to use manual partitioning instead, but we will assume this is a single-OS system.
You will then be presented with three options for how to partition the drive, with the prompt "Partitioning scheme:". The simplest is to install everything in one partition, and this is recommended for beginners by the installer -- but it is probably not what you should actually use. Another option is to set up the system as a multi-user workstation or server, but this is likely beyond your needs, especially since you by no means need to use this option for a computer that will have multiple users and user accounts. The choice most likely to give you positive results will be the "Desktop machine" option. This creates a system partition and a swap partition (for what Windows users call virtual memory, similar to a Windows pagefile), but also creates a separate partition for user data that will be mounted (included in your system's filesystem) at /home. This is useful for a number of reasons, but the most immediate and likely use for it is simply to allow you to keep data and personal configuration options for all users even if you have to reinstall the operating system.
You will then, after choosing "Desktop machine", be presented with a screen that shows the partition configuration the system has created for you. At this point, you can simply accept the defaults, but you might enjoy better performance, reliability, and flexibility if you change the filesystem type for the /home directory. To do this, highlight the line that starts "#6 logical" and ends "/home" (this will probably differ for dual-boot installs and other installations that do not strictly follow the suggestions in this article), and press the [Enter] key. You will be directed to a screen that prompts you to view and change "Partition settings:". Choose the "Use as:" option.
When prompted "How to use this partition:" choose "XFS journaling file system". Some long-time Linux experts may have other preferences, such as ReiserFS or JFS, and each has its strengths. You can read up about them at Wikipedia if you want to know more. XFS is an excellent choice, however, and what is recommended here. After choosing a partition type, you will face the "Partition settings:" prompt again, and can choose "Done setting up the partition" to move on. Back at the main partition configuration screen again, choose "Finish partitioning and write changes to disk". You will be warned that this will cause you to lose any data previously on the drive, and this is the first irrevocable thing you do in the installation process, so be sure you are ready to continue before using the [Tab] key to select "Yes", then press the [Enter] key when it asks "Write these changes to disks?"
At this point, you can grab a cup of coffee while the installer is "Installing the Debian base system". It should be done before you come back, as it is a much quicker process than partitioning and formatting in Microsoft Windows. In fact, if you just sit in front of the computer and wait, you will not be waiting long at all. When it is finished, you will be asked "Install the GRUB boot loader to the master boot record?" This answer will almost always, under nearly any circumstances, be "Yes". For installing the only OS on the system, there should be no reason to avoid installing GRUB to the MBR, and for a dual-boot system you will definitely want to install GRUB to the MBR so that it can manage the initial boot process for both operating systems.
Finally, the installer will tell you "Installation complete". You still have more to do, but the base system software is all on the hard drive and bootable now. In a test installation done while writing this article, the total time elapsed at this point on an ancient and creaking Pentium 2 fileserver was fourteen minutes and change, including the time spent taking notes on the installation process. Choose "Continue" to reboot into your newly installed Debian system and begin initial configuration. Make sure you remove the CD from the drive before it reboots: it should automatically eject the CD tray while rebooting.
You will be greeted cheerfully with the words "Welcome to your new Debian system!" Press the [Enter] key to start configuration. "Is the hardware clock set to GMT?" is the first question you will be asked. Chances are good that the hardware clock is set to local time, or time that is somewhat more local than Greenwich Mean Time (also known as UTC or Zulu Time), so you will probably want to choose "No" here. After making this decision, you will be prompted to "Select your time zone:", and should choose appropriately.
When prompted for a root password, you should choose this very carefully. You can change it later, but you have to know the root password to change it, and it is a good idea to simply choose a good password from the very beginning as your root password is a key element of system security. The root user account is analogous to the Administrator account on a Microsoft Windows machine, but there are some differences. For one thing, Linux (like all Unix-based operating systems) employs very strict privilege separation between user accounts, and as such much more benefit is to be gained from avoiding using the root account as much as possible. It is also much easier to make use of the root account than the Windows Administrator account, without having to first log out of a less-privileged user account, so that you are less tempted to just log in as root all the time.
However, all your work avoiding using the root account so you won't compromise system security can go right out the window when someone cracks your root password and gets full, unfettered access to your computer if you choose a root password that is very easy to guess or crack. There are means to make it exceedingly difficult to even try such a system compromise, but every bit of security counts, and if the root user account is compromised, all is lost. When choosing your root password, keep the following in mind:
- It should be difficult to guess. This means it should not be made up of recognizable words, and it should include numbers, both capital and lower-case letters, and non-alphanumeric characters such as spaces, dashes, underscores, and asterisks.
- It should be more than eight characters long. For purposes of making it difficult to crack or guess, the longer your password is, the better.
- It should be easy to type. You won't like your password, and may end up making it something weaker and easier to crack, if you throw so many mixed-case letters and special characters at it that you just never want to try to type it, or if it is the entire preamble to the Constitution of the United States of America. Making it long enough to be difficult to crack should be balanced against making it short enough to be comfortable typing it, especially since longer passwords make it easier to introduce typos while entering the password, forcing you to start over. Likewise, don't include such a mess of special characters and capital letters that you have to keep hitting the [Shift] key all the time. Practice will tell you what character combinations work best for you in a password.
- It should be something you'll remember. This is very important, because forgetting your root password means it's gone. If you forget another user account password, you can always sign in as root to change the other account's password without having to know it, but you cannot do the same thing for the root account password, so ensure it is something you will remember. I know people who choose passwords using their favorite five-digit prime number, or who take the first letters of every word, and all punctuation, in a common phrase or paragraph -- for instance, "See Dick. See Dick run. Run, Dick, run!" might become "SD.SDr.R,D,r!", though that example is a pretty hairy password to try to type. The upside is that it is difficult to forget, as long as you remember the phrases used. The key is to find your own means of remembering passwords, and ensure you never forget your root password.
When you are prompted to choose your new root password, you will have to enter it twice to ensure there are no typos the first time. This is of course for your protection: if you incorrectly type it while setting it, correctly typing it later will not work.
After setting your root password, you will be asked to "Enter a full name for the new user:". This is you. You can enter your full legal name, a nickname, or whatever you like. Next, however, comes the username for your normal user account. This should be something you will remember, but does not need to be long, complex, or terribly difficult to guess because it is just your username on the system. It should definitely not be annoying to type.
When prompted to "Enter a password for the new user:", you should follow much the same guidelines as for the root user account. If one of them is going to be easier to remember than the other, it should be the root account, but if one of them is going to be easier to guess, shorter, or easier to type than the other, it should be this password. This is the password you will be using most often, and the one that can do the least damage if someone else cracks it. As with the root password, you will be required to enter it twice.
You will be asked to specify an "Archive access method for apt:". The Debian Advanced Package Tool (APT) is the software management system you will use to add, remove, patch, and upgrade versions for software you use on your Debian system, and this step tells your system where to get its new package versions.
You will only want to choose CDROM if you are not going to have broadband access to the Internet and want to do all your software management from the fourteen disk install set. The http option runs just slightly faster than the ftp option, usually, but the ftp protocol is stateful, and checks download integrity when you are getting patches and new packages -- and you will probably never notice a speed difference anyway, since the difference is miniscule. As such, you should choose "ftp" as your archive access method unless you have a compelling reason to do otherwise.
For "Mirror country:", if you are in the United States, you will of course probably want to choose "United States". A mirror in the same country usually means faster access and shorter download times. The first four or five mirrors listed when it is time to "Choose the Debian mirror to use:" are generally very reliable and provide fast access times. Accepting the default should work just fine.
You will then arrive at a point where people often do something that might be a mistake. You will see a screen like the one shown in Figure B, with the prompt "Choose software to install:". It is tempting to choose something here, especially that "Desktop environment" option, but don't. You can, if you really want the full-on kitchen-sink installation, but one of the strengths of the Debian distribution is that it makes running a lean system with all the software you want, but not one thing more than you actually use, very easy. Choosing any of these installation types will ensure that you have dozens, if not hundreds, of packages installed that you're unlikely to ever use. Don't worry: you will be able to install all the software you like later. Highlight "Ok" when you are done, and press the [Enter] key.
|Don't choose any packages here|
At the "General type of mail configuration:" prompt, choose "local delivery only; not on a network" unless you have specific mail configuration needs beyond those of most desktop computer users and simple server systems, such as file servers. For instance, if you intend to set up a mail server, you will want a different configuration than the local delivery option, but that is beyond the scope of this article and people new to Linux will probably not be using the installed mail transfer agent for anything beyond receiving local system messages.
Depending on your system configuration, and whether you have been dropped into expert mode for installation, you may have to make some more decisions for mail configuration. This is one of the most confusing parts of expert installation for new Linux users, so it warrants some special attention. It is best, generally, to keep the default mail transport agent for Debian, called exim, configured to use a single configuration file, and to choose "mail sent by smarthost; received via SMTP or fetchmail" when prompted. You can always revisit mail configuration after installation with the command dpkg-reconfigure exim4-config as the root user if you have messed something up during this process, or simply want to change the behavior of the mail transport agent.
The default for "Root and postmaster mail recipient:" is the normal user account you created. This is a good choice, and should be selected if you don't have some other specific need.
Finally, you will see the message "Thank you for choosing Debian!"
Congratulations. You now have a functional Debian GNU/Linux OS installed. Press [Enter] to get to a login screen, and log in. You will probably want a little more than the lean and mean OS install you currently have. Most home desktop users will desire a Graphical User Interface, which in the Linux world means the X Window System and a Window Manager, such as the popular GNOME and KDE, the high-performance Enlightenment and WindowMaker, the responsive XFCE, and lightweight low-resource alternatives such as IceWM and Fluxbox.
Office suites such as OpenOffice.org or KOffice will be must-haves for many, as will Web browsers such as Firefox or Konqueror. You may desire a graphical e-mail client, such as Thunderbird or Evolution, and perhaps even digital image editing software like the GIMP and desktop publishing software such as Scribus. CD burning software like K3b, and ripping software such as Grip, RipperX, and Jack make for excellent companions to music playing software such as the extremely popular XMMS.
A plethora of command line equivalents, often offering better performance and greater flexibility in exchange for the absence of a pretty graphical interface, are also available. For installing such graphical user interface and console-based software on your new Debian system, you will probably want to read about, and learn to use, the Advanced Package Tool -- one of the best reasons to use the Debian GNU/Linux distribution.
Chad Perrin is an IT consultant, developer, and freelance professional writer. He holds both Microsoft and CompTIA certifications and is a graduate of two IT industry trade schools.