Dietpi.txt Help

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Posts: 13
Joined: Sun Jul 26, 2020 12:23 pm

Dietpi.txt Help

Post by RedDirtPi »

In the dietpi.txt file I have enabled auto setup, then in the next section, configured the software I want automatically installed. It is setup on WiFi and the dietpi-wifi.txt has been configured. However, when I log in via SSH, I basically have to go through the setup from scratch. Nothing is installed from the list. Each item on that list is on its own line and I confirmed with the GitHub list that the software ID's are correct.

Am I missing something. I was under the impression that in doing this that you could just put in the SD card and let it rip. At least that was my hope anyway.

I can watch my router and see it connect on WiFi (I use DNS Reservation so it gets the same IP) so it does not appear the network connection is the issue. Is it not possible to do what I am envisioning?
User avatar
Posts: 2044
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi.txt Help

Post by Joulinar »


Many thanks for your messages. In theory its possibly to perform installation on first initial setup automatically. Wouldn't be good if you can see your dietpi.txt file. Than we can have a look what's missing.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Posts: 13
Joined: Sun Jul 26, 2020 12:23 pm

Re: Dietpi.txt Help

Post by RedDirtPi »

Thanks Joulinar for your reply. Below is my dietpi.txt file:

Code: Select all

# - This is intended for advanced users, unless you know what you are doing, do not edit this file. Please use the DietPi programs instead.
# - Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand.

# D I E T - P I
# DietPi-Automation settings, applied on first boot of DietPi only, ONCE!
##### Language/Regional Options #####
# Locale: eg: "en_GB.UTF-8" / "de_DE.UTF-8" | One entry and UTF-8 ONLY!

# Keyboard Layout eg: "gb" / "us" / "de" / "fr"

# Timezone eg: "Europe/London" / "America/New_York" | Full list (TZ*):

##### Networking Options #####
# Enable Ethernet or WiFi adapter: 1=enable | 0=disable
# - If both Ethernet and WiFi are enabled, WiFi will take priority and Ethernet will be disabled.
# - If using WiFi, please edit dietpi-wifi.txt to pre-enter credentials.

# Force ethernet speeds: 0=automatic speed | 10 = 10Mbit | 100 = 100Mbit etc
# - This is mainly aimed at Pine A64 which may have an HW issue that causes unstable 1Gbit link.

# WiFi country code: 2 uppercase character value (e.g. GB US DE JP):

# Enter your Static Network details below, if applicable.

# Hostname

##### Misc Options #####
# Swapfile size to generate: 0=disable | 1=auto (2GB-RAM = size) | 2+=manual (MB)
# Swapfile location

# Disable HDMI output (and GPU/VPU where supported) for supported devices: RPi, Odroid C1, Odroid C2

# Unmask (enable) systemd-logind service, which is masked by default on DietPi

# Custom Script (pre-networking and pre-DietPi install)
# - Allows you to automatically execute a custom script before network is up on first boot.
# - Copy your script to /boot/ and it will be executed automatically.
# - Executed script log: /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log

# Custom Script (post-networking and post-DietPi install)
# - Allows you to automatically execute a custom script at the end of DietPi install.
# - Option 0 = Copy your script to /boot/ and it will be executed automatically.
# - Option 1 = Host your script online, then use e.g. AUTO_SETUP_CUSTOM_SCRIPT_EXEC= and it will be downloaded and executed automatically.
# - Executed script log: /var/tmp/dietpi/logs/dietpi-automation_custom_script.log

##### Software Options #####
# SSH Server Selection: 0=none/custom | -1=Dropbear | -2=OpenSSH

# File Server Selection: 0=none/custom | -1=ProFTP | -2=Samba

# Logging Mode Selection: 0=none/custom | -1=RAMlog 1h clear | -2=RAMlog 1h save clear | -3=rsyslog + logrotate
# RAMlog max tmpfs size (MB). 50MB should be fine for single use. 200MB+ for heavy webserver and access log etc.

# Webserver Preference Selection: 0=Apache2 | -1=Nginx | -2=Lighttpd
# - This will be ignored if you have manually selected any webserver stack.

# DietPi-Autostart: 0=Console | 7=Console autologin | 1=Kodi | 2=Desktop autologin | 16=Desktop | 3=RetroPie | 4=OpenTyrian | 5=DietPi-Cloudshell | 6=Amiberry fast boot | 8=Amiberry standard boot | 9=DDX-Rebirth | 10=CAVA Spectrum | 11=Chromium kiosk | 14=Custom autostart service
# - This will be effective on 2nd boot, after firstrun update and installs have been done.
# - Related software titles must be installed either on firstrun installs or via AUTO_SETUP_AUTOMATED=1 + AUTO_SETUP_INSTALL_SOFTWARE_ID (see below).
# Autologin user name
# - This user must exist before firstrun installs, otherwise it will be reverted to root.
# - Applies to all autostart options but: 0, 6, 14 and 16

##### Non-interactive Firstrun Setup #####
# On first login, run update, initial setup and software installs without any user input
# - Setting this to "1" is required for below settings to take effect
# - It is HIGHLY recommended to also set CONFIG_BOOT_WAIT_FOR_NETWORK=2, to force infinite wait for network connection during boot and prevent connection timeout errors.

# Global Password to be applied for the system
# - Affects user "root" and "dietpi" login passwords, and, all software installed by dietpi-software, that requires a login password
# - WARN: Passwords with any of the following characters are not supported: \"$

# Software to automatically install
# - List of available software IDs:
# - Add as many entries as you wish, one each line.
# - DietPi will automatically install all pre-reqs (e.g. ALSA/X11 for desktops etc)
# - E.g. the following (without the leading "#") will install the LXDE desktop automatically on first boot:

# D I E T - P I
# Misc DietPi program settings
# DietPi-Survey: 1=opt in | 0=opt out | -1=ask on first call
# -

# D I E T - P I
# DietPi-Config settings
# CPU Governor: powersave | conservative | ondemand | performance
# Ondemand Sampling Rate | Min value: 10000 microseconds (10ms)
# Ondemand Sampling Down Factor: Samling Rate * Down Factor / 1000 = ms (40 = 1000ms when sampling rate is 25000)
# Throttle Up Percentage: Percentage of average CPU usage during samling rate at which CPU will be throttled up/down

# CPU Frequency Limits: Disabled=disabled
# - Intel CPUs use a percentage value (%) from 0-100, eg: 55
# - All other devices must use a specific MHz value, eg: 1600
# - Has no effect on RPi, please set "arm_freq" and "arm_freq_min" in config.txt instead.

# Disable Intel-based turbo/boost stepping. This flag should not be required, setting <100% MAX frequency should disable Turbo on Intel CPUs.

# System-wide proxy settings
# - Do not modify, you must use dietpi-config > "Network Options: Adapters" to apply

# Delay boot until network is established: 0=disabled | 1=10 second wait max (default) | 2=infinite wait

# Connection timeout in seconds, before G_CHECK_URL assumes the URL is dead. Increase if you have a "flaky" connection or slow DNS resolver.
# - Set this to "0" to allow unlimited time, however this is not recommended to avoid unlimited hanging background scripts, e.g. daily DietPi update check.
# - A negative or non-integer value will result in the default of 10 seconds.
# Connection attempts with above timeout each, before G_CHECK_URL is giving up and prompts an error.
# - Any value below "1" or a non-integer value will result in the default of 2 attempts.
# General connection and DNS testing
# - IP to ping when checking network connectivity. Default: (Quad9 DNS IP)
# - Domain to ping when checking DNS resolver. Default: (Quad9 DNS domain)

# DietPi checks for updates: Allows DietPi to check for updates on a daily basis and boot using a less 1 KiB file download.

# Network time sync: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift

# Serial Console: Set to 0 if you do not require serial console.

# Soundcard

# LCD Panel addon
# - Do not modify, you must use dietpi-config to configure/set options

# IPv6

# Prefer IPv4 with APT and wget, NB: This has no effect if IPv6 is disabled anyway!

# APT mirrors which are applied to /etc/apt/sources.list | Values here will also be applied during 1st run setup
# - Raspbian:
# - Debian:

# NTP mirror, applied to /etc/ntp.conf
# - For a full list, please see:
# - Please remove the initial integer and full stop from the value (removing "0."), eg:

# D I E T - P I
# DietPi-Software settings
# Enter your write API key here. It will be applied automatically during EmonPi/Hub install.
# - Eg: SOFTWARE_EMONHUB_APIKEY=b4dfmk2o203mmxx93a

# VNC Server

# ownCloud/Nextcloud
# - Optional username for admin account, the default is 'admin', applied during install
# - Optional data directory, default is "/mnt/dietpi_userdata/owncloud_data" respectively "/mnt/dietpi_userdata/nextcloud_data", applied during install
#	NB: This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location.

# WiFi Hotspot
# - Key requires a minimum of 8 characters

# - DPI 96(default) 120(+25%) 144(+50%) 168(+75%) 192(+100%)

# Chromium

# Home Assistant
# - Optional Python build dependencies and modules, possibly required for certain HA components
#	Space separated list (no quotation!), will be installed together with Home Assistant automatically, if present
#	Add Python modules with version string at best, e.g.: firstModule==1.2.3 secondModule==4.5.6

# D I E T - P I
# Dev settings

# D I E T - P I
# Settings, automatically added by dietpi-update
Posts: 13
Joined: Sun Jul 26, 2020 12:23 pm

Re: Dietpi.txt Help

Post by RedDirtPi »

After hooking up a monitor to watch the install I saw a couple things that were issues.

1. It flagged the docker install stating that there was a mismatch between the loaded kernel and installed one, but based on the output, it appeared to have deselected it

2. There was an error with the host-name, the output stating it was invalid. I cant imagine why unless it is some sort of conflict with the DNS reservation where I have to have unique names for each entry so I typically RPi3-ETH and RPi3-WiFi so I can tell which is connected. So I assume its possible that giving a different host-name in the dietpi.txt file causes an issue.

3. During the installation, it apparently lost its internet connection and shutdown the install. At least that was what was flagged in the dietpi-firstrun-setup.log. Though I was watching the connection and it was still up in the router and I was running a ping to the WiFi interface.

So I re-imaged the SD card, again. But it appears in the configuration of dietpi.txt, if you have both WiFi and Ethernet enabled, it still favors the WiFi. I am not sure why this is, but it means that if the WiFi is truly dropping out, even if I have the Ethernet cable connected, it still halts the install. I am not that versed in the RPi nor DietPi for that matter but I can't quite grasp why it has to be one or the other and one cannot serve as a fallback to the other.

Unless I am missing something, it would seem that I have to choose Ethernet connectivity, but that leads me to the problem of how do I, then, set up WiFi after the initial install has completed.

I can continue the install after it fails (presumably due to the WiFi connection) but that kind of defeats the purpose of trying to automate the setup. I guess I can keep trying and see if I can 'stumble' onto anything but it's not looking good at this point.
Posts: 13
Joined: Sun Jul 26, 2020 12:23 pm

Re: Dietpi.txt Help

Post by RedDirtPi »

The WiFi is not the issue. I re-imaged the SD card again and this time changed the configuration so it would only use the Ethernet and it still failed and the last lines in the dietpi-firstrun-setup.log again state ERROR: No Internet Connection.

I'm left with a bunch of questions and no meaningful way to answer them. :?
User avatar
Posts: 2044
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi.txt Help

Post by Joulinar »


yes that's always good to get a screen connected. :)

Well the issue with the kernel and docker could be due to the kernel / software update that is done at the first setup. I guess this one should be related

Well it's not a good idea to have Ethernet as well as WiFi connected same time. Therefore it would be recommended to use just one or the other. If you use Ethernet for the first setup, WiFi can be configured later on using dietpi-config. Quite a simple process ;)

If you like to configure WiFi as fallback for Ethernet, you might have a look to following tutorial viewtopic.php?f=15&t=7835

EDIT: You might run into some timeouts for checking the internet connection. Do you see on screen what check is failing?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Posts: 13
Joined: Sun Jul 26, 2020 12:23 pm

Re: Dietpi.txt Help

Post by RedDirtPi »

Thank you Joulinar for all that information. I will certainly check it out.

I do not see what check is failing. I see some sort of red colored screen for just a very brief moment but not long enough to read anything and then it pops up with the message about something failed and to check the log.
User avatar
Posts: 2044
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi.txt Help

Post by Joulinar »

hmm you could alter dietpi.txt and set

Code: Select all

As well you can check if it make a difference if you adjust the internet check from Quad9 to something else like Gopple.DNS

Code: Select all

in worst case set the connection check to something local in your network or localhost.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Posts: 13
Joined: Sun Jul 26, 2020 12:23 pm

Re: Dietpi.txt Help

Post by RedDirtPi »

I tried, again. This time I just flashed the SD card with DietPi and didn't change anything. Just inserted the card in the Pi and set it off and decided to just try installing everything through selecting it from the software list. It failed again. But this time I saw a little more when it did fail. One of the packages I was trying to install was NodeRed. When it got to that I saw it was trying to install the javascrip runtimes and about the instant it hit that point, it failed.

So I am going to try and take that out of the list I had in the dietpi.txt list I was trying earlier and see if I get any further.
Posts: 13
Joined: Sun Jul 26, 2020 12:23 pm

Re: Dietpi.txt Help

Post by RedDirtPi »

Okay, I give up. I took NodeRed out of the list and it still failed, and again I saw it was trying to install some javascript runtime. I don't know what else to do. I so wanted to use DietPi.
Post Reply