With the (still) ongoing chip shortage, some makers might have to compromise with cheaper or older single-board computers in order to keep their projects going. This has drawbacks: these devices often have less memory, slower processors, and possibly deprecated software supports. So, what to do?

In most cases, the answer is reducing the computer’s load by using a lightweight operative system.

Enter DietPi.

As the name suggests, it’s a light installation for a wide variety of devices. It’s completely free and open source, with constant updates rolling out. This will allow you to make the most of older SBCs with even just 512 MB of RAM.

Before jumping into what makes DietPi so great, let’s recap a couple of definitions.

A single-board computer, SBC for short, is a device with every key component of a normal computer integrated into one board. Instead of being swappable, RAM, CPU, network adapters, and sometimes even storage are cramped in a small form factor unit and soldered onto the board. SBCs work like any other PC: they have an operating system (OS) to work, and they can be used in a desktop environment with a mouse or by command line with only a keyboard.

Speaking of the OS, most, if not all SBCs support Linux-based systems. Linux is a free and open-source baseline for many other OSes. These are called distributions and act as the actual operating system. Ubuntu, Debian, Raspberry Pi OS, and Armbian are some of the most popular in our case.

Now that we’ve set the ground, let’s see what DietPi actually does.

Featured image of The Best Single-Board Computers
Great Options to Consider
The Best Single-Board Computers

Back to Contents

DietPi (SBC Software Solution): All You Need to Know

What Is DietPi?

DietPi works like Raspberry Pi OS, but much faster
DietPi works like Raspberry Pi OS, but much faster (Source: damienhull via Reddit)

DietPi is a Debian-based Linux distribution for ARM CPUs, aimed at improving the performance of SBCs. But there’s a slightly convoluted twist: DietPi is not a standalone operating system. At its core is a collection of scripts that are installed upon a basic Debian distribution.

The key components of the OS, like the kernel (which handles the talking between the hardware and operative system) and device firmware, are unchanged compared to the SBC manufacturer’s own distribution. This means that under the hood, running DietPi on a Raspberry Pi device is very close to using Raspberry Pi OS lite, with a few more tweaks.

The optimization here is given by stripping down the basic installation of unnecessary software add-ons and optimizing the remaining ones. This lowers the number of background processes, freeing up memory and CPU cycles for whatever application the user wants (like running Klipper or OctoPrint).

It’s the best of two worlds: maximum compatibility thanks to manufacturer drivers and firmware for networking, USB, and peripherals, but packaged in a light system with very little computational strain.

This all sounds great until the discussion gets to the “stripping down” part. How lite are we talking about here?

Back to Contents

Advertisement
Advertisement
DietPi (SBC Software Solution): All You Need to Know

Software Features

The default desktop enviroment for DietPi is LXDE
The default desktop enviroment for DietPi is LXDE (Source: PcMac via YouTube)

As we mentioned, DietPi is essentially a collection of optimization scripts and a bloatware remover. The system as a whole will still be fully functional and not inherently limited: the user can still run a desktop environment, install all the software packages and services they wish to, and use the default commands for Debian. For most users, the experience won’t differ significantly.

While the basic installation isn’t full of fancy packages, it doesn’t compromise on capabilities. Many stock system routines are swapped for their stripped-down in-house counterparts, such as DietPi-Dashboard for checking system usage, and DietPi-RAMlog to monitor RAM resources and content. This includes networking utilities, SSH servers, and File servers.

You can check out the full list with all the supported optimized software to make sure what you’re looking for is available.

If you need a specific tool, the developers have got your back. To make software installation and hardware configuration more user-friendly, DietPi incorporated a utility, DietPi-Launcher, to gain rapid access to all of their tools. This tool can be invoked from the command line but features a graphical user interface (GUI) to manage and control all of the settings.

With DietPi-Launcher the user can:

  • Install the optimized software DietPi offers
  • Configure system parameters like display and audio settings, network adapters, CPU overclock
  • Manage partitions and drives
  • Update and clean the system
  • Do much more

As we mentioned before, DietPi doesn’t obstruct the normal operation of the system, meaning that you can still install, modify, update, and customize everything, as usual.

Back to Contents

Advertisement
Advertisement
DietPi (SBC Software Solution): All You Need to Know

DietPi vs. Raspberry Pi OS

Note that the percentage values are in a ratio format: 100% is identical performance
Note that the percentage values are in a ratio format: 100% is identical performance (Source: DietPi)

While the kernel and firmware remain the same, switching to DietPi does come with a hefty performance advantage. Comparing the two most popular OSes is a great way of understanding how big of an improvement are we talking about here. Luckily, DietPi has released a few benchmarks for us to look at.

For example, compared to Raspberry Pi OS Lite on a Pi 4, DietPi runs with less than 50% memory consumption and 41% disk usage thanks to an almost halved pre-installed packages count. This is particularly important for those running older or less powerful SBCs.

On the other hand, DietPi becomes less advantageous when compared to server images on Armbian and Debian, especially on higher-end systems or even x86 architectures. This is because DietPi tends to focus on Arm32 and 64-bit applications with a lot of computational overhead. For more traditional desktop tasks, kernel rework is needed in order to gain a few percentage points.

DietPi has also shared more precise and in-depth benchmarks and usage statistics worth checking out.

Performance isn’t everything, though. Being a stripped-down installation, DietPi also lacks most of the tools and refined GUI that Raspberry Pi incorporated into its OS. Educational and less experienced users might find themselves uneasy if required to install all of their software packages manually. Most pre-installed programs will have a lighter (and possibly less friendly) user interface, which isn’t always an advantage. Compared to Pi OS, this can become a bit of a headache for those looking for an all-in-one installation.

But DietPi may still be the best way to go, so let’s take a look at how you can install it on different SBCs.

Back to Contents

Advertisement
Advertisement
DietPi (SBC Software Solution): All You Need to Know

Get Started

Balena Etcher is practically foolproof
Balena Etcher is practically foolproof (Source: DietPi)

Installing DietPi is extremely easy. Not only is the procedure itself short and straightforward, but it’s also very well documented. It comes down to the SBC you’ll be working with.

Installation on Supported SBCs

If your SBC is one of the supported ones, you’re in luck. This is the least complicated method and follows the classic setup:

  • Download the package for your board and extract the compressed files with a tool like 7z.
  • Use Balena Etcher to create a disk image and load it into the SD card. It’s a simple 3-step process: select the image file, select the destination drive, and flash the image.
  • Insert the SD card and power on the SBC. Log in with the default credentials of root and dietpi as the password.
  • Configure the system as prompted.
  • You can then install a full desktop environment with the aforementioned dietpi-launcher.

Installation on Unsupported SBCs

As we explained, DietPi is a collection of scripts. This makes it quite easy to install on devices that aren’t officially supported but can run a Debian OS. Caution: this method will delete all the user data!

Make sure that your OS has all the listed requirements before proceeding, such as having Debian or Raspbian running on the system and the specified packages installed beforehand.

Once the above is confirmed, you can follow the full procedure that’s mentioned in DietPi’s very detailed guide.

Installation on PCs & Virtual Machines

DietPi also has a few images ready to go for the most widespread virtual environments such as VirtualBox, VMware, Hyper-V, and Parallels. It also features x86 desktop images for both newer UEFi systems and legacy BIOS PCs. If you wish to check out the OS before installing it, we suggest you try it in one of those VMs. If you’re looking for a modern system to resuscitate an older PC, definitely try out the latter.

Since it’s a very situational setup procedure, we refer you to the official guides for each platform.

That’s it! Enjoy faster boot times and a snappier interface!

Back to Contents

Advertisement
Advertisement
Advertisement