After reading many of the posts regarding the recent OSNews story, “An Unbiased Review of Debian 3.0“, I thought this article may be useful to those who would like to try Debian, but are a little intimidated by its installer. Several of the posts to the above mentioned story indicated that Debian’s installer was a huge hurtle for many people, who would otherwise like to try it. I have found Debian to be the most useful flavor of Linux, so I wanted to write an easy, though somewhat long, walkthrough in the hopes of allowing a wider audience to experience first hand this stable and unique Linux distribution.
This walkthrough does not cover every last facet of installing Debian, but it is quite thorough, and even painfully detailed. I wrote this with somebody completely new to Linux and Debian, but somewhat familiar with their computers, in mind. I hope people new to Debian find it useful.
Some people complain about the Debian installer not being easy, user friendly, graphical, and so on. This tutorial does not attempt to debate those views, but rather attempts to walk people new to Debian through the installation process; a hand-holding into the world of Debian if you will.
A couple of the things I won’t cover in this tutorial are configuring a USB mouse and installing KDE (the tutorial is long enough as it is). Also, this tutorial is geared more towards people with either high-speed internet connections through a network card in their machine, or people who access the internet via a LAN. I do point modem users in the right direction I think, but I don’t go into much detail regarding modems (mainly since I don’t own one).
I have tried to maintain a standard style throughout this document, but since it is my first tutorial of this magnitude, I may have varied slightly here and there. For the most part, whenever I am discussing commands that need to be typed or selected from a list, I have put them in quotation marks. Please don’t type the “” marks when entering commands at the prompt. If I have varied from this, I apologize in advanced.
Finally, if you follow my instructions, what you will end up with is a very trim installation of Debian; meaning Debian minus all the redundant applications. You will end up with Debian itself, Xfree86, WindowMaker, Synaptic and Mozilla installed and that is it. However, you will also be armed with the knowledge and ability to install whatever else you want to; allowing you to make your Debian system exactly what you want it to be.
Having said all that, let’s get started.
The first step to installing Debian is to obtain Debian CDs. While you can buy Debian CDs from places like Linux Central or Cheapbytes for around $15.00 US, if you have access to a high-speed internet connection and a CD burner, it is quicker and cheaper to get them off the internet at Linuxiso.org.
Linuxiso.org has seven CDs listed for installing Debian, but you only need the first one. If you want to spend the time downloading the entire CD collection, that is okay, but this walkthrough will only make use of the first disk; “Debian GNU/Linux – Disk 1 Generic boot (US)”.
Note: Prior to installing Debian, you must have a place to put it on your hard drive. If you are going to make Debian the only OS on your computer, then you don’t have anything to worry about. If, on the other hand, you would like to install Debian on a machine with another OS, such as Windows, and you want to dual boot between the two, you are going to have to get a program, such as Partition Magic, to shrink your Windows partition to make room for Debian, or you are going to have to get another hard drive to install Debian on.
The bottom line is you need some space (I recommend at least 2GB, although Debian can be installed using a lot less) to install Debian on your hard drive. I will leave it up to the individual reader to decide where that empty partition will come from.
Step 1 (Boot from the Debian CD)
After you have downloaded (or purchased) the first Debian disk, place it in the CD-ROM drive of your computer and reboot your machine (I’m assuming it was already on, or you could not have inserted the CD). If the CD doesn’t boot, then check your BIOS settings. Please consult your motherboard manual if necessary. If your machine simply cannot boot from a CD, you will have to make Debian floppy disks. Please refer to Debian’s web site for instructions on creating these disks.
Debian’s installer is not a linear one like most Linux distributions; per se. It is more like the FreeBSD installer in that you can jump around the installation menu and perform a variety of tasks in no particular order. However, Debian’s installer tries to guide you by highlighting the next logical task in red and placing it at the top of the menu list. We will only have to vary from the installer’s suggestion a couple of times. Step 9 (Initialize and activate a swap partition) Step 15 (Install the base system) Once Debian has finished booting, you will be presented with the “Debian System Configuration” screen. Please read it and then press the Enter key. Step 3 (Removing PCMCIA packages) Step 9 (Selecting your mouse type)
Step 2 (The Welcome Screen)
Once your machine boots, you will be presented with a screen that says, “Welcome to Debian GNU/Linux 3.0!” There are other install options available, which you may read about by pressing
Once you press the Enter key, you will briefly see a penguin at the top-left corner of the screen and some unintelligible (depending on your experience) boot messages; which can safely be ignored for now.
Step 3 (Choose your language)
Wait for the language selection screen with the blue background to appear. This is the first screen of the installer. Select which language you want to use. In my case, this will be English. If yours is English too, select the menu item, “en – Choose this and press Enter to proceed in English”, by using the arrow keys to highlight in it red, and then press the Enter key.
Step 4 (Choose Variant)
On the next screen, “Choose Language Variant”, select your preferred English variant. In my case, I will choose, “English (United States)”. Once you have highlighted your choice, press the Enter key.
Step 5 (Release Notes)
The next screen, “Release Notes”, presents you with a little bit of information regarding Debian. To continue, press the Enter key.
Now you should be at the installer’s main menu.
Step 1 (Configure the Keyboard)
Since it is usually most comfortable for people to install an OS using their preferred keyboard layout, Debian’s installer suggests selecting your keyboard layout as the first task; and so do I.
To select your layout, make sure the, “Configure the Keyboard”, menu item is highlighted and press the Enter key. On the, “Select a Keyboard”, screen, most English speaking users will want to select the top choice; “Qwerty/US: U.S. English (Qwerty)”. Personally, I use the Dvorak layout, so feel free to choose something else if QWERTY isn’t your layout of choice. Once you have selected your layout, press the Enter key to move to the next screen.
Step 2 (Partition a Hard Disk)
You should now be back at the, “Debian GNU/Linux Installation Main Menu”, screen. Notice, however, that the, “Configure the Keyboard”, menu item is no longer at the top of the menu list (although it is still accessible in case you have made a mistake). In its place is the, “Partition a Hard Disk” menu. See, Debian is taking care of you. Press the Enter key to partition your hard disk.
You should now be at the, Select Disk Drive, screen. In the middle of the screen is a box with all of your hard drives listed in it. For those who don’t already know, Linux disk drives are stored as files in the /dev directory and are referred to like this:
Primary IDE device on the primary IDE controller = /dev/hda
Slave IDE device on the primary IDE controller = /dev/hdb
Primary IDE device on the secondary IDE controller = /dev/hdc
Slave IDE device on the secondary IDE controller = /dev/hdd
If you have Windows installed on this machine, or have in the past, /dev/hda will be what Windows refers to as the C:\ drive.
SCSI devices are listed differently. They are usually /dev/sda, /dev/sdb, etc.
The Debian installer is smart enough to detect which of your devices are hard drives, and it will list all of them here on the, “Select Disk Drive”, screen.
On my machine, there are two hard drives, so I have /dev/hda and /dev/hdb listed. I am going to install Debian onto my primary hard drive, /dev/hda, so I will highlight that drive in the list and press the Enter key.
You will now see the, “LILO Limitations”, screen. Debian still uses LILO by default, although it is very easy to install Grub after your system is running. LILO has some issues with booting from hard drives on older machines where the boot information resides above the 1024th cylinder. If you are going to install Debian on the entire drive, this won’t be an issue. However, if you have a Windows (or other OS) partition that extends beyond the 1024th cylinder, and your machine uses an older BIOS, you may have problems booting. I will show you two easy ways to get around potential booting problems later, in case it is an issue for some. For now, this screen is simply warning you about a potential issue. You can safely press the Enter key to continue.
Step 3 – (cfdisk)
You should now be at a black screen that says, “cfdisk 2.11n”, at the top. This is where we will partition our hard drive to prepare it so we can install Debian. Probably one of the most “scary” tasks when installing Debian is partitioning the drive. Debian uses a command line tool called cfdisk, which is really quite simple to use, so don’t be discouraged by its monochrome presentation.
If you look about 1/3 way down the screen, you will see a dashed line that extends the entire width of the screen. The item(s) listed beneath this line are the current partitions installed on your machine. If you want to make Debian the sole OS on this machine, you can delete all these partitions by highlighting them one at a time with the up and down arrows, and then selecting the [Delete] menu item by using the left and right arrows to navigate the menu at the bottom of the screen, and pressing the Enter key. Please note that you cannot delete the “PRI/LOG Free Space ” partition since it is the free space on your hard drive. Also, if you shrunk the partition of another OS, say Windows, and you want to keep that operating system as well as Debian, you need to make sure that you don’t delete any NTFS or FAT32 partitions in this list. If you delete a partition that you didn’t want deleted, simply select [Quit] from the menu at the bottom of the list and start again. You partition changes won’t be written to the drive until you select the [Write] menu.
Once you have deleted all the partitions that you don’t want to keep, you need to make some partitions to install Debian on to. Check your partition list (directly under the dashed line) and make sure that you have an item that says, “PRI/LOG Free Space ”. If you don’t have this menu item, you either have not created free space on your hard drive, or you have selected the wrong hard drive to install Debian on to. If such is the case, you will need to create some free space using a program like Partition Magic, select another drive to install to, or buy and install another drive. Remedy the problem and then return to this point.
Step 4 (Creating the /boot partition)
If you do have, “PRI/LOG Free Space ”, listed in your list of partitions, make sure you have adequate space by looking at the numbers at the far right of this item; in the “Size (MB)” column. Remember to have at least 2GB since anything less limits the fun you can have with Debian. Anything above 2000.00 should be fine.
Now, assuming you have the space, we need to create several partitions. First, we need a small /boot partition. We will create this partition first, and make sure it is at the beginning of the drive (unless you have another OS installed). We do this by highlighting the “PRI/LOG Free Space ” partition using the up and down arrows, and selecting [New] from the menu at the bottom of the screen using the left and right arrows.
You will notice the menu at the bottom of the screen has now changed. It has three items, [Primary], [Logical], and [Cancel]. Select [Primary] and press Enter.
Next, it will ask you to enter a size for the new partition. At the “Size (in MB):” prompt, enter the number 10.
Next, you will be presented with a new menu, [Beginning], [End], and [Cancel]. Select [Beginning] and press Enter.
The partition we just created will hold the boot information. By creating this partition (at least on a drive without another OS on it), we ensure that the boot information will never reside above the 1024th cylinder.
We now must make this new partition bootable. To do that, highlight the partition you just created and select the [Bootable] option from the menu at the bottom of the screen.
Step 5 (Creating the Swap Partition)
Next, we need to create the swap partition. The usual method for doing this is to create a partition that is double the amount of RAM on your machine in size. For example, if you have 128MB of RAM, you would want to create a swap partition that is 256MB in size. I only follow this formula up to 256MB of RAM. If I have more than that, I just make my swap partition 512MB in size.
To create the swap partition, highlight “PRI/LOG Free Space ” in your partition list and select [New], then [Primary], and then enter the size of your swap file using the method mentioned above to calculate the correct size. For example, enter the number “256” if you have 128MB of RAM. Next you will need to select [Beginning], and then you will be back at the main menu.
Now you need to set the filesystem of this partition to Linux Swap, or Linux can’t use it as a swap partition. To do so, highlight the partition you just created (the Linux partition that does not have the BOOT flag set), and select [Type] from the menu at the bottom of the screen.
Once you press Enter on the [Type] menu, you will be presented with three columns of hexadecimal values followed by a description. If you look towards the bottom of the middle column, you will see “82 Linux Swap”. 82 is the hex value we need to choose during this step in order to make our swap partition work. We cannot actually enter this value on this screen, however, so follow the directions at the bottom of this screen, and “press any key to continue”.
On the next screen, you will see three columns of filesystem types again, and at the bottom of the screen you will see the prompt “Enter file system type:” with a default value of 82, which is exactly the number we need to enter. Just press the Enter key here to input the value 82. You should now be back at the main menu.
Look at the partition list, and notice that the smaller of your Linux partitions has an FS Type (filesystem type) of “Linux”, and has its boot flag turned on, and the larger of the partitions now has an FS Type of “Linux Swap”.
Step 6 (Creating the root partition)
There are many other partitions that you could create, which I will describe briefly below. However, to keep things simple, I am going to only create one more partition; the root partition.
To create the root partition, highlight “PRI/LOG Free Space ” in the partition list again, and select the [New] menu, then select [Primary], then accept the default size at the “Size (in MB):” prompt (it should be the remaining free space on your hard drive). Now you will be back at the main menu.
Step 7 (Writing the partition changes to the disk)
You have now created all your partitions. However, they have not been written out to the hard drive yet. To write your changes to the hard drive, you must select [Write] from the menu at the bottom of the screen.
Once you have selected [Write], you will see the following prompt, “Are you sure you want to write the partition table to disk (yes or no):”. At this prompt you should type “yes” (just typing ‘y’ wont work), and press the Enter key. There will be a brief pause as the partition table on your hard drive is updated, and then you will be returned to the main cfdisk menu again.
Step 8 (Identify the partitions)
You have now finished creating the partitions and writing them out to your hard drive. Before we exit the cfdisk program, however, we need to prepare in advance for the next step in the install process. Once we exit cfdisk, we will be asked to identify our partitions so Linux knows how to access them. We wouldn’t want a 10GB boot partition and a 10MB root ‘/’ partition, or Linux won’t install. Therefore, we need to write down which partition will be the boot partition and which will be the root (Debian’s installer takes care of the swap partition automatically). For example, in my installation, I have a small boot partition at /dev/hda1 and a large root ‘/’ partition at /dev/hda3 (although they are not actually called that yet).
Once you have identified each partition, select [Quit] from the menu at the bottom of the screen.
A note on partitions: As I mentioned earlier, there are many different ways to partition your machine for running Linux. Here we did a very simple partitioning, which will work fine for most users. However, there are other partitions you may wish to create in the future. Here are a few examples:
Why would you want to create these other partitions? Well, for example, Linux stores log files under the /var directory, and the Debian apt package manager program caches downloaded packages there as well. If you install Linux as we did, using just a root ‘/’ partition, it is possible for someone to attack your machine and fill your root filesystem up with logs in the /var directory and bring your system to a screeching halt. If, on the other hand, you have a separate /var partition, they will only be able to fill that partition up and your root ‘/’ partition will be safe.
I usually create a separate /home partition as well in order to keep my personal files sequestered from the rest of the system.
The /usr directory is where programs are installed. I place my /usr directory in a separate partition if I am spanning two hard drives. I’ll put my /boot, /, /home and /var partitions on one drive, and the /usr partition on the other.
Many Linux books will go into excruciating detail about these directories/partitions if you’d like to read more about it.
You should now be back at the “Debian GNU/Linux Installation Main Menu” again. Notice that the top item in the menu is to “Initialize and Activate a Swap Partition”, which is what we need to do next. Make sure this menu item is highlighted in red and press the Enter key.
Next, you will be presented with the “Scan for Bad Blocks?” screen. If your drive is new, you may wish to do this, however, I usually choose “No” because it takes a long time. Just choose the default, “No”, for now. Highlight “No” and press the Enter key.
Next, you will see the “Are You Sure?” screen. You will want to select “Yes” here or you won’t get too install Debian. Select “Yes” and press the Enter key.
You should now be back at the “Debian GNU/Linux Installation Main Menu” again.
Step 10 (Initialize a Linux partition)
The top item in the Main Menu page should now be “Initialize a Linux Partition”. Make sure this is highlighted in red and press the Enter key.
You should now be on the “Select Partition” screen. This screen shows you the two Linux partitions you created in the cfdisk program earlier. On my machine, they are /dev/hda1 and /dev/hda3. You may be tempted to select the first partition in the list, but this most likely would be the wrong thing to do. Remember when I had you write down the partitions you created in cfdisk? Here is why you needed that information. Although it doesn’t mention it anywhere in the Debian installer, unless you make a mistake, you have to initialize the root ‘/’ partition on any Linux system before you can initialize the partitions under it, such as /boot. Therefore, you need to select the partition which will be your ‘/’ partition now. In my case, this is /dev/hda3. Highlight your root partition (the larger of the two partitions you created) in the list and press the Enter key. (If you’ve followed my directions, and you don’t have another Linux distro already installed on your machine, the partition you should choose will be the bottom one.)
The next screen you will see is the “Scan for Bad Blocks?” screen again. Select “No” just like you did when you were creating the Swap partition.
Now Select “Yes” on the “Are You Sure?” screen just as you did before.
You should now be formatting the partition. This step may take a while if your partition is fairly large. Feel free to stare longingly at the middle of the screen and watch the inode tables being written.
Once the formatting process is complete, you should be on the “Mount as the Root Filesystem?” screen. You want to select “Yes” and press the Enter key.
Step 11 (Initialize the /boot partition)
Here is where we need to vary from the Debian installer’s suggested Next step. The installer suggests that we should “Install Kernel and Driver Modules” next, however, we have not yet initialized the /boot partition. To do so, highlight the second menu item “Initialize a Linux Partition” and press the Enter key.
Unless you have another Linux distro already installed, and assuming you have followed my directions, you should not see the “Select Partition” screen this time. Debian’s installer skips it since you only have one Linux partition left to initialize. Instead, you will be taken directly to the “Scan for Bad Blocks?” screen. Accept the defaults on both the “Scan for Bad Blocks?” screen and the “Are You Sure?” screen as we have done before.
Once the partition is finished formatting (it should be quick since the partition is so small) you should be on the “Select Mount Point” screen. You want to choose the /boot option and press the Enter key.
Step 12 (Install kernel and driver modules)
Now you should be back at the Main Menu. This time, we will take the installers suggestion. Please ensure the “Install Kernel and Driver Modules” menu item is highlighted and press the Enter key.
You should now see the “Found a Debian CD-ROM” screen. This screen is telling you that the installer recognizes the Debian CD in your CD-ROM drive and is asking if you wish to use the packages on that CD to install the system. You can say no and install the system via FTP, but it takes too long. Since you already have the packages available on the CD, select “Yes” on this screen and press the Enter key. Please wait until you are back at the Main Menu again.
Step 13 (Configure Device Driver Modules)
You should be at the Main Menu again. Make sure the “Configure Device Driver Modules” menu item is highlighted, and press the Enter key.
Next, you will see the “Note about loaded drivers” screen. For most systems, you don’t really need to do this step since the important items in your system have been detected and are in the kernel already. I am just going through it in case somebody needs to add something to their kernel. Press Enter to continue.
Now you should be on the “Select Category” screen. The only two categories you may have to worry about is the “net” and “cdrom” categories. Feel free to look through them, but realize that if you booted from the install CD, your CD-ROM drive is most likely supported by the kernel already. Also, my experience has been that all the network cards I own that are listed in the “net” category are found automatically by the kernel. If I try to add them here, I end up with the kernel thinking I have two network cards.
I’m sorry about the long useless trip through this section, but my experience is that you should, on the “Select Category” screen, simply select “Exit. Finished. Return to previous menu.” And press Enter to return to the Main Menu.
Step 14 (Configure the Network)
Next, we need to configure the network so our machine will be able to get to the internet; assuming you are using a broadband solution that uses a network card. On the Main Menu, select “Configure the Network” and press the Enter key.
You should now be on the “Choose a Hostname” screen. You have to choose a hostname for you machine. This is similar to you choosing a Domain or Workgroup name under Windows. If you don’t feel creative, you may accept the default, which is Debian. If you are feeling creative, delete Debian from the text area at the bottom of the screen and enter the name you wish to give to your Debian machine. Once you are satisfied with the name you have chosen, select OK and press the Enter key.
Next, you will see the “Automatic Network Configuration” screen. Since my ISP uses DHCP to automatically dole out IP addresses, I will be selecting that option in this tutorial. If your ISP or network does not use DHCP, you will want to select “No” on this screen and enter the IP address, Gateway, DNS, etc, provided to you by your ISP or network administrator in the subsequent screens.
If you are going to use DHCP, select “Yes” and press the Enter key in order to have your network automatically set up via DHCP. If DHCP is successful, you will be notified in the following dialog. If it was not successful, but you are sure your ISP uses DHCP, check your network cables. If all appears to be correct, but you still can’t connect via DHCP, please contact your ISP for assistance. If you received the message, “The network has been successfully configured using DHCP/BOOTP”, press the Enter key to continue.
You should now be back at the Main Menu. Make sure the menu item, “Install the base system”, is highlighted and press Enter.
The next screen that will come up is the, “Select Installation Medium” screen. Highlight the “cdrom” item and press the Enter key. A dialog will be displayed, which asks you to insert the first Debian CD. Since it is already in the drive, just press the Enter key.
Next, a screen titled, “Select Archive Path” will be displayed. There is only one path choice here, “/instmnt”, so make sure “/instmnt” is highlighted in red and press the Enter key again.
Wait while the base system is installed.
Step 16 (Make the system bootable)
You should once again be back at the Main Menu. Make sure the, “Make System Bootable”, menu item is highlighted and press Enter.
The next screen, titled “Where should the LILO boot loader be installed”, should show you two options (you may have more if you have another Linux distro installed on the machine). If Debian is the only other OS on your machine, or you want to use LILO as the boot loader for all your operating systems, then choose the top option, “Install LILO in the MBR (use this if unsure)”. On the other hand, if you are using a different boot loader, such as System Commander, or my favorite, XOSL, then you need to choose the “Install LILO in the boot partitions boot sector” for the /boot partition you created (you should still have this information written down from one of the prior steps).
If you selected to install LILO to the MBR, the next screen you will see is the “Other Bootable Partitions” screen. You can select “View” to display a list of bootable partitions that the installer has found. If you wish to have all of the partitions in the list controlled by LILO, which you most likely will, then press Enter to go back to the “Other Bootable Partitions” screen and select the top option to have LILO boot these partitions. If you select “Ignore”, you won’t be able to boot your other OSes, if there are any, until you fix LILO.
Next, you will be presented with a screen regarding LILO security. Feel free to read it and then press Enter when you are done.
Step 17 (Creating a boot Floppy)
My machines don’t have floppy drives, but most people’s machines do. I know this article has been long, but if you will recall, at the beginning of this article, I mentioned there were two ways to get around booting problems with LILO. The first way was to create a /boot partition at the beginning of your hard drive, thus ensuring boot information would never reside above the 1024th cylinder. The second way is to create a Boot Floppy, which will be done in this step.
I apologize for not being able to walk you through every screen during this step, but I am unable to do so since I don’t have any floppy drives. However, in a nutshell, you should select the option to create a Boot Floppy now. You will be asked to insert a blank formatted disk, which will then have the necessary boot information written to it. If your system ends up booting correctly, you most likely will never use this floppy disk. On the other hand, if you had to install Debian on the same hard drive as another OS, and you do have booting problems, booting from this Boot Floppy will allow you to use your Debian system. Unlike booting DOS from a floppy, Linux doesn’t suffer any performance degradation from booting in this manner.
Step 18 (Rebooting the machine)
You should be back at the Main Menu again, and ready to reboot your system into Debian Linux. Once we reboot we will perform the final configuration of the system. To continue, please select “Reboot the System” from the menu and press Enter.
Finally, you will see the “Reboot the System?” screen. Make sure to eject your CD-ROM, and floppy if you inserted one, and then select yes and press the Enter key to reboot into Debian.
Upon rebooting, you will be presented with the LILO boot screen (which is an ugly red box). Select “Linux” and press Enter, or wait for 10 seconds or so and LILO will boot Linux automatically.
Step 1 (Configuring the time zone)
The first part of the configuration stage is to set you systems time zone. You should now be on the “Time Zone Configuration” screen. It is asking you whether your system clock is set to Greenwich Mean Time or Local Time. Most PCs are set to local time, so you want to select “No”, which is not the default, and press the Enter key.
The next screen, which is also titled “Time Zone Configuration”, shows a list of countries or locations. Please choose the one closest to you and press Enter. For instance, I am selecting “US” since I’m currently living in the United States.
The next screen shows a list of time zones available in the location you selected. Pick the one that matches either where you live or the time zone you live in and press Enter.
Step 2 (Password setup)
MD5 passwords are more secure and allow you to use passwords longer than 8 characters. You should now be on the first “Password Setup” screen, which is asking if you want to use MD5 passwords. The default is not to enable them; however, unless you have a specific reason for not using MD5 passwords, I would recommend using them. Select “Yes” on this screen to use MD5 passwords, and then press the Enter key.
The next password screen asks about Shadow Passwords. You will want to use them since they are more secure, so select “Yes” and press Enter.
The third password screen is where you will set a password for your “root” user account. This is the password you will need to log in as root to administer certain aspects of your system. You must also log in as root to download and install packages using the apt program. You don’t want people to be able to guess your password, so type something like this, “MyName^9”. Remember that Linux passwords, as with everything else in Linux, are case sensitive. Therefore, “myname69” will not work when you try to log in. Select a secure password and type it in the text area at the bottom of the screen; then press Enter. Please remember this password. Write it down if you must. You will need it later.
The next screen is related to the last. Here you will type in your password once again to ensure you have entered it correctly. Type in your password again and press Enter. If by some chance you mistyped either of these passwords, the system will make you do this step again. The idea is to prevent you from entering a mistype as a password, since you would not be able to log into you machine. If you mistyped the password the same way twice in a row, then you are out of luck (well, not entirely, but that is beyond the scope of this article).
You should now be on the next password screen, which is asking you if you want to create a regular user account. Since it is a bad idea to run as root all the time, you will want to select “Yes” here.
On the next screen, enter a username for your account, and press Enter.
On the next screen, type your full name and press Enter.
The next two screens are used to set up your user account’s password. They are identical to the two screens used when we set up the root user’s password. Following the same instructions you did when creating your root user’s password, enter you user’s password and press Enter. Note: you password here doesn’t have to be the same as root’s password. In fact, it’s probably better if they are different. That way, if somebody figures out your regular user account’s password, they still can’t log in as root.
You should now be on one of the “Debian System Configuration” screens again. This one is asking if you would like to remove PCMCIA packages. For those who don’t know, PCMCIA packages are used to support PCMCIA devices, such as modem cards and network cards, which are most common on laptops. If you are using a desktop system, or don’t know what PCMCIA cards are, you probably don’t need support for them. If such is the case, please select “Yes” and press Enter.
Step 4 (Configuring your system to use PPP to access the internet)
The next configuration screen is asking if you use a modem to dial up to the internet. If you have a high-speed internet connection, chances are you don’t need this. You may safely select “No” and go to the next step.
If, on the other hand, you do have a modem and use it to dial up, you will need to select “Yes” here and follow the steps to use your modem to access apt sources (which are where Debian packages are located on the internet). Unfortunately, I do not own a modem, so I cannot be as verbose for this section as I would like to be. I would like to offer my sincere apologies to all the modem users out there. Not only because I can’t walk you through this part, but also because you are using modems.
Step 5 (Apt Configuration)
Once you are finished setting up your dialup settings, or skipping that section if you are connecting to the internet via a network card or local LAN, you should be at the “Apt Configuration” screen.
You can use your installation CDs as apt sources (if you have all of the Debian CDs) but I don’t prefer this method because you won’t have access to updates, patches, etc. You also wont be able to upgrade to Debian’s testing branch either (which some may wish to do in order to get more up-to-date packages).
Therefore, I would suggest you select either FTP or HTTP from this screen and then press Enter.
The next Apt Configuration screen is asking if you want to use NON-US apt sources. You will want to say yes here as some software is not available on US apt mirrors. Select “Yes” and press Enter to continue.
The next Apt Configuration screen is asking if you want to use apt sources that point to non-free software. As is explained on the screen, some programs that are not free (meaning you can’t have, share, or modify the code) have been made to work on Debian. If you would like access to these programs, you should select “Yes” here. Personally, I always choose “Yes” on this screen. Once you have made your selection, press Enter to continue.
The next Apt Configuration screen is similar to the last. However, contrib. software is free software that relies on non-free software to work. I would suggest selecting “Yes” here as well. Press Enter to continue.
Next, in order to find a mirror close to you for downloading Debian packages, select the country you are living in from the list. Once you have made your selection, press Enter.
Next, you will be shown a list of mirrors, or servers, to choose from. In theory, it doesn’t really matter which one you choose; however, in reality, some of them don’t work. If you select one that doesn’t work, you will be given the opportunity to make the selection over and over again until you find one that does work. A safe bet is the debian.org servers, although they are not as fast as some of the other servers, since they tend to always work. Please make your selection and then press Enter.
The next screen asks if you would like to access apt sources for security updates. You want to select “Yes” here.
Step 6 (Tasksel)
Now you have a choice to make. One of the things I like about Debian is that it is very easy to get an absolutely clean system and then to build it the way you like. That said, I never run the next option, which is Tasksel. Tasksel allows you to go through a big list of program groups, and even individual packages, selecting things that are of interest to you; or selecting everything if you don’t know what you want. If you would like to take that step, and install things this way, then feel free to do so. However, I like my systems as clean as possible, and I like to know that the only things on them are what I have intentionally put on them. Therefore, for this tutorial, I am going to say “No” here and not install any packages at this time. Select “No” and press Enter to continue. I will show you how to easily install whatever software you want at the end of this tutorial.
Step 7 (Dselect)
The next screen you see will ask if you want to run Dselect to install packages. While you may choose to do so, I am not going to cover it in this article. To make a clean system, I recommend skipping this section as well. Select “No” and press Enter.
Step 8 (Using apt to remove the PCMCIA packages)
If you will recall, unless you chose to keep them for some reason, we removed the PCMCIA packages earlier. These packages are actually going to be removed by apt in this step. If you look at the command line section at the very bottom of the screen, you will see that we are removing the pcmcia-cs* packages. We are asked at the very bottom of the screen if we want to continue (y/n). Type the letter ‘y’ and press Enter.
If you chose to install packages during the Tasksel or Dselect steps, these will be installed by apt at this point, so this step could take a while. If you didn’t install anything using Tasksel or Dselect, this step will be over quickly since you are only removing one package.
Also, please don’t be concerned about the few warnings you receive. They are not important.
Step 9 (Removing previously downloaded .deb files)
The next prompt at the command line is to remove any previously downloaded .deb files. We haven’t downloaded any files, unless you chose to do so during the Tasksel or Dselect step, but you can say yes here anyway. Type ‘y’ at the prompt and press Enter.
Press Enter again to continue.
Step 10 (Exim)
Exim is a mail program like Sendmail, Qmail, etc. The next prompt you will see is a brief explanation that Debian can autoconfigure exim for you, based on your answers to the next section. Press any key to continue.
You should now see a list of five different configuration choices for exim on the screen. Type ‘5’ at the prompt for “No Configuration” and press Enter. Most people won’t need this anyway, but if you do want to run your own mail server, documentation for setting it up can be found in the /usr/share/doc directory. Please choose ‘5’ for now. If you want to use exim, you can set it up later.
Step 11 (Finished)
The final configuration screen is simply telling you that you have installed Debian successfully. You may press Enter to exit the configuration screen and go to a login prompt. At the prompt, type in your regular user name (not root) and press Enter. Then, when prompted, enter your password and press Enter.
You will now be at the command line prompt. However, you probably are thinking that Debian is pretty lame at this point since you don’t have a graphical interface yet. We will take care of this in the next, and last, section of this article.
In order to configure Xfree86, you need to know three things. First of all, you need to know whether you have a PS/2 mouse, a USB mouse, or a Serial mouse. You also need to know the vertical and horizontal scan frequencies of your monitor. I have a Sony, a KDS and an NEC monitor. The specs for each one can be found on the web at each of those companies’s web site (although if you have a KDS monitor, I would recommend going to their Canadian site – http://www.kdscanada.ca – since their US site is just plain stupid). Finally, you need to know what kind of video card your machine has.
If you have Windows installed on your machine, you can reboot the machine into Windows and look at your hardware settings by clicking START | Settings | Control Panel | System. Then click on the Hardware tab and then the Device Manager. This should tell you all the information you need to know about your video card and mouse. It will not, however, tell you your refresh rates, so you will need to either consult your monitor’s manual or the manufacturer’s web site. Look for the specifications for your monitor, both horizontal and vertical scan frequencies should be listed there.
Note on USB mice: I don’t have a USB mouse, but I know what is needed to run one. However, since I don’t own one, I can’t test it and make sure it will work without adding support for it manually to the kernel. However, I highly doubt it will.
The module that must be loaded in order to use USB devices, “usb-uhci” does not show up when I use the lsmod command, so I’m thinking it won’t work. However, since it is listed in the supported port list (/dev/input/mice) perhaps module support is in the kernel already and the installer will set it up if you select that option from the list. I don’t know. If someone wants to send me a USB mouse to test with, I will let you know for sure.
Since I don’t think the USB mouse will work at this point, I would suggest that those who are using a USB mouse attach one of those green PS/2 adapters to their mouse and plug it into the PS/2 port on their machine (please do so when the power is off), and use the mouse that way until we have an opportunity to recompile the kernel, if necessary. I will write another tutorial explaining how to recompile the kernel the Debian way if people are interested.
Step 1 (Obtaining Xfree86)
Before we can configure Xfree86, we need to download it. This is very easy using apt. Before we can use apt, however, we need to be logged in as root. To log in as root, type “su” (it stands for Switch User or something to that effect) at the command line and press Enter. You will be prompted for the root user’s password. Enter the password and press the Enter key. Note that your command line prompt should have changed from a ‘$’ and the end to a ‘#’ instead; indicating you are now logged in as root.
Now, type the following command, while logged in as root:
“apt-get install x-window-system”
You should now see a long list of all the packages that apt is going to install. At the very bottom of the screen, you will see a prompt asking you if you want to continue. Type ‘y’ and press the Enter key to begin downloading Xfree86. This may take a while.
Step 2 (Managing Xwrapper.config)
Once all of the packages have been downloaded, you are presented with a screen that looks like the installation screens. This new screen should be titled “Configuring Xserver-common”. This screen is asking whether you want to control who has access to the X server or if you want debconf (Debian’s configuration tool) to do it for you. I suggest you choose “Yes” and press the Enter key to continue; unless you know what you’re doing.
Step 3 (Managing XF86Config-4)
The next screen is asking you if you would like debconf to manage your XF86Config-4 file. Again, you will want to choose “Yes” and press Enter to continue.
Step 4 (Choosing your video card)
The next screen, which is the “Configuring Xserver-xfree86” screen, has a list of video card chipsets and manufacturers. Pick the one that matches your video card. One that may be difficult to find is the driver for the Voodoo cards. It is “tdfx”, which I suppose stands for “Three D FX”. Another one that may elude people is the NVidia driver, which is simply “nv”. Please select your cards manufacturer or chipset from the list and press Enter to continue.
Step 4 (Configuring the framebuffer)
The next screen asks whether or not you wish to enable the kernel framebuffer. If you say “Yes” here, you will communicate with the video card through the kernel’s framebuffer. If you say “No”, you will communicate with the hardware directly. As it says on the screen, both methods should work, but in reality, using the framebuffer hangs my machine, so I’m going to choose “No”. Once you have made your choice, press Enter to continue.
Step 5 (Defining your keyboard rules set)
The next screen is asking you to enter your keyboard rule set. The default in the text area at the bottom of the screen is xfree86. I recommend leaving it as the default. Press Enter to continue.
Step 6 (Defining your keyboard layout)
The next screen is simply providing information regarding the various types of keyboards. After you have read it and identified which kind of keyboard you have, press Enter to move to the next screen where we can actually define our keyboard type.
On the next smaller screen, there is a text area where you need to enter your keyboard type. It defaults to “pc104”. If you have a keyboard with the “Windows” keys on it (in between the CTRL and ALT keys), then you will want to accept the default “pc104” value, and press Enter. However, if you have one of the older keyboards without the “Windows” keys on it, you may have a “pc101” keyboard. Enter the type of keyboard you have and press the Enter key.
Step 7 (Defining your keyboard layout)
During the Debian installation, we defined our keyboard layout. This is only valid for the command line. We also need to define the keyboard layout for Xfree86. If you selected the standard QWERTY keyboard during installation, which most people probably did, please accept the default “us” value on this screen and press the Enter key to continue.
If you will recall, I use the dvorak layout. Therefore, I am going to replace “us” with “dvorak” before continuing on.
Step 8 (Selecting your mouse port)
The next step is asking you to identify your mouse port. Here are the choices:
/dev/psaux (PS/2 mice)
/dev/ttys0 (Serial mouse on COM1)
/dev/ttys1 (Serial mouse on COM2)
/dev/ttys2 (Serial mouse on COM3)
/dev/ttys3 (Serial mouse on COM4)
/dev/input/mice (USB Mouse)
Please either select “/dev/psaux” for a PS/2 mouse or, if you have a serial mouse, the appropriate “ttys” device, depending on which COM port your mouse is on.
Make your selection and press Enter.
The next screen will show a bunch of mouse drivers. Please choose the one that matches the brand or type of mouse you have and press Enter. I realize that isn’t as easy as it sounds since a lot of the options in the list are quite cryptic. If you chose “/dev/psaux” on the last screen, and you have a mouse without a wheel on it, select the PS/2 option. If, on the other hand, your mouse does have a wheel on it, you need to select the ImPS/2 option in order to get the wheel functionality. If you selected one of the serial mice (ttys) options on the last screen, the choices should be a little more apparent.
Step 10 (Is your monitor an LCD?)
The next screen asks if you are using an LCD monitor. If you are using a laptop or a flat panel monitor, you will want to say “Yes”; everyone else should select “No”. Please press Enter to continue.
Step 11 (Configuring you monitor)
The first screen in this section describes the three options you have for configuring your monitor. These options are:
Advanced: If you were able to find the specifications for your monitor, and you know the scan frequencies, you will want to choose Advanced (which is what we will do in this tutorial).
Simple: If you don’t have any idea what your monitor’s refresh rates are, or what it’s resolution capabilities are, you can choose simple. You will be asked for the physical screen size of your monitor and Debian will estimate its abilities. As noted on this screen, this may not estimate the optimal settings for your monitor.
Medium: If you know the resolutions your monitor supports (for example, you know it can to 1024×768 at 70Hz, and that is the resolution you want to use) you can select the appropriate resolution from a list.
Simple and Medium are quite easy to figure out, so I will leave them and move to the Advanced option. However, if you wish to do a simple or medium configuration, then select those now and skip the rest of this section and go to Step 12.
If you know your monitors refresh rates, select Advanced option on this screen press Enter to continue. Before continuing, please note that you have to have the information for your monitor. It can’t just be a similar monitor. If you are unsure, please do a Simple or Medium setup.
Step 11a (Horizontal Scan Frequency)
The next screen is asking you to enter your monitors horizontal sync range. This is two numbers separated by a hyphen. There is a default value listed, but this most likely is incorrect. Delete the default values and enter the correct range for you monitor. For example, my monitor’s horizontal sync rate is 30-96, so I will enter that on this screen and press Enter to continue.
Step 11b (Vertical Scan Frequency)
The next screen is the asking for the vertical scan frequency for your monitor. Enter that information now and press Enter to continue. Make sure you don’t confuse the horizontal and vertical frequencies. At best it won’t work, and at worst, it can damage your monitor.
Step 11c (Resolution)
The next screen is where you will set all the resolutions you wish to support. Highlight each of the resolutions you wish to support and then press the space key to enter an asterisk (or remove an asterisk if you need to) I would recommend only using the common resolutions since many monitors don’t support the odd ones. These are:
Note: Smaller monitors and video cards with small amounts of memory will not support the higher resolutions. Please only pick resolutions that you know your monitor will support.
If you select multiple resolutions here, you will be able to switch between those resolutions on the fly once your X server is installed. Once you have Xfree86 installed, to switch between resolutions, you hold the CTRL + ALT keys down and press the ‘+’ key on your numeric keypad to increase the resolution or the ‘-‘ key to decrease it. Press the Enter key to continue.
Step 11d (Color depth)
This screen is asking you to select the color depth you wish to use. This depends on which resolutions you chose and what color depth your video card supports at those resolutions. If you have a pretty good video card and monitor, I would recommend choosing “24” since it will give you millions of colors. If your video card doesn’t have a lot of memory and you think it won’t support that color depth, choose “16” which will give you fewer colors, but will still look pretty good. Anything less than that and I would suggest you buy a new video card or monitor.
If your video card has 16MB of RAM and you are only going to run at 1280×1024 or less, you should be fine picking “24”.
Make your selection and then press Enter to continue.
Step 12 (Choosing a window manager)
You will have to wait a minute while the X server is installed and configured. Once it is done, you should be back at the root prompt ‘#’. If you type “startx” at this point, the X server should start and show you a grey background and an ‘X’ for your mouse cursor. Not very fun yet is it? Press CTRL+ALT+BACKSPACE in order to kill the X server.
You will need to install a window manager. I am going to install WindowMaker for this tutorial because that is what I like to use. Once this is installed, I will have you install a program that makes it easy to find and install Debian packages. Once that is installed, you will be free to search for and install any window manager you wish.
To install WindowMaker, please type the following at the command line, “apt-get install wmaker”, and then press Enter. When prompted if you wish to continue, enter ‘y’ at the prompt and press Enter to download and install WindowMaker.
Once apt is finished downloading and installing WindowMaker, you will be back at the ‘#’ prompt. Type “startx” at the command prompt, and when X loads again you should be in the WindowMaker environment.
Now, I don’t like running X as root, so let’s exit WindowMaker and then logout of the root account.
To exit WindowMaker, right click anywhere on the desktop to bring up the Debian menu. Next, go to “Window Managers” and select “Exit” from that menu. X should exit and you should now be back at the ‘#’.
At the ‘#’ prompt, type the word “exit”. You should now be back at your user account’s prompt, which ends with a “$”.
To go into X as a regular user, type “startx” again at the command prompt.
Before ending this tutorial, I would like to help you install a very useful application called Synaptic. I will show you my preferred way of install things while not being logged into X as root.
You should be logged into X as a regular user at this point; if you followed my instructions.
Now, right click on the desktop to bring up the menu. Go to XShells and then select Xterm. This will bring up a terminal window. In the terminal window, type “su” to log in as root, and press the Enter key. Enter in your root password as we have done before and press Enter to login.
Now, to install Synaptic, type “apt-get install synaptic” at the command line and press Enter.
Once apt has finished installing Synaptic, you can launch it by typing “synaptic” at the root user’s command prompt (you can’t run this program unless you are logged in as root).
The synaptic tool is fairly straight forward. Look down through the alphabetical list of all the packages available and find the ones you want. To install them, simply click the Install button and then the Proceed button. The selected application(s) will be downloaded, installed, configured, and set up in your menu for you automatically.
One nice thing about Debian that some other Linux distros have started doing recently too, is that it uses a centralized menu system so your menu structure will be the same even if you switch window managers.
Just to demonstrate how Synaptic works; I will walk you through installing Mozilla using Synaptic.
Launch Synaptic, if it isn’t running already, by typing the commands listed above.
Scroll down through the package list until you find “mozilla”, and select it with your mouse (there are other mozilla packages too, but you only need this one to browse the web).
Next, click the install button, which is right above the tabs on the left side of the window. Notice when you do so, a blue triangle is placed by the “mozilla” item as well as three other items in your immediate view (the mozilla-browser, the mail client and security package). Synaptic is a front-end for apt, and apt automatically takes care of any dependencies for you; as you can see here.
Now, to install Mozilla, simply click the Proceed button at the top of the window. A dialog box will pop up telling you that there are 9 packages to be downloaded and installed. Click the Proceed button on the dialog and wait for Mozilla to be installed.
Now, some packages are configured by Debconf (the Debian Configuration tool), and require some input from the user. If this is the case, the blue Debconf screen will appear in the terminal windows you launched Synaptic from. If you look at that window now, you will notice that Debconf is asking you if you want to use FreeType2 support in Mozilla. This lets Mozilla support TrueType fonts. Select “Yes” and press Enter.
On the next Debconf screen, select “Auto” so that Debconf can automatically select your dsp wrapper.
You are now finished. You may Close Synaptic now (which will always give you a warning asking if you are sure). Now right click on the desktop to bring up the menu. Select “Apps” and then “Net” and then “Mozilla Navigator” to launch Mozilla (see how your menus are automatically updated when you install programs using apt?)
Well, now you have a very trim Linux system that you can configure to meet your individual needs.
I know this has been long, but hopefully I have provided you with enough information to install Debian and get it to a point where you can explore. Feel free to launch Synaptic and install a different window manager if you want too. Also, if you reboot the machine, it should not boot to a command line, but rather to xdm, which is a graphical login screen. Xdm is quite ugly in my opinion (although with some effort you can change that). If you would like to install kdm (KDE’s graphical login screen) or GDM (Gnome’s graphical login screen) you can find them in the package list in Synaptic. Debconf will also ask you which login screen you wish to use (if you install another one) and will configure the system to use that login manager for you.
There are many other things that I could write about, such as recompiling the kernel the Debian way and other tweaks you can to do the system. If there is an interest, I will work to do so in the future
Thanks for you patience. I hope you have fun with Debian.
About the Author:
My name is Clinton De Young and I work as a Development Manager for a software company called Altiris. I am a native English speaker, and am fluent in Japanese. On the side I translate documents to and from Japanese and sometimes freelance with companies to write software for the Japanese market. In spite of all that, my family comes first. They are the most important people in my life.
Debian’s installer is not a linear one like most Linux distributions; per se. It is more like the FreeBSD installer in that you can jump around the installation menu and perform a variety of tasks in no particular order. However, Debian’s installer tries to guide you by highlighting the next logical task in red and placing it at the top of the menu list. We will only have to vary from the installer’s suggestion a couple of times.
Step 9 (Initialize and activate a swap partition)
Step 15 (Install the base system)
Once Debian has finished booting, you will be presented with the “Debian System Configuration” screen. Please read it and then press the Enter key.
Step 3 (Removing PCMCIA packages)
Step 9 (Selecting your mouse type)