DietPi for newbie

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
vsayanam
Posts: 12
Joined: Thu Jan 16, 2020 9:50 am

DietPi for newbie

Post by vsayanam »

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.

User avatar
Joulinar
Posts: 1779
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi for newbie

Post by Joulinar »

Hi,
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

dietpi.txt

Code: Select all

##### Networking Options #####
AUTO_SETUP_NET_ETHERNET_ENABLED=0
AUTO_SETUP_NET_WIFI_ENABLED=1
dietpi-wifi.txt (WiFi information are case sensitive)

Code: Select all

# - Entry 0
aWIFI_SSID[0]='xxx'
aWIFI_KEY[0]='xxx'
Once adjusted, unplug the SD card from your desktop computer and put it into your RPi.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

vsayanam
Posts: 12
Joined: Thu Jan 16, 2020 9:50 am

Re: DietPi for newbie

Post by vsayanam »

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.

DarrenHill
Posts: 28
Joined: Wed May 08, 2019 3:00 pm

Re: DietPi for newbie

Post by DarrenHill »

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.

vsayanam
Posts: 12
Joined: Thu Jan 16, 2020 9:50 am

Re: DietPi for newbie

Post by vsayanam »

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.

User avatar
Joulinar
Posts: 1779
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi for newbie

Post by Joulinar »

Hi,
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.

https://docs.google.com/spreadsheets/d/ ... edit#gid=0

What kind of SBC you are running? Does it contain on-board WiFi or do you need to use a WiFi dongle?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

vsayanam
Posts: 12
Joined: Thu Jan 16, 2020 9:50 am

Re: DietPi for newbie

Post by vsayanam »

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.

vsayanam
Posts: 12
Joined: Thu Jan 16, 2020 9:50 am

Re: DietPi for newbie

Post by vsayanam »

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.

User avatar
Joulinar
Posts: 1779
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi for newbie

Post by Joulinar »

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.

dietpi.txt

Code: Select all

##### Networking Options #####
AUTO_SETUP_NET_ETHERNET_ENABLED=0
AUTO_SETUP_NET_WIFI_ENABLED=1
dietpi-wifi.txt (WiFi information are case sensitive)

Code: Select all

# - Entry 0
aWIFI_SSID[0]='xxx'
aWIFI_KEY[0]='xxx'
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.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

vsayanam
Posts: 12
Joined: Thu Jan 16, 2020 9:50 am

Re: DietPi for newbie

Post by vsayanam »

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.

Post Reply