Auto setup for headless installation fails to start

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • Architecture | AARM64
  • SBC model | Radxa Rock 4C Plus
  • Power supply used | 5V 3A
  • SD card used | Sandisk

Steps to reproduce

  1. Burn dietpi Debian Bookwarm/Trixie image on SD card
  2. Edit dietpi.txt and dietpi-wifi.txt
  3. Insert SD card on SBC, power up
  4. After few mins, attempt to ssh over wifi

Expected behaviour

  • Dietpi installation and updates etc should complete automatically and able to ssh successfully.

Actual behaviour

  • On ssh connection over wifi with root user and dietpi password, getting an error ‘access denied’.
  • When checking progress by connecting a monitor to HDMI port, there is window saying first run has failed and asking to start manual steps.

Extra details

Image name: DietPi_ROCK4CPlus-ARMv8-Bookworm.img.xz

In dietpi.txt, alongside usual config, I have below setup:
AUTO_SETUP_GLOBAL_PASSWORD=dietpi
AUTO_SETUP_LOCALE=en_GB.UTF-8
AUTO_SETUP_KEYBOARD_LAYOUT=gb
AUTO_SETUP_TIMEZONE=Europe/London
AUTO_SETUP_NET_ETHERNET_ENABLED=0
AUTO_SETUP_NET_WIFI_ENABLED=1
AUTO_SETUP_NET_WIFI_COUNTRY_CODE=GB
AUTO_SETUP_AUTOSTART_TARGET_INDEX=7
AUTO_SETUP_AUTOMATED=1
AUTO_SETUP_INSTALL_SOFTWARE_ID=105

So I have AUTO_SETUP_AUTOMATED=1 and board connect to WiFi OK but not progressing to auto install from there on.

What am I missing or doing wrong here?

Complete dietpi.txt file in attached.
dietpi.txt (17.9 KB)

Hello ezpc98,
can you also share the installation log please (open a second tty when the installation fails and run following command):

cat /var/tmp/dietpi/logs/dietpi-firstrun-setup.log

It is not letting me to open a new SSH connection for second tty. Tried with both root & dietpi users (and dietpi password) but getting ‘access denied’ error.

On tty with HDMI connection, clicked OK to continue with manual installation but it gets stuck at network connection stage with weird ping error suggesting unable to ping to 9.9.9.9 DNS. See the screenshot.

I flashed it one more time and tried changing DNS checks to 8.8.8.8 and dns.google.com but failed again at the same stage.

I checked on router and can see it connected OK but strangely hostname as DietPi and not with hostname set in dietpi.txt. See screenshot.

So it seems crux of problem is auto setup not able to get past network connection checks.

When you are connected via HDMI you can open a second tty by pressing CTRL + ALT + F2.
maybe you can copy the log from there.

But when I look at the screenshot, I see

ping: 9.9.9.9^M

which is not a valid IP nor hostname

So I guess you edited dietpi.txt in a windows environment, which handles new lines differently than under linux, which causes this weird ^M character in linux.

So you would need to edit it in some Linux environment
OR
some editors have options to save it in unix format. Like Notepad++ has this functionality

Edit → EOL Conversion → Unix (LF)

yes probably

Probably same reason why you are not able to login because password has been changed including the hidden character

usually not needed

would be an option to use N++

However it should work using regular Windows Notepad/Editor. At least I don’t have an issue doing so.

Well spotted and terrific detective work! I have been used to Notepad on Windows, didn’t have issues in the past but perhaps after lot of copy paste and edits it may have gone really bad with line breaks.

This is million dollar tip! Thanks.

I switched to Notepad++, saved dietpi.txt as suggested. The cleaned up file indeed worked on fresh install and auto setup completed flawlessly!

Problem solved!! Credits to @Jappe / @Joulinar for expert help.

1 Like

I’m not an expert, I just made a lot of mistakes in the past :grimacing: