Debian (GNU/Linux) Base System Build

Published on April 12, 2023 at 7:30 am by LEW

Introduction

Over the years I have built a number of computer systems, both desktop and server. In most instances I start by building a base system first, then add only the needed functionality. I choose this method because of previous experience with a wide variety of prepackaged options installing varying amounts of software I would not normally use, or even choose to install.

So rather than cover this subject multiple times, I felt it better to dedicate one post to creating a base starter system, then referring back to it as needed. This post will walk through creating a base Linux system that can be used as a starting point for multiple types of computers.

Note this is edited, updated, and republished from a much earlier post. References to the original post will now point here.

In some cases the term “base” can be a little confusing. Therefore I need to define what I mean by a “base” system. In this post, I am referring to a system comprised of a kernel and a minimum number of system binaries that will get your computer to boot, run, be up-gradable, and connect to a network. No Graphical User Interface (GUI), desktop, games, or productivity applications. On top of this base, various other software can be installed as needed to create a system with the desired functionality.

I have been using Debian as my base server build for years (for desktops I tend to use Arch these days). I use Debian for servers because while not known for having the latest software, it is known for its stability. If you want to follow along with my build, you can acquire the Debian Stable Net Install ISO file at https://www.debian.org/CD/netinst/ (note the net install ISO assumes an Internet connection).

You can create a similar type of build with most Linux Distributions. Note that some of the more “User Friendly” distributions may not have an option to install only a base system. And others may have a specialized sub distribution for this purpose (Ubuntu Server comes to mind).

A Few Quick Notes

In some of the steps, I am assuming a certain level of knowledge and experience. I have made every effort to identify the basic options in the appropriate places, that new users should use.

I have not included pictures or very detailed instructions. At the time of update Debian 11 (Bullseye) is the stable release , while Debian 12 (Bookworm) is in development and should be released in the summer of 2023. The installer tends to go through some changes with each update, and I have found that in some cases out of date pictures can lead to more confusion rather than be of any help. Also, I want this to be somewhat applicable across a range of different Linux distributions.

Hardware Assessment

If you purchased your hardware, then you should have a good idea of what you have. However, if you are re-purposing older second hand hardware of dubious origins, then you may have to do some leg work to identify specific components. Depending on the hardware involved, there may be additional requirements, custom firmware, or other compatibility issues that will need to be addressed.

Some investigative work can be done by booting from a live Linux distribution. “Live” meaning the system is running from a USB key or other removable media, and not the computer hard drive.

For this post I am assuming you know what hardware you have, and what additional drivers, you may need for your system.

Booting from Removable Media

Before getting started, we need to determine how the computer can be made to boot from removable media. When starting the computer watch the initial startup screen for indications of how to reach either the Setup or Boot Menu. Otherwise, you will need to research what the specific key presses are required for your motherboard/system.

Firmware

Generally as long as the network adapter will work, any missing firmware can be added after the installation is complete. If either your video adapter or network adapter requires special firmware, you will have to download it, and determine how it should be used by the system installer.

Note this is usually this is done by adding the un-compressed driver deb package to your boot media, so it is available during the boot process. Another option is to use one of the unofficial Debian images that include non free firmware.

I am going to assume you do not need any special setup to get your system running.

Before You Begin

There is some information the installer will ask for. It is best to gather this information before starting the installation.

Initial Software Install

Using the Debian Net Installer image requires booting from the USB key and having a connection to the Internet. There are two installer interfaces, GUI and command line. Use whichever is most comfortable.

Note the installer will check your hard drive low level format. If it detects GPT, it will do a EFI based install. Otherwise it will use the MBR install. If you need a specific type of install, you will want to set your hard drive up as GPT or MBR before beginning the install.

  1. The first two screens of the installer will let you pick your language and keyboard map. After which the installer will load its basic components into memory.
  2. At this point the installer will look for a DHCP server to assign an IP address. If you are going to use a static address, then at the host name screen, select back to configure the network manually.
  3. You will then be queried about assigning a Host name and a Domain name. Enter the predetermined information from above.
  4. The next sections deal with creating a root password and an unprivileged user account and password. Enter your predetermined information.
  5. You will be asked about the time zone, enter the appropriate one.
  6. Disk partitioning will now start. If you already know what you want to do, you can select manual. If not, you can use one of the guided options to automatically partition the hard disk. Select “save to disk” when you are finished.
  7. At this point the base operating system will be installed. How long this takes will depend on your internet speed.
  8. After the base system loads, you will need to select a software repository. From the list provided, chose one that is close to you.
  9. The installer will ask about a proxy server now. Leave it blank if you do not use one.
  10. Now the installer will check for software updates. Again this is going to depend on your network connection speed.
  11. You will be given the option to participate or opt out of the Debian popularity contest package survey.
  12. Tasksel will start and give you several functional options for your system. Since this is a base system, I opt out of all options.
  13. After some more software updating, you will need to select where the GRUB bootloader will be installed. Your first hard drive is usually a good choice. If you require some variation on this, I am assuming you know what you are doing.
  14. Finally, the installation will be complete. You will be instructed to remove the boot media and restart your system. At this point you should boot into command line mode with a login prompt.

Warping Up

At this point you should have a fully functional base system. Not fancy, but working. You should log in as the unprivileged user and try a few commands. You will find that some commands or their variants will require being logged in as root, or using sudo.

One final step I will cover here is checking for missing firmware. Run the following command to determine of any firmware is not loading.

dmesg | grep firmware

The output should indicate if there is any missing firmware that needs to be installed. Some firmware can be found in the Debian repository, using “apt” to install it. In some cases the firmware will be non-free or proprietary, which will require adding the non-free and contrib to your apt source file, or installing from source code. And based on planned usage, some firmware will not be needed.

Conclusion

I hope I have kept this generic enough to be useful across different distributions, and releases. However I realize this will not apply to all distributions (like Arch or LFS), that have significantly different install processes.

This install, at the time of this writing is about 600 megabytes in size. It is command line only, but can easily be upgraded to include additional functionality, like a GUI.

It is this base I have use for a variety of projects; light weight OS for older machines, web servers, gaming servers, and media servers to name just a few.

Add New Comment

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