DietPi for newbie

Thank you for introducing DietPi. It is truly Linux as it makes one think!
I have been using Raspberry Pi for quite some time. Configuration or software installation is a breeze with Raspbian. Unfortunately, it is not so with DietPi.
The network I am using is under firewall. I can access Internet after logging in a Web Browser. From text mode, I cannot use Internet. I thought I could use mobile hotspot for which dietpi-config is required. But I am unable to use it as 'the first run is not over. Please reboot". Even after rebooting, I get the same error message. I have been asked to submit a bug report. Hence this message.
In dietpi.txt, I am advised to use dietpi-wifi.txt for entering wifi credentials. But where is that file?

Thanks again in advance for your help.

thanks for your report.

I would recommend to start from scratch and to re-image your SD card with a clean DietPi installation. Once done, remove your SD card, wait a second and put it back to your desktop computer. Usually it should mount the SD card again and you should have a new drive called boot. There your would need to adjust the following 2 files


##### Networking Options #####

dietpi-wifi.txt (WiFi information are case sensitive)

# - Entry 0

Once adjusted, unplug the SD card from your desktop computer and put it into your RPi.

Thanks for the prompt reply. Shall try it tomorrow. Has desktop been mentioned in your web site?
After writing to you, I found a file called something like wifidb and I could configure wi-fi dongle (D-Link) but no IP address could be obtained. Also, I had to physically remove ethernet cable as otherwise static IP was shown always. Anyway, shall again try tomorrow.

One other small comment - when you put the uSD card back into the PC, if it’s a Windows PC you’ll see the boot partition as a new drive, but you may also see other drive(s) created which Windows will say has problems and will offer to try and fix them.

Do not do this, as they are perfectly fine but are just in a Linux-based format which Windows does not understand and cannot recognise properly or read. If you let Windows try to “fix” them all that will happen is that you will break them.

For the adjustments above the only drive/partition you need to access is the boot one, which Windows can see and read fine as it’s in a compatible format.

Thanks for the quick response!
I am using an old i5 desktop with LFS-9.0. I ran ‘dd’ command again to write in another 8GB SD card. This time I could see dietpi-wifi.txt. (LFS file browser shows only one directory whereas Ubuntu-18.04 shows both boot and rootfs directories! Strange! It needs some research now.) I did corrections in both dietpi.txt and dietpi-wifi.txt and then connected the SD card in RPi. There is no ethernet cable but only D-Link wi-fi dongle. ‘ip a’ command shows no IP in wlan0. I ran ‘dhclient wlan0’ without any result.

It is obvious DietPi cannot proceed without Internet as ‘DietPi Login handler’ comes into circuit whatever be the configuration…

It is clear that your team has put in a lot of efforts. Will it not be better if DietPi boots into at least LXDE and we can bother about Internet later? It will be ideal in situation like mine when LAN is under firewall and I can access Internet only after logging into the firewall.

Please think over. Q4OS Linux distro has problems somewhat similar to this. It boots into Xwindow all right but needs Internet for further installation. Unless the ethernet’s MAC ID is bound in the server, I cannot use Internet but mobile hotspot works.

booting into a desktop environment be default is not the idea behind DietPi. DietPi is an extremely lightweight Debian OS, therefore it doesn’t contain that much software and it dons’t ship any additional packages compare to a standard Debian/Raspbian Lite. Every software title that is needed in addition, would need to be downloaded (requires an internet connection) and installed. DietPi is that lightweight, that it basically contains nothing except stuff that is needed to boot up.

Just to get an idea in the comparison between DietPi and Raspbian Lite. It’s from 2015 but still valid.

What kind of SBC you are running? Does it contain on-board WiFi or do you need to use a WiFi dongle?

Thanks for the reply. Your point is well-taken. My situation is slightly different here. However, I have both ethernet and wi-fi at home without any firewall and I shall continue testing DietPi there after some time.
I have both RPi 2 and 3 here. and I am testing DietPi in RPi 2. Cofiguration is no problem but IP is not obtained from dongle. I shall test DietPi in RPi 3 also which has in-built wi-fi.

In continuation of my previous mail, I would like to add the following:
I wanted to suggest my organisation to try DietPi but I need to test it before giving suggestion. Now, I have removed ethernet connection. ‘ip a’ command gives no IP in either eth0 or wlan0. But just after login, ‘dietpi-login’ command becomes operational. I try to edit network connection but the message says " First-run setup has not reached sufficient state. Please reboot before using DietPi-Config. If this issue persists, please report this as bug.". This is happening every time I login.
Obviously this is a bug.
Secondly, you have said this is a minimal software. Agreed. But wi-fi should work in the absence of ethernet. What I feel is that this bug prevents from wi-fi from becoming effective. I have configured wi-fi properly. Anything more to be done?
Your solution to this problem will be much appreciated.

Well, let’s find out if this is really a bug or not. Usually WiFi should work right at the beginning. Even on headless systems it works because WiFi packages are already available on the default image. You just need to enable WiFi and set correct WiFi credential before first boot.


##### Networking Options #####

dietpi-wifi.txt (WiFi information are case sensitive)

# - Entry 0

I checked it on my RPi4B with OnBoard WiFi and it was working out of the box (just changed the 4 lines). On your system it might be different as you are using a dongle. Probably there is something more needed than just to enable WiFi.

But you are right, if you are using the latest available DietPi image (based on v6.28) and you will have no valid network connection during first initial boot, you got stuck as you are not able to enter dietpi-config (infinity loop).

As a workaround, you could use the older image based on v6.25. You will hit the same no valid network connection step but there you are able to access dietpi-config. This should allow you to setup network and continue with the first Initial setup process. If needed I could provide RPi image v6.25 out of my privat archive.

Thanks for the patient reply.
I tried all three SD cards in RPi 3 B+ without dongle but the problem persisted (without Ethernet and with built-in wi-fi. Shall try in a new RPi 4 after some time.
I shall be grateful if you could provide me with an older version of DietPi. Many have multiple RPi units and this will help them also.

today was testing again on my old RPi3B+. OnBoard WiFi was working out of the box without any issues. I did the following:

  • download current image for RPi based on v6.28
  • flashed to my 32GB SD card using balenaEtcher-Portable-1.5.70
  • after completion I adjusted dietpi.txt as well as dietpi-wifi.txt to have WiFi enabled
  • insert SD card into my RPi3B+ and plug power on
  • I was waiting 2-3 minutes and than I could see the DHCP request on my DHPC Server
  • connecting to the given IP address using SSH
  • run initial Setup without issues

 DietPi v6.28.0 : 15:11 - So 19.01.2020
 - Device model : RPi 3 Model B+ (armv7l)
 - Uptime : up 11 minutes
 - CPU temp : 49'C : 120'F (Optimal temperature)
 - LAN IP : (wlan0)
 - Info Text : !!! DEMO RPi3 System !!!

So not sure what is wrong on your system. But maybe you can find out using the old RPi v6.25 image. I upload it to my privat cloud.
Password: DietPi

This is in continuation of my previous mail.
I continued my work today in RPt 3 B+ with DietPi software. I am sorry that I did not notice the other day that wlan0 was getting local DHCP network instead of DHCP from mobile hot spot. It was very strange and never happened even once earlier.
Anyway, static IP is working now and firewall is not giving any problem. So far!!
I am installing LXDE now. …
Got stuck in between… The installation is asking too many questions. Shall try for some more time and then call it a day! It could be that local firewall is doing some problem! I cannot take it up with local authorities unless I can prove that the software is beneficial.
I have been working with Linux for many years. I have compiled LFS and BLFS many times. But installing DietPi software is not easy.


somehow you post is confusing me. But let’s check it 1 by 1.

I am sorry that I did not notice the other day that wlan0 was getting local DHCP network instead of DHCP from mobile hot spot.

Are you using the same WiFi SSID for your local network as well as for your mobile HotSpot? Usually both Network should use a different unique WiFi SSID. Otherwise it would be strange how your RPi can connect to you local network as the HotSpot WiFi SSID was specified in dietpi-wifi.txt before.

Anyway, static IP is working now

If you are connected to the correct HotSpot Network, using the unique WiFi SSID, it should not matter if the IP is given by DHCP or STATIC

firewall is not giving any problem

Do you have a firewall on your Mobile HotSpot?

The installation is asking too many questions

pls can you specify which questions are ask? Usually software installations using dietpi-software are quite unattended.

It could be that local firewall is doing some problem!

I thought you are connected to your Mobile HotSpot. Does it has any firewall?

But installing DietPi software is not easy.

Installing software on DietPi is one of the easiest and smoothest thinks on earth. DietPi scripts doing a lot of magics in the background and taken quite a lot of configurations steps. Imagine of you would need to do this all manuell.

Below the walkthrough for LXDE

  1. login to your DietPi system using SSH
  2. run dietpi-software
  3. search and select LXDE
  4. don’t agree on the question for autostart
  5. hit install
  6. confirm to start installation
  7. confirm adjusting GPU settings
  8. reboot
  9. done

Thanks for the quick response.
Finally, I have managed to install LXDE and OpenSSH. Firefox ESR was also installed. YouTube is working all right with sound.
I shauld say it is a woderful software. Loads very quickly. Unfortunately, it was not an easy installation. But it is worth all the trouble.
I shall now try the second SD card and try to answer your queries. Thanks again! Very good work by your team!!

maybe you can post some of the error messages you are facing. As already said, the installation of LXDE is running smoothly usually. As well OpenSSH can be easily installed using dietpi-software and change the SSH Server preference.

I tried all the 3 SD cards yesterday, 2 with ethernet and one with wi-fi (but ethernet cable was present but not functional). One important error message which appeared during all the three installations was that “Error getting Internet. Please try again” or something to that effect. When I pressed ‘Enter’ the installation ran smoothly. I think the error was getting into the mirror web site.
One more thing: I tried DietPi in the room with the help of a TV with HDMI input. The Firefox browser often crashed whenever we pressed FFW. Also, I needed to adjust screen size but I could not find any file to do it. Can we install palemoon web browser?
I shall do test some more and let you know. I remember that the previous RPi 3+ had its MAC address bound in the Server. But this RPi 3+ also worked without problem from firewall. I need to confirm this.
I need to confirm whether wi-fi takes precedence over ethernet, as you have mentioned in the document.
This dietpi-wifi.txt was not found in 2 out of 3 SD cards. I managed wi-fi settings in /DietPi/dietpi/func directory using dietpi-wifidb file.
I repeat: the loading is very fast. No doubt it is an excellent work by the team! However, I had to try many times to come out of scripts. It needs a few trials for the user as it is not intuitive.

This is in continuation of previous mail.
I continued the installation with wi-fi using mobile hot spot. Docker was installed fine. (Again, the error-handler wanted me to retry which I did). Then command ‘dockerr pull jellyfin/jellyfin’ installed jellyfin media server. (Earlier, I installed Emby server but I did not know how to use it. You may be aware that jellyfin is free version of emby server.) After some commands, jellyfin ran fine but ‘localhost:8096’ in a web browser could not play *.mkv or *.mp4 or *.avi files. The error message was:
I then installed ‘ffmpeg’ and the localhost was able to play *.mkv file. Palemoon browser in the LAN also was able to play some files. More on this, later, if you are interested.
But the actual problem which you may like to know is this: I wanted to use LAN to test jellyfin. I switched off mobile hot spot. But I had to reconfigure ethernet card again so that it becomes operational. Without wi-fi or ethernet, the boot loader is searching for NTP, giving typical systemd delay 60 times. Very annoying! Moreover, I cannot run any command in DietPi. I then used a PC to reconfigure.
If your team can rectify this error, it will go a long way in popularising DietPi.

Without wi-fi or ethernet, the boot loader is searching for NTP, giving typical systemd delay 60 times

This is an expected behavior and can be changed using dietpi-config tool. There you can switch off NTP Sync completely if not needed.

I managed wi-fi settings in /DietPi/dietpi/func directory using dietpi-wifidb file

Still I don’t understand why you are doing this directly in the config file. Ethernet as well as WiFi connections can be managed using dietpi-config tool.

The Firefox browser often crashed whenever we pressed FFW

You are free to install Chromium if FF is not working. pls keep in mind that DietPi is not providing any software by themselves. All software packages are downloaded from official Vendor sides.

his dietpi-wifi.txt was not found in 2 out of 3 SD cards

pls keep in mind, dietpi-wifi.txt is present directly after flashing the SD card only. As soon as you put your SD card into your RPi and power it on, the file is gone. Fell free to open the *.img file with an appropriate tool like 7zip. There you will see dietpi-wifi.txt being part of the image. If the file is not present right after flashing, something went wrong writing the SD card.

“Error getting Internet. Please try again” or something to that effect.

It would be good to know exact error messages or screen prints. Otherwise we are not able to help

Also, I needed to adjust screen size but I could not find any file to do it.

Display options can be changed using dietpi-config tool. Some other display settings can be done on /DietPi/config.txt

It needs a few trials for the user as it is not intuitive.

looks like you try to manage a lot of thinks on config files, while majority of settings can be done using dietpi tools offering user dialog/menue

Issue 2: (Solved partially)
In a new 32GB SD card, I installed MATE yesterday and I tried to install ffmpeg etc. today. The error messge I am getting is reproduced below.

Command: G_AGI ffmpeg
Exit code: 100
DietPi version: v6.28.0 (MichaIng/master) | HW_MODEL:3 | HW_ARCH:2 | DISTRO:5
Image creator: DietPi Core Team
Pre-image: Raspbian Lite

file content:
Failed to fetch
armhf.deb Undetermined Error [IP: 80]
Failed to fetch
hf.deb Undetermined Error [IP: 80]
Failed to fetch

Retry : Re-run the last command that failed
DietPi-Config : Edit network, APT/NTP mirror settings etc
Send report : Uploads bugreport containing system info to DietPi

However, when I press ‘Ok’, the installation continues.

looks like you have issues to get data from that source. But this is out of DietPi control as we don’t provide the content of this source. Maybe there are issues at the software provider side.

running G_AGI ffmpeg is nothing else than standard debian command sudo apt-get install