[Solved] Cannot get dietpi.txt to be used on install

I’m trying to install DietPi v6.6 on a Raspberry Pi Zero W. It normally gets locked up during install while setting the keyboard locale - something I’m attributing to my keyboard or some other idiosyncrasy of my setup. My solution to this that I’m trying to use is to forgo the keyboard altogether and just run the install over SSH. However, I’m having trouble even getting that to work as I cannot pre-configure the WiFi - in fact, I can’t pre-configure anything because dietpi.txt is never used.

After writing the image (DietPi v6.6 for Raspberry Pi) to my SD card (via Etcher on Ubuntu), I noticed there was no dietpi.txt anywhere by default. I copied the default template from the GitHub repo and tried dropping it under the root folder, /boot/, and /DietPi/, but it is not recognized in any of them as far as I can tell. For example, I disable Ethernet by default and enable WiFi & set the AP’s name and password, but when installing it claims that WiFi is off and the config still has “MySuperDooperWifi” as the default entry.

Leave the locale set default as en-gb.utf-8

Install…then go in and change it to en-us.utf-8, seems to work alot better that way
DO NOT remove en-gb.utf-8 locales though

You will need a linux distro, mount the image file, sudo su nano the dietpi.txt in the /boot directory on the SD card…easiest way…but you have to have a working or livecd linux working where you can fiddle with it natively (I have an OOOOOOLD crusty single core laptop running xubuntu for this)
Also use it to check the SD card in case of power outtage and a corruption of the SD card with gparted

kowbell
Actually after flashing the image via etcher or rufus to SD card, the dietpi.txt should be available within the first partition (0.fat), which should be read-/writeable already on Windows machines as well. I just checked our current RPi image and the file is there as expected.

dropping it under the root folder, /boot/, and /DietPi/

As long as you are still on the machine, where you flashed the image, /DietPi should be not present, as it is created as part of the DietPi-RAMdisk service, starting on the target system itself. dietpi.txt is read from /boot only on boot (after boot finished from /DietPi), on rootfs it does not have any effect. Please verify that you accessed the right partition, which is not the root partition, and dietpi.txt is available there.

If this is true in your case, then your download, unpacked .img or flash process was faulty/corrupted, which then might be also the reason for other issues. Although Etcher should verify a successful flash process, indeed broken SD card could be the reason. You also might want to check the hashes against the .img, given within the downloaded .7z file.

Hey all. Sorry for the late response. You guys are right - I didn’t look anywhere in the boot partition for some reason. Everything is working swimmingly now. Thanks!

kowbell
Great, nice to hear :slight_smile:.