A Look at DietPi: A Lightweight OS for Your Pi Board

A Look at DietPi: A Lightweight OS for Your Pi Board

DietPi caught my eye some time ago, but I really started to become acquainted with it when I reviewed the Orange Pi Zero recently.  It more than deserves a good review of its own, which is what this post provides.

DietPi logo

DietPi describes itself as “lightweight justice” with a “highly optimized minimal Debian OS” for your pi board.  There are several pi boards supported including variants of Raspberry Pi, Banana Pi, Orange Pi, NanoPi, Odroid, the new Asus Tinker Board, Sparky SBC (Allo), and even the RoseApple Pi.   It appears to leverage much of the work done by Armbian/Debian and provides its own tweaks coupled with tools for easy administration, especially its DietPi-Software tool.  So while it may be lightweight in terms of system resources, it is actually quite powerful in terms of overall user experience and administration.  And if that were not good enough, it has a pretty cool, if slightly intimidating, logo. 🙂

DietPi provides a rather staggering collection of useful tools for easy administration of the system.  These include:

  • DietPi-Software: a graphical interface to easily change configurations, change your preferred server software (ssh, file server, web server)
  • DietPi-JustBoom: audio setting (EQ and MPD)
  • DietPi-AutoStart: lets you choose what desktop or software to start when the system boots up
  • DietPi-Cron: manage cron jobs
  • DietPi-Process_Tool: adjust settings for various daemons/servers/processes
  • DietPi-Drive_Manager: detect and manage drives
  • DietPi-Update: to keep the system updated
  • DietPi-Backup: set up and manage rsync backups
  • DietPi-Sync: sync one directory to another
  • DietPi-Cleaner: remove unwanted stuff, like dev packages, manpgaes, files and logs, and apt cache
  • DietPi-BugReport: file a bug with DietPi
  • DietPi-CpuInfo: find CPU temperature, frequency ranges
  • DietPi-LetsEncrypt:  manage Lets Encrypt/free SSL certs
  • DietPi-MorseCode:  converts text into morse code

DietPi-Software in particular is an awesome tool, removing much of the manual ‘apt-get’ or other Linux commands that you would normally execute via command line.  Instead, you have a simple, intuitive, guided interface with automated scripts to install software or change system settings.

DietPi Installation & System Set Up

As usual, download the image for your pi board from DietPi download and put it on a microSD card using a tool like Etcher.  Stick in the microSD card, plug in an Ethernet cable, and then connect the power cord.  There are step-by-step installation and set up instructions available through a DietPi forum page.

Since there is no HDMI port on my Orange Pi Zero, I needed to access DietPi by connecting over the network using ssh:

ssh root@<IP address>

The password is dietpi.  (Please change the password for security reasons).

Once you log in, you will need to select OK at a GPL v2 compliance notice. DietPi will immediately begin an update process. When that it is done, it will let you know with another notice where you select OK to continue. DietPi will then reboot.

When I tried to ssh into the Orange Pi Zero after the reboot, I encountered an error that the ssh key had changed. So, I removed the key for the IP address of the pi board in the known_hosts file located in my .ssh directory.  After that I was able to ssh into the pi board without issue.  At this point, you are greeted with the DietPi-Software screen.

DietPi-Software
The DietPi-Software graphical interface

I easily changed my timezone and locale. I also changed my Audio Options, setting the 3.5mm jack as the default output. This caused DietPi to download and install some Linux packages, returning to the graphical interface once completed.

I had not preconfigured the WiFi, so I did this through the graphical tool. Enabling WiFi again caused DietPi to download and install packages, returning me back to the graphical interface with WiFi shown to be “Available | Enabled | Disconnected”. To connect to my WiFi router, I used the graphical tool to scan for my SSID, set the password, and apply the settings. DietPi connected to the WiFi right away.

On my little Orange Pi Zero, the WiFi was only a 6.5 Mbit connection, which was surprising as the very same pi board got a 19.5Mbit/s WiFi connection in my performance testing with Armbian. I was unable to change my country code from GB to US for an unknown reason.  To be fair, WiFi support is a known problem on the Orange Pi Zero regardless of the OS.  For my purposes, using the Ethernet connection was perfectly fine.  [Update 29 April 2017: An update to DietPi was released, and after applying the update on my Orange Pi Zero the WiFi performance is 19.5Mbit/s, just like I experienced with Armbian.]

Easy Software Installation

I really wanted to test out the automated software installation.  I did so by trying to get set up a variation of the pi board as music server idea that I have done before, but this time I wanted to remotely control the pi board to play music on its own attached speakers.  My Orange Pi Zero with the Zero Interface Board inside the black case was connected to the network and a nice set of speakers.  So, I selected MPD (music player deamon) and O!MPD (a web interface for MPD) from the Software Optimized menu in DietPi-Software.

To satisfy my software installation, DietPi went through an iterative process to automatically download and set up various prerequisite software and my selected optimized software. The final step for the software installation/set up was for DietPi to reboot. This process took several minutes but required no action on my part – you just have to be patient and let DietPi do its thing.

I accessed O!MPD using the url example provided by the DietPi forum entry (http://<IP address>/ompd). I did not have sound coming out at first, and I eventually discovered in alsamixer that the audio line out was muted. So after un-muting the line out, the music was blasting!

O!MPD
O!MPD rockin’ on DietPi

Conclusion: Installation of software on DietPi simply could not be easier.  If something like sound is not working, double check your settings.

Thoughts

For those who are not as fond of using the command line to ‘apt-get’ this and ‘nano’ that, DietPi seems to be a real solution to easily set up and manage your pi board.  For those of us that are more comfortable with the command line, DietPi makes it rather convenient to administer the system and enables us to spend more time enjoying our little pi board project or server.  Either way, it is a great resource to get your pi board doing something awesome.

One thought on “A Look at DietPi: A Lightweight OS for Your Pi Board

  1. I gather it is a armv6 distro, since the arm pi download speaks of supporting “all” pi hardware. I see that as both good and bad, actually. Good if you do actually care about original pi1 hardware, bad if you want to integrate and build armhf jessie packages for deployment on current pi, so your back to having to maintain a separate and non-supported debian hardware archive for armv6 for this, and will also get poorer performance on newer armv7 pi2’s. I do like that they also have x86 imagines and vm’s as it may also be useful for a nice very lightweight base system for an x86 server too.

Comments are closed.