How To Install Debian 11 Bullseye Expert Mode Minimal Install
Tags: linux, opensource, tutorial, beginners
Published: 2021-08-24 15:10:43



# Introduction

In this article, I will show you how to do a minimal installation of Debian 11 Bullseye in "Expert Install" mode.

The Debian installer is very flexible. You can easily use the installation media to install Debian as a server or a desktop/laptop. I will go over a minimal installation step by step and include an option to install a desktop environment of your choice. Doing an "Expert Install" will provide you with a few advanced options which allow for better customization of the operating system.

# Why Debian?

### These are some of the reasons why people install Debian.

* Very stable and secure
* Has wide hardware support
* Is a community project of volunteers around the world
* Has a flexible installer that allows for customization
* Upgrades smoothly from one release to the next release

### Here are the requirements for Debian 11 Bullseye.

| Requirements | Minimum | Recommended |
| --- | --- | --- |
| RAM: | 512MB |  2GB |
| Processor (CPU): | 1GHz | |
| Hard Drive: | 10GB | |

A minimal installation is great for a server set up. The benefit of setting up a server with a command line interface you will not use a lot of resources. 

Here is a server that contains **2 gigabytes** of RAM. You see this server is using is only using **61 megabytes** of RAM without a graphical user interface!

```bash
brandon@debian $ free -m
              total        used        free
Mem:           1982          61        1920
Swap:           975           0         975
```

After installing the full Xfce desktop the RAM usage increased to **311 megabytes**.

![74.png](https://i.postimg.cc/nzG53f3n/74.png)

You can use almost any computer for this. If you have some old hardware laying around such as a

* Desktop
* Laptop
* A Mac computer
* Used server hardware

What can you do with a Linux server? Here are some examples.

* [Private Git server](https://dev.to/brandonwallace/set-up-a-git-server-the-easy-way-jke)
* Web server
* File server with NFS or Samba
* Media server
* Database server
* DNS server
* NTP server
* Email server
* Ad blocker
* Set up RAID (Redundant Array of Independent Disks)
* Explore the GNU/Linux operating system


# Installation

Download the amd64 Debian 11 Bullseye firmware-11.5.0-amd64-netinst.iso file from the Debian.org website. Pick the architecture supported by your computer. For example, if your computer is really old it might not support 64-bit (amd64). In that case, you will need the 32-bit ISO (i386) file.

If you need non-free firmware to have drivers to set up for hardware such as WiFi use this ISO file to install Debian.

[firmware-11.5.0-amd64-netinst.iso](https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/amd64/iso-cd/) 
(**Recommended** - includes non-free firmware)

[debian-11.5.0-amd64-netinst.iso](https://www.debian.org/distrib/) 
(non-free firmware NOT included)

Install the ISO file to a USB flash drive using one of these tools.

[Rufus](https://rufus.ie/en/)
[Etcher](https://www.balena.io/etcher/)
[Unetbootin](https://unetbootin.github.io/)
[Pendrive Linux](https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/)

If have Linux installed already you can run the `dd` command to install the ISO to the USB flash drive.
**WARNING!!** If you use `dd` make sure you write to the correct /dev/sdX drive. 

I list my drives in the computer like this.

```bash
$ sudo fdisk -l 2> /dev/null | egrep 'Disk /dev/'

# Output

Disk /dev/sdb: 254.8 GiB
Disk /dev/sda: 120.9 GiB 
Disk /dev/sdc: 15.9 GiB  <== My USB flash drive

```

On my computer the flash drive is /dev/sdc so I run this command.

```bash
$ sudo dd if=firmware-11.5.0-amd64-netinst.iso of=/dev/sdc bs=4M status=progress; sync

# Or

$ sudo dd if=debian-11.5.0-amd64-netinst.iso of=/dev/sdc bs=4M status=progress; sync
```
Find out how to boot off of the USB flash drive. Every manufacture has a different key to press to get to the boot menu. On my computer I press the `F12` key to select the boot menu.

Once you boot off of the USB flash drive the installation menu will come up.
Select **"Advanced options"**.

![1.png](https://i.postimg.cc/T1KxZszB/1.png)

Select **"Expert Install"**.

![2.png](https://i.postimg.cc/g2FpTNNB/2.png)

Choose a language.

![3.png](https://i.postimg.cc/SQHjmLgc/3.png)

I am choosing English because that is one of the languages I speak.

![4.png](https://i.postimg.cc/W1v3kNL3/4.png)

Select your location to set the correct time zone.

![5.png](https://i.postimg.cc/sXqfDy43/5.png)

The locale sets character encoding, date and time formatting, currency, default paper size, etc. The default setting should be fine. For US English the default is **"en_US.UTF-8"**. No need to change this setting.

![6.png](https://i.postimg.cc/mgjb17yX/6.png)

You have the option to add additional locales here if you need them. I will use the default **"en_US.UTF-8"** set on the previous page. Press "Continue".

![7.png](https://i.postimg.cc/4NbGjpqf/7.png)

Here you can select the keyboard layout of your preference such as Dvorak. I will stick with the default **"American English"** here.

![8.png](https://i.postimg.cc/bY1f2Qzx/8.png)

![9.png](https://i.postimg.cc/xdBBXdhp/9.png)

Time to detect the installation media which is the USB flash drive that you booted off earlier.

![10.png](https://i.postimg.cc/kMQL5qcw/10.png)

Press "Continue".

![11.png](https://i.postimg.cc/nrpRm9k2/11.png)

Press "Continue".

![12.png](https://i.postimg.cc/brmT2CdY/12.png)

Installer components get loaded from the USB installation media. 

![13.png](https://i.postimg.cc/KzFrpSMv/13.png)

Optional specialized components can be selected here if you need them. By default nothing is selected. Press "Continue".

![14.png](https://i.postimg.cc/G3XJKfhd/14.png)

Network hardware will be detected here.

![15.png](https://i.postimg.cc/mrWQhfVN/15.png)

Configure the network connection.

![16.png](https://i.postimg.cc/K8BM6pFK/16.png)

**Select "Yes"** to set the IP address using DHCP (Dynamic Host Control Protocol). This is recommended for a desktop/laptop. If you select "Yes", skip the "For a static IP" section. The IP address will be configured via DHCP and you will move on to setting the hostname.

**Select "No"** to set a static IP address. A static IP address is recommended for a server.

![17.png](https://i.postimg.cc/6qRNzZJv/17.png)

**For a static IP** I set my IP address to `192.168.12.34` since I know that will work on my network.

![18.png](https://i.postimg.cc/R0F5yyx9/18.png)

**For a static IP** I set the netmask to /24 which is `255.255.255.0`.

![19.png](https://i.postimg.cc/X7cRJ4V4/19.png)

**For a static IP** I set the gateway to `192.168.12.1` because that is the gateway of my network.

![20.png](https://i.postimg.cc/t44M46SN/20.png)

**For a static IP** I set three public DNS (Domain name servers) using a space as a delimiter.

`1.1.1.1` <== Cloudflare DNS
`208.67.222.222` <== OpenDNS
`8.8.8.8` <== Google DNS

![21.png](https://i.postimg.cc/6pPY6mGB/21.png)

**For a static IP** Verify the networking information is correct. Click **"Yes"** to accept the changes.

![22.png](https://i.postimg.cc/7hqNQvjn/22.png)

Wait 3 seconds for the network link to be detected. Press "Continue".

![23.png](https://i.postimg.cc/qMMLsTsk/23.png)

Set the **hostname** for the computer.

![24.png](https://i.postimg.cc/dVhjfjNp/24.png)

Set a **domain name** for the system. It is better to make something up here. For more information see [RFC6762](https://datatracker.ietf.org/doc/html/rfc6762#appendix-G)

![25.png](https://i.postimg.cc/wMtBz3Kq/25.png)

Set up users and passwords for the system.

![26.png](https://i.postimg.cc/wB0xsDgx/26.png)

Enable shadow passwords. Select **"Yes"** here. This is for security. Shadow passwords will allow the hashed password to be stored in /etc/shadow, which is only readable by root.

![27.png](https://i.postimg.cc/HWJ5dk98/27.png)

For added security, select **"No"** for "Allow login as root". Users will be able to type sudo to run root commands.

![28.png](https://i.postimg.cc/fW6dLQ82/28.png)

Type your full name here. Applications that display your **full name** will use this.

![29.png](https://i.postimg.cc/KvBM3pVZ/29.png)

Type the user name which you will use to log into the computer.

![30.png](https://i.postimg.cc/zGNRCSZT/30.png)

Set a strong password here.

![31.png](https://i.postimg.cc/SN6nx22R/31.png)

Re-type the password you selected to make sure it is correct.

![32.png](https://i.postimg.cc/Bv6bpmhP/32.png)

Set the system clock.

![33.png](https://i.postimg.cc/FRkR57X9/33.png)

If you wish to use NTP (Network Time Protocol) select **"Yes"**.

![34.png](https://i.postimg.cc/nzf8rzQV/34.png)

Select a public NTP server close to where you live for the best outcome. I live in the United States so I set my NTP server to **"0.us.pool.ntp.org"**.

![35.png](https://i.postimg.cc/kMcrM7M9/35.png)

Set the time zone you live in. I selected **"Eastern"** since I live in the Eastern time zone.

![36.png](https://i.postimg.cc/MKTLWRrb/36.png)

The installer will detect the disks connected to the system.

![37.png](https://i.postimg.cc/gkZvq2wb/37.png)

Partitioning the disks will allow us to divide the hard disk into sections. I select **"Guided - use entire disk"** here to install on my empty 500GB hard drive.

![39.png](https://i.postimg.cc/QtKp4867/39.png)

![38.png](https://i.postimg.cc/Yq6xBStf/38.png)

It displays I have one 500GB drive installed in the system.

![40.png](https://i.postimg.cc/PfgkFSqv/40.png)

Select the partitioning scheme you wish to use here. I recommend separating /home, /var, and /tmp partitions to for the following reasons.

* Separate data that needs backing up such as /home to make things easier.
* Isolate parts of the file system to increase security.
* Restrict the growth of a file system. If /var is filled it will not fill the whole disk.

![41.png](https://i.postimg.cc/bJGw1dm7/41.png)

After the guided partitions are created select **"Finish partitioning and write changes to disk"**.

![42.png](https://i.postimg.cc/15yZQfpy/42.png)

The changes will be displayed to make sure that is how you want it. Select **"Yes"** to write the changes to disk.

![43.png](https://i.postimg.cc/rFg2FMJx/43.png)

Install the packages for the base system.

![44.png](https://i.postimg.cc/bv7KFJyc/44.png)

Select a kernel to install in the system. `linux-image-amd64` is the kernel generic package.
`linux-image-5.10.0-8-amd64` will just specify the exact version.

![45.png](https://i.postimg.cc/nzq68Jrs/45.png)

Select **"generic: include all available drivers"** to make sure you install the drivers you need.

![46.png](https://i.postimg.cc/2ywM674r/46.png)

Configure the package manager.

![47.png](https://i.postimg.cc/BQSRzR06/47.png)

This option allows you to scan for extra installation media such as a DVD. We only have the USB we are using to install the operating system. Select "No" to scan extra installation media. Extra programs can be installed from a network mirror.

![48.png](https://i.postimg.cc/vZDkY9Dw/48.png)

Select "Yes" to use a network mirror. This will connect us to a online repository to access more software than what is on the installation USB.

![49.png](https://i.postimg.cc/50WRSRgf/49.png)

Select "http".

![50.png](https://i.postimg.cc/D02pt4RD/50.png)

Pick a network mirror that is closest to you for the fastest download.

![51.png](https://i.postimg.cc/sxwHyDr2/51.png)

![52.png](https://i.postimg.cc/sXvg5Kjf/52.png)

Leave HTTP proxy information blank and select "Continue" unless you know you are using a proxy.

![53.png](https://i.postimg.cc/mDzTPDjt/53.png)

Select use "non-free" software. Recommended for a desktop/laptop.

![54.png](https://i.postimg.cc/7hSDNWp4/54.png)

Source repositiories in APT will allow you to download the source code for packages. You can select "No" here. This can be enabled easily in /etc/apt/sources.list later if you want.

![55.png](https://i.postimg.cc/ZqgSzmmZ/55.png)

It is recommended to install security updates. Click "Continue".

![56.png](https://i.postimg.cc/LsJcTW1W/56.png)

Select and install software.

![57.png](https://i.postimg.cc/90YK056D/57.png)

It is your choice to have security updates installed automatically using the unattended-upgrades package. The default setting is to not run automatic security updates.

![58.png](https://i.postimg.cc/fT51hs7F/58.png)

You can join the package survey if you wish here.

![59.png](https://i.postimg.cc/jdqkc9Vh/59.png)

For a minimal Debian install I have deselected everything here except for "standard system utilities". This will provide you with a lean system that is not resource hungry. Remember other packages can be installed later.

![60.png](https://i.postimg.cc/QNmfFbBK/60.png)

Install GRUB to the boot loader of the hard disk.

![61.png](https://i.postimg.cc/ZqPr1bpv/61.png)

Select "Yes" to install GRUB to the primary drive.

![62.png](https://i.postimg.cc/xCtL16s0/62.png)

I have one drive in the computer, /dev/sda. I will select that option instead of entering it manually.

![63.png](https://i.postimg.cc/KvLrnDj5/63.png)

Select "Yes" to force GRUB installation to the EFI removable media path to a fallback location just in case the EFI firmware does not meet the EFI specification.

![64.png](https://i.postimg.cc/sXq7WMR8/64.png)

Click "Enter" to finish the installation.

![65.png](https://i.postimg.cc/SN0cNYdY/65.png)

Click "Yes" to set the system clock to UTC.

![66.png](https://i.postimg.cc/0NNwHYkF/66.png)

If you wanted to set up a server, once you get to this point reboot the computer and your Debian installation is finished. 

![67.png](https://i.postimg.cc/SxgX8n6r/67.png)

If you only wanted a minimal server you are done with the installation process. Click "Continue" to reboot. Remember to remove the USB flash drive installation media. Upon reboot you will be presented with this splash screen. 

![68.png](https://i.postimg.cc/RV9qD7Gd/68.png)

# How to add a desktop environment

If you wanted a graphical user interface sign in and install the desktop of your choice. You have many desktop options such as Xfce, Gnome, KDE, Mate, LXDE. See `task-xfce-desktop` `task-gnome-desktop` `task-kde-desktop` etc.

To install the Xfce desktop run these commands.

```bash
$ sudo apt update

$ sudo apt upgrade

$ sudo apt install task-xfce-desktop 

$ sudo systemctl reboot

```

After logging in you will be presented with the Xfce desktop.

![71.png](https://i.postimg.cc/2ypQL1Q6/71.png)

# Conclusion

I have shown you how to expert install of Debian 11 Bullseye step by step.
You will be now able to use Debian's flexible installer to install a minimal server or a desktop/laptop.

Thank you for reading my article.

Follow me on [Dev.to](https://dev.to/brandonwallace) and [Github](https://github.com/brandon-wallace).

Please feel free to leave comments, questions, and suggestions.