Guide: Installing Debian GNU/Linux

September 27th, 2007

This guide is supposed to explain to you how to install the Debian GNU/Linux Operating System. I’m going to try to be very precise on how this is done - so this guide is considered a newbie-guide. The intention of this guide is, in addition to be a step-by-step walk through on how to install Linux, also to be a sort of “heads up” for what the user should expect before he or she starts installing. If you have any questions regarding any of the steps in the guide, feel free to ask any questions below. Let’s move on!

Before you begin

You need the following before you begin.

  • A computer or virtual machine to install on
  • A Debian CD. This guide will use the ‘netinst’ image. If you are unsure on which architecture you want to download for, it is probably ‘i386′.

If you chose to use the netinst CD, you need an internet connection. If you don’t use the net-inst CD, you should still be able to install Debian by following this guide - but some steps will probably look different.

The beginning

The first step is to load the CD in the CD-tray, and restart the computer. Make sure that it boots from the CD - you might have to enter the BIOS to change this (this guide does not cover this part at this point, if anyone feel it’s necessary, please request it in the comments). You should be presented with the following image:

Booting Debian CD, Splash Screen

Hit “Enter”. At this point you should see some text scroll over your screen, while the Debian Installer is loading. You should be met by a dialog which asks you to ‘Choose language’.

Debian Installer, Choose language

In my experience, English is the most complete translation to date. I’m Norwegian, so I’ve tried to pick Norwegian - but I had to accept that a bunch of my packages were in Danish and Swedish. To me that was more of an annoyance, so I’ve picked English ever since. You should pick what you prefer, but I’m giving you a “heads up”, that all packages might not exist in a language which applies to you. After you’ve picked your prefered language, you’re met with a dialog which asks you where you’re located - and most likely with a suggestion of countries based on your previous choice.

Debian Installer, Choose language part 2

At this point, it’s recommended that you pick the country where you are located. Since I’m Norwegian, and I pick Norway, I will have the correct timezone and network mirrors suggested automatically by Debian Installer - and this will probably save me some trouble later. If you’re not from any of the locations initially suggested, pick “Other”, and browse to the correct location. I pick Other, followed by Norway. Again, another dialog. This time we’re asked what keyboard layout to use.

Debian Installer, Choose keyboard layout

At this point you should just pick what applies to your keyboard. I pick Norwegian. At this point the Debian Installer starts loading a bunch of components, and trying to configure the network. We assume that the automatic configuration went well, or that you know what network settings you need to make the computer have Internet access.

You are now met with a dialog which asks you to define a hostname for the system. As the dialog says, it is a single word that identifies your system to the network. I’m gonna be very boring, and name mine “debianbox”. In the next dialog box, you are asked to specify a domain name. If you are setting up a private network, you can make something up, but if you own a domain, and intend to use it for your server, it is pretty safe to fill it in now. I’m gonna input “example.org”. You are now met with questions on how you will partition your disks.

Debian Installer, Partition disks

If you have an existing Windows-installation on the disk, and want to keep it, you have to pick Manual and do some changes manually. I’m sorry to say that this guide does not cover what to do in this situation yet. If you want to keep your existing OS, you should stop following this guide now. If you have nothing to lose on the disk, and want Linux on this computer - stay with us and pick “Guided - use entire disk”. You are now met with another question - which disk to partition.

Debian Installer, Partition disks - Select disk

As you can see, I only have one disk present - so I don’t have much of a choice. Pick the disk drive you want to install Linux on. Another dialog appears - this time you should decide what “Partitioning scheme” you want.

Debian Installer, Partition disks - Select Partitioning Scheme

For most small servers, and workstations, “All files in one partition” is totally OK. Explaining the advantages of choosing a different scheme is not covered by this guide. I pick “All files in one partition”. You are now presented with an overview of your currently configured partitions and mount points. Since we don’t cover why you would want to change any of this, you can safely pick “Finish partitioning and write changes to disk”. You are again presented with another confirmation box which wants you to confirm to write the changes to disk. Pick “Yes”.

Debian Installer, Root Password

You are now asked to pick a root-password. The root-password, is basically the password you use when you want to make administrative changes on your computer. This might be installing new software, or making changes to system services. You should set something safe as a root-password. Input the password, and press enter. You have to do it again, to verify that you typed correct.

You should now create your first non-administrative user. This is the user account which you will log on with remotely. What you fill in is optional, but your full name would make sense. I fill in “Trygve Vea”. Next it asks for a username. I’m gonna take the advice given by the dialog, and use my first name. Again, asked for a password - this time for the new user. You should pick a password which is different from the root-user. The reason is, that if you should have an accident, and someone breach into your system with your non-administrative user - they WILL try to use the same password to authenticate as root. If they succeed, your entire system is compromised. - Setting different passwords will not “stop the bad guys” - but it can limit the damage they can do.

Debian Installer is installing the base system. This takes a little while, depending on the speed of your computer and CD-drive. When the process is over, you are asked if you want to use a network mirror.

Debian Installer, Configure the package manager

If you have a decent Internet connection, you should pick “Yes”. If you’re using the ‘netinst’ CD, you should definitly pick “Yes”. I pick “Yes”. The installer guides you to find a good mirror - I’m gonna pick Norway, but you should try to pick the country you live in, or a country near you. If there’s a mirror in the country you picked, you get a box which asks you which mirror you want to use. I’m gonna pick “ftp.no.debian.org” for me, since that’s my only choice. I am now asked to fill out proxy-information. If you don’t know if you’re behind a proxy or not - then you’re probably not - press enter to continue without filling the info.

The package manager is now gathering information from the mirror you choose. When this is over, you are asked to participate in the package user survey. This is totally optional, and can be changed later. I’m gonna pick “Yes”, but what you choose is irrelevant. You now need to tell the installer what kind of software you want.

Debian Installer, Software selection

If you’re installing this on your workstation, you probably want a “Desktop Environment”. “Standard System” should be checked regardless if it’s a server or a workstation. If it’s a laptop, it’s an advantage to check the “Laptop”-setting, for additional software related to laptops. I’m gonna install a “Standard system” for now.

The installation proceeds. After a short while, you are asked if you would like to install the GRUB boot loader on the master boot record. You usually want that. Pick yes. Again, some short installation procedure will run, and you will be notified that the installation is complete! Press continue, take out the CD, and your system will reboot. If you did not install a Desktop Environment, and get something similar to the image below, you should be OK. If you did install a Desktop Environment, and get a more graphical logon-screen - you should also be OK.

Debian GNU/Linux: First boot

There’s only one thing left - and that’s a slight change of the apt-sources. (Before you continue, if you installed with a Desktop Environment, you want to press CTRL+ALT+F1 to get to the terminal which looks similar to the ones in the pictures). Log on as root (username root), and the password you specified earlier in this guide for your administrative user. Type the following:

nano /etc/apt/sources.list

You should now see something which looks similar to this:

Editing sources.list with nano

This file contains the sources your system will use when looking for software to install and/or update. Since the software on the CD eventually will become outdated (if not already), and you hopefully have an acceptable internet connection - we want to remove the CD from the list. Just erase the lines which contain “cdrom”. When you’ve done this, press CTRL+X, followed by Y, followed by enter. You should now see something similar to this:

Editing sources.list with nano: Successfully written

Now you should type the following:

apt-get update

When this is done running, your apt-sources is updated, and future package installations will not ask for your to insert your CD. Good luck with your Debian GNU/Linux system. If you need further assistance on how to do certain things, you can always request a guide on the guide-page.


7 Comments to “Guide: Installing Debian GNU/Linux”


  1. demian said:

    In the first step in installing Debian, my computer does not boot from the CD. What do I need to change in the BIOS? Thank you.


  2. Trygve said:

    You need to change the boot order, so that the CD comes first. I will update the guide :)

    Thank you for pointing that out.


  3. demian said:

    There was no choice for CD in the BIOS. It mentioned USB. I chose that and went on, but it still didn’t boot from a CD. Could you please tell me in detail what to do? Thank you.


  4. Trygve said:

    I have done a quick search to find if there is any guides on that; http://www.whitecanyon.com/how-to-change-boot-order.php

    But I want to mention that your BIOS may differ from the one in that guide - and if that is the case: this is precisely why the BIOS-part is not in my guide.

    I hope it helps though :)


  5. demian said:

    Thank you. It did help, and I could installed Debian! I have a couple of questions:
    (1) Now the installation is complete, should I go back to BIOS and change the setting back to the original (although I don’t remember the original setting…)?

    (2) Regarding the very last step, You said, “Log on as root”. When I tried I got the message, “root logins are not allowed”. So I couldn’t follow your last step. Would this matter? What do you suggest I should do?

    Thank you.


  6. Trygve said:

    1) It is not necessary — the only annoyance you MIGHT expect is that if you leave a bootable CD in the tray, and it will boot from your CD in stead of your harddrive. That’s not a major problem.

    2) Did you get “root logins are not allowed” when you tried to log on with a black terminal? (CTRL+ALT+F1 as specified in the guide)

    If that’s the case; odd, never seen that before. However, if you log on as your ordinary user, you can open up a terminal and type:

    # su -

    followed by the root-password.

    Or, if that fails you can try:

    # sudo su -

    On for example Ubuntu, you must use sudo.

    At that point - if done successfully, you have the same privileges as root, and can follow the rest of the guide.


  7. demian said:

    Thank you.

    When I was installing, there was no step for the Software Selection. I assumed that my computer picked Laptop, so I ignored your instruction for CTRL+ALT+F1. Instead, I typed ‘root’ in the username. That was my misunderstanding. Otherwise, your instruction was indeed easy to follow and very helpful. Thanks again.

Leave a Reply

You must be logged in to post a comment.