Force reinstall

Is there any way I could force reinstallation on boot without writing the iso to a sd card again?

Hi,

many thanks for your request. Well there are options to re-install from remote. The easiest way is to use DietPi PREP script

https://github.com/MichaIng/DietPi/issues/1285

But this is not a full new installation. The script will go to reset software packages but it could happen that some config files or folder will remain. Therefore you would need to clean your system as much as possible before. (eg. uninstall software using dietpi-software). But in general this is quite a save process.

Another option would be to install a full new image over the network. But this would require a zip file. Unfortunately DietPi images are available as 7z only. Therefore you would need to download the 7z image, repack as zip and store it on your own web server. Than you could try following

login as root
echo 1 > /proc/sys/kernel/sysrq
curl -L http://<your-web-server>/DietPi_RPi-ARMv6-Buster.zip | funzip | dd bs=4M of=/dev/mmcblk0
echo b > /proc/sysrq-trigger

But be careful. if thinks go wrong, you will loose your installation you could not access your device anymore. This, you should test having the SBC next to you :wink: