This is the second part of a three-part tutorial on setting up a customised Debian installation. It will walk you through the installation process for installing the base system. The previous part covered choosing and downloading an installation image, and the next part will look at customising the newly-installed base system.
Before you begin
If you followed the previous part of the tutorial, you should now have your target computer booted into the Debian installer. To summarise, you need to boot the target computer from your bootable installation media and choose the “install” option or boot it from your network boot server and choose whatever option is appropriate for your server. This will load the text-based installer. Your target computer will need to have a keyboard and a monitor attached to complete the installation (although you can always install SSH after the base installation to get network access).
Using the installer
The standard Debian installer runs in text-mode only and does not use a mouse. Most options are selected by pressing the up and down arrow keys to highlight the desired option, then the return key to confirm. If you’re prompted for a text input, type the correct text and press the return key to confirm. Where applicable, the left and right arrow keys will switch between “yes” and “no” options in yes/no questions. You can also use the left and right arrow keys to navigate to the “go back” and “continue” options which appear on almost every screen, however pressing the return key is equivalent to choosing “continue” and pressing the escape key is equivalent to choosing “go back”.
Installing the base system
These instructions apply to the “minimal installation” images as explained in the previous part of the tutorial. If you’re using a “full installation” or “network installation” image then some steps may differ slightly; just follow the on-screen prompts where needed.
The installer will first ask you to select the desired language for the installed system, then the country in which you live (or which you want to configure the target system for, if for some reason they differ), then your keyboard layout. After selecting these options, the installer will perform some automatic configuration.
In all of my tests, the installer stops and asks me for the system’s hostname. This is the UNIX hostname (as in, the hostname that appears in the shell prompt “user@hostname:~$”) that will be used for the new installation. Some network configurations may assign this automatically, although I doubt it. Note that, as hinted by the instructions on the screen, the hostname may need to be set in accordance with your existing network configuration.
The next screen asks for a domain name. The instructions say that “if you are setting up a home network, you can make something up”; they neglected to mention that you can in fact leave this blank (and will probably want to).
The next step is to configure the users on the new system. You will be asked to enter a root password, and the next screen will ask you to confirm the password. Then you will be asked to set up a new user, giving their full name (as in, “Micheal Johnson”), then a username (which is initially based on the full name entered but can be changed freely), then a password which is confirmed as with the root password. In fact, if you’ve ever installed an Ubuntu system then you will probably already be familiar with the meaning of these settings. (Additional users can be added after installation.)
After attempting to automatically configure the clock (this has yet to complete without timing out on my network), the next step will ask you to partition your hard disk. The options available here depend on the current state of your system and are similar to, but not exactly the same as, the options presented by the Ubuntu installer if you are familiar with that. If you choose to partition the hard disk manually, the text-mode partition editor can be a bit confusing if you’re used to seeing your hard disk partitions represented graphically, but the options available are pretty much identical to the Ubuntu installer (and, in fact, slightly more flexible) – if you’ve installed Ubuntu before then you should have no problem with getting finding and understanding the options in the Debian installer’s partition editor. As with the Ubuntu installer, the installer will alert you if you forget to allocate a swap partition, and confirm before writing any changes to disk.
The installer will apply the requested partition changes and then proceed to install the parts of the base system that are included with the installation image. This can take a long time, so go get a coffee and watch some lolcats on YouTube.
Next the installer will prompt you to choose a mirror for the package manager to use to download new packages for installation. Unless you have a very good reason to choose otherwise, choose your country of residence, and then choose a mirror from the list on the next screen. If you’re unsure of what to choose, just choose the top one on the list, which should read “ftp.<country code>.debian.org”, where “<country code>” is an abbreviation for your chosen country.
Unless you’re using a proxy, leave the box on the next screen blank. If you’re using a proxy, enter the correct details here as per the instructions.
Then the installer will refresh the package index cache (equivalent to running “sudo apt-get update”). After refreshing the package index cache, the installer will download and install a number of base packages that are not included in the installation image. This can take a long time, so go watch some more lolcats (as long as you don’t use all your internet bandwidth!).
After this, the installer will ask if you want to participate in the package popularity survey. I don’t know how choosing “yes” affects the installation and use of the system, as I have never tried this, however I cannot envisage there being any problem if you choose to participate.
Selecting additional software
Although any software can be installed after the installation of the base system, the installer lets you install some common software beforehand. I recommend leaving the “standard system utilities” option selected. If you want to have SSH access immediately after installing the base system, choose the “SSH server” option, otherwise SSH is easy to install at a later time. I recommend not choosing the “web server” option and rather installing your own choice of server packages if you’re setting up web server. Leave the “print server” option selected if you’re going to print from the new system, otherwise you can unselect it and install the print server later if you need it. I’m not sure why “Debian desktop environment” is selected by default but no actual desktop environments are selected; I recommend unselecting all of these and installing a desktop environment later if required. Note that to select and unselect options in this list, you need to highlight the relevant option and press the space bar; the return key will confirm the selected packages and go on to installing them, with no way to go back.
The installer will then download and install the next set of packages as per your selection. Time for another round of coffee and lolcats.
Eventually the installer will go on to install the GRUB bootloader. You’ll probably be asked if you want to install the GRUB bootloader to the master boot record of the hard disk that you selected for installation in the partition editor. The exact message displayed in the question depends on what other operating systems are on the selected hard disk, although the options are the same. I can’t say what the right or wrong answer is here as it depends entirely on your setup, so read the question carefully. One thing I can say is that if you’ve already got GRUB installed (such as from another Linux installation that you are keeping) then you probably don’t want to re-install GRUB to the MBR so choose “no” (although you’re welcome to choose “yes” and re-install GRUB if you have a good reason to).
For some reason the next screen asks where to install GRUB, no matter what option you chose on the previous screen. I don’t know how this relates to the previous screen, so if you chose “yes” on the previous screen then choose the same hard disk that you performed the installation onto. If you chose “no” then I would advise pressing the escape key to “go back” and then choosing “continue without boot loader” on the following menu.
The installer will perform a number of final cleanup tasks, attempt to eject the CD, and ask you to confirm that the CD (if any) has been ejected. If you’re using a CD or DVD, then make sure to remove the disk from the tray and close the tray; if you’re using another bootable media such as a flash drive then unplug it from the computer. (If you’re using a “network installation” image then you won’t be prompted at this step; make sure though that when you reboot the computer it boots from the hard drive, not the network boot server.) After confirming that the installation media has been removed, the installer will reboot the computer.
Booting the new system
Once the computer has rebooted, select the “Debian GNU/Linux” option from the boot menu. If you chose to install GRUB and there are no other operating systems on your computer, this will be the default option and you can either press the return key to boot immediately or wait five seconds for the boot menu to time out and boot it automatically. If you have multiple operating systems, the default option may depend on the configuration of those systems and/or your existing bootloader, and if have kept your existing bootloader then you will probably need to manually add Debian to your existing bootloader’s configuration before it will appear in the menu (the details for how to do this are beyond the scope of this tutorial; consult the Debian documentation for further information).
After choosing the appropriate option in your boot menu, the base Debian system will boot. There is no graphical boot screen, and few system services, so the system will boot very quickly in a text-mode console. After startup, you will be presented with a typical Linux login prompt where you can log in either as root, using the root password that you specified during installation, or as the user that you configured during installation.
Note that at this stage some common commands that you might be used to using are missing, most notably the “sudo” command (Debian still uses the root account by default, unlike Ubuntu which replaces root with “sudo” by standard). When you’re ready to start customising your new system, move on to part 3 of the tutorial.