Debian 9 Installation Guide

      No Comments on Debian 9 Installation Guide
It's only fair to share...Share on Facebook
Facebook
Share on Google+
Google+
Tweet about this on Twitter
Twitter
Share on Reddit
Reddit
Email this to someone
email

Debian 9 Installation Guide_Choose Graphical Install

This Debian 9 Installation Guide will help you to install one of the most stable distros of Linux.

Users showed great ardor for Debian because of its stability. As a result, Debian is popular both for desktop users and server administrators. Most noteworthy, it’s key values include stability and freedom through the use of open source software lead to Debian more attractive for developers.

What’s new:

Debian 9 Stable edition with codename ‘Stretch’ comes with the following advancements:

  • Kernel 4.9
  • Default MySQL is now MariaDB 10.1
  • LibreOffice 5.26
  • GNOME Desktop Environment 3.2
  • KDE Plasma 5.8
  • Xfce 4.12
  • PHP 7
  • A new version of GIMP 2.8.18
  • Firefox 45.9
  • Python 3

If you aim to install and use Debian stable, this Debian 9 Installation Guide will help you to perform and understand the installation. You can watch the video tutorial or continue reading below.

Video Tutorial

So let’s have a look at Debian 9 Installation Guide

For the experienced user, the installation process for Debian is straightforward. To the novice, there are things confusing and frightening. For example, there is a variety of installation images and finding a right download link may not be easy. The installer is also little more advanced than some the installer popular Ubuntu or Linux Mint. But don’t worry, I will show and explain you everything.

Download an installation image

First, go to the official Debian downloads page and click on “Getting Debian”.

Debian 9 Installation Guide_Getting Debian 9 Stretch

Debian 9 Installation Guide: Getting Debian 9 Stretch

Next, you have options to download Debian.

For example, the “Live” flavor of the Debian installation image is good for testing hardware, but it is not meant for installation.

You need to download the actual Debian installation images.

Debian 9 Installation Guide_installation images option

Debian 9 Installation Guide: Installation Images Option

As shown above, the installation images provide you with two choices:

  • a small network installation image
  • a complete installation image.

If you have a good wired internet connection, I advise you to proceed with the network installation image. Alternatively, you can download the complete image.

On this page, you are provided only i386 and amd64 architectures. However, these are the most commonly used installation images. Most likely should use 64-bit ISO to install Debian 9.

Debian 9 Installation Guide_installation images

Debian 9 Installation Guide: Installation Images

Install Firmware in Debian to Enable Wireless, Video, or Sound:

If you have only the  Wi-Fi connection and your wireless isn’t working, you need a proprietary driver for your Wi-Fi card to work. For that, you need to use Debian non-free images. However, Debian has a strict policy against non-free software and the standard ISO doesn’t include non-free software. With this in mind, It is not easy to find links to these images on the Debian website.

You need to google “Debian non-free images” and the first link will be what you need:

https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/

Furthermore, the images with non-free software can also be helpful if your graphics card doesn’t work well with free drivers.

Debian 9 Installation Guide_non_free image

Debian 9 Installation Guide: Non-Free Image

Booting from the CD/DVD or the USB device

Once the image file is downloaded then burn it either into USB Drive or DVD and make it bootable. Moreover, I recommend making a backup of all the necessary files and directories before starting the installation.

In addition, you have to configure the system to boot from USB or DVD. In case, if your computer does not boot automatically, You need to access the “Boot menu” or modify the “Boot order” in the BIOS during the start-up.

Usually, some of the FXX (e.g. F12), DEL, ESC keys give you access to the boot options. The key to access BIOS or boot menu should be shown during  the start-up.

After booting DVD, Choose “Graphic Install” to begin the Debian Installation in graphical mode.

Debian 9 Installation Guide_Choose Graphical Install

Debian 9 Installation Guide: Choose Graphical Install

Choose Language, Location, and keymap

Choose the language you want to use during the installation process. Select your location. In addition, this will be used to set your time, currency and other locale-related stuff.

Debian 9 Installation Guide_Choose language & location

Debian 9 Installation Guide: Choose Language & Location

At this instant, configure the system locales (language and country combination) and click Continue.

Debian 9 Installation Guide_Choose locale & key-map

Debian 9 Installation Guide: Choose Locale & Keymap

Next, the installer will now load components from the CD as shown below.

Debian 9 Installation Guide_loading components from CD

Debian 9 Installation Guide: Loading Components from CD

Configure the network:

The hostname is basically the name you want to give to your computer. Further, you can assign a Domain Name as per your needs and requirement. Then Click on Continue.

Next, you can set a root password. However, you can also leave it empty and the user account will have administrative privileges with the command sudo.

So, you can keep it empty here and set your password in the next step.

Debian 9 Installation Guide_host-name_domain_password-min

Debian 9 Installation Guide: Host Name Domain and Password

Create a new user:

At this instant, type your full name and your username. When you set the user’s password here, it subsequently enables administrative privileges.

Debian 9 Installation Guide: User Account and Username Password

Partition your Disk

By all means, this is the most crucial part of the installation process.

I will show you 3 scenarios here:

  1. Automatic partitioning of a whole drive
  2. Install without formatting your home partition. This is in case you had Linux installed on your computer before.
  3. Manually partition your hard drive with re-formatting the whole drive.

Scenario #1: Automatic partitioning

To the novice, it is recommended to proceed with Guided partition. More importantly, backup all data, Guided partition method automate operations including formatting.

Scenario #2: Install without formatting your home partition

For the expert user, Manual partitioning method is appropriate, especially when you have a hard drive with important data on the home partition.

At this stage, select Manual and click Continue.

Debian 9 Installation Guide_host_Manual partition-min

Debian 9 Installation Guide: Manual Partition

System Partition:

Select the partition one. This partition will be formatted and used for the system install.

Set the file system you want to use. Notably, ext4 is a good choice.

Debian 9 Installation Guide_select _system partition _file system

Debian 9 Installation Guide: Select Partition File System

Next, select to format it.

For mounting point select root.

Optionally, you can label it as the system partition.

Debian 9 Installation Guide_select _system partition _mounting point

Debian 9 Installation Guide: Select System Partition and Mounting Point

Add a bootable flag, because it is your system partition and you will boot from it.

Check if everything is as you want and select Done.

Debian 9 Installation Guide_check partition

Debian 9 Installation Guide: Check Partition

Home Partition

Next, select your home partition. This is the partition you do not want to format.

Select the file system of this partition. You need to know the file system of this partition. Most likely is it ext4.

Debian 9 Installation Guide_home partition_file system

Debian 9 Installation Guide: Home Partition File System

At this point, do NOT select format, the point is that you want to keep the data on this partition. But I still recommend you to have a backup of this partition before you do all the steps above.

Next, Go to the mount point and assign it to home.

Debian 9 Installation Guide_home partition_mounting point _done

Debian 9 Installation Guide: Home Partition Mounting Point Done

Here, you can see the summary of your settings. The root partition will be formatted and bootable, whereas the data on the home partition will be kept intact.

Debian 9 Installation Guide: Home Partition Finish

If you want also to have a swap partition, assign its mounting point to swap. I prefer to use a swap file instead of a swap partition. See my video on how to enable a swap file on your system. Then verify everything and select done. Press write changes to the disk.

Debian 9 Installation Guide_home_partition_swap partition_write changes

Debian 9 Installation Guide: Home Partition Swap Partition & Write Changes

Scenario #3: Manual partitioning

In this scenario, I assume you have a brand new hard drive or you want to erase the whole hard drive and create a new partition table manually.

Select the hard drive you want to re-partition. Confirm that you want to create a new partition. Then start creating new partitions.

Debian 9 Installation Guide _create new partition

Debian 9 Installation Guide: Create a New Partition

System partition

The first partition is usually used for the system (/ – root). Give it a minimum of 20 Gb.

Debian 9 Installation Guide_Configure partition space

Debian 9 Installation Guide: Configure Partition Space

Select beginning. Make it bootable. Assign ext4 file system to it.

Debian 9 Installation Guide_bootable

Debian 9 Installation Guide: Bootable Flag

After that proceed with Done your system partition settings.

"<yoastmark

Home partition

Then create a home partition. If you don’t want to have more than 4 partitions on your system, keep it primarily. If you need more partitions, select “logical”.

"<yoastmark

For the mount point select /home. Optionally, you can name it with a label, Then select done.

Debian 9 Installation Guide_done home partition

Debian 9 Installation Guide: Done Home Partition

You should see your root and home partitions, and they both will be formatted as below. Check everything and apply the changes.

Debian 9 Installation Guide_Finish home partition

Debian 9 Installation Guide: Finish Home Partition

Confirm that you want to apply this new partition table. Now, the base system is installing. It takes a while.

Debian 9 Installation Guide_installing base system

Debian 9 Installation Guide: Installing Base System

Configure Package Manager with a Network Mirror

You have only one installation image when you are asked about inserting another CD, select No.

Next, select your country and any mirror from your country. Usually, the top one works fine.

Debian 9 Installation Guide_Package manager configuration

Debian 9 Installation Guide: Package Manager Configuration

If you use the proxy, set it here. I skip it.

Debian 9 Installation Guide_proxy

Debian 9 Installation Guide: Proxy

Enable Popularity Contest

In a like manner, I suggest you participate in the usage survey. It will help the Debian project improving future versions of Debian.

Debian 9 Installation Guide_popularity contest

Debian 9 Installation Guide: Popularity Contest

Debian predefined software selection

Now, select the desktop you want to install. By default, it will install GNOME.

I prefer Debian XFCE because it offers users a lightweight, yet still visually appealing desktop experience.

Debian 9 Installation Guide_desktop environment

Debian 9 Installation Guide: Desktop Environment

Install GRUB Bootloader

Once the desktop is installed, you also need to install a boot-loader.

The only scenario when you don’t need a boot-loader is if you already have another system installed with a boot-loader on your system. But this is not the case for most of you. So, select Yes.

And install it to the same hard drive where you installed the system.

Debian 9 Installation Guide_Grub boot loader

Debian 9 Installation Guide: Grub Bootloader

Finish the System Installation

At this point, the installation is complete. So, remove your installation media and press continue.

Debian 9 Installation Guide_finish installation

Debian 9 Installation Guide: Finish Installation

At last, we have the default look of Debian Xfce desktop. Whereas, it is not very attractive. Though, You can makeover your Debian. For this purpose, follow the steps I showed in the post Make Xfce look modern and beautiful.

Debian 9 Installation Guide: Default Look

Things to do after the installation

For most intents and purposes, Debian 9 Stretch default repositories are enough. But you can extend the list of packages you can install by adding contrib and non-free repositories.

Adding contrib and non-free to Debian 9

The package repository information is stored on the /etc/apt/sources.list file. Further, you may edit this file to add a new package repository.

Open /etc/apt/sources.list using Nano text editor.

sudo nano /etc/apt/sources.list

When you open it, you will see the content with default repositories configured:

Debian 9 Installation Guide: Default repositories

Debian 9 Installation Guide: Default repositories

To have the contrib and non-free components, add contrib non-free after main as shown below:

Debian 9 Installation Guide_contrib

Debian 9 Installation Guide: Contrib

Once you are done, Press Ctrl+O to save and Ctrl+X to exit.

Now, you have made changes to the sources.list file. In order for apt to understand the new changes, we must update it.

sudo apt update
Debian 9 Installation Guide_Refresh the repositories

Debian 9 Installation Guide: Refresh the Repositories

Now you can install some non-free packages. For example, MS fonts such as Arial and Times New Roman.

sudo apt install ttf-mscorefonts-installer
Debian 9 Installation Guide_MS fonts

Debian 9 Installation Guide: install MS fonts

Enable the latest security updates

Debian 9 is secure and stable already, but you can improve it even further to get the latest security updates as soon as they are released without waiting for the next point release (e.g. Debian 9.1).

For this purpose, you can add this security repository to your /etc/apt/sources.list:

# latest security updates

deb http://security.debian.org/ stretch/updates main contrib non-free
Debian 9 Installation Guide_security updates

Debian 9 Installation Guide: Security Updates

Receive the bug fixes as quickly as possible.

Similarly, you can also extend your repository list to receive bug fixes as quickly as possible, i.e. without waiting for the point release. Add this line to your /etc/apt/sources.list:

# proposed additions

deb http://ftp.us.debian.org/debian stretch-proposed-updates main contrib non-free
Debian 9 Installation Guide_proposed addition

Debian 9 Installation Guide: Proposed Addition

After all the repositories have been added update and upgrade your system.

Debian 9 InstallationGuide_update repositories

Debian 9 Installation Guide: Update Repositories

Proprietary drivers

At the time of creating this tutorial, I don’t have a dedicated graphics card or a WiFi card that require proprietary drivers. So, I cannot demonstrate how to install them. However, for your convenience I want to provide you links to Debian wiki pages on how to install nVidia, AMD Graphic card, and WiFi drivers.

Graphics Card

https://wiki.debian.org/GraphicsCard

Nvidia

https://wiki.debian.org/NvidiaGraphicsDrivers

ATI

https://wiki.debian.org/AtiHowTo  https://wiki.debian.org/ATIProprietary

https://www.reddit.com/r/debian/comments/4a8nyq/fglrx_for_debian_9_will_it_get_back/

WiFi driver

https://wiki.debian.org/WiFi

https://www.youtube.com/watch?v=eUnfVG7Zst0

Conclusion

Following Debian 9 install guide, you should now have a fully functional Debian 9 Stretch.

If you installed Debian with XFCE desktop, you can configure it to look more modern and beautiful.

If you find Debian Stable too outdated, you can also consider installing Debian Testing and receive more up-to-date software.

Please share your feedback in the comments section below.

It's only fair to share...Share on Facebook
Facebook
Share on Google+
Google+
Tweet about this on Twitter
Twitter
Share on Reddit
Reddit
Email this to someone
email

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.