I’ve been enjoying using this excellent lightweight RPi OS on some of my larger SD cards.
I have a simple IoT project which is only a few KB so ideal for an old 2GB card, but the installer doesn’t fully complete. It fails after the reboot when it tries to update to the latest version giving an error message stating a min of 500MB is needed to continue. A quick df -h later I can see that a huge 1.4MB is used with only 484MB to spare.
I’ve tried few times and this issue seems to be consistent.
Does anyone have any ideas how to avoid this issue? Is there something I need to edit in the txt file before first boot?
You can disable swapfile generation, after writing DietPi image, and, prior to booting device for 1st time in:
on your SD card. (please look at:
. . .
# >> Misc Options -----------------------------------
#Size of dphys-swapfile to generate (MB)
# 0=Disabled | 1=auto (1GB-RAM = size) | 2+=manual
### Swapfile_Size=1 ## -default- ##
. . .
Please have a look here:
06:55PM - 14 May 17 UTC
08:50AM - 17 May 17 UTC
I have a problem on my RPI v1 (256mb RAM, 2Gb MicroSD):
Swapfile is too big for
# Force Ethernet speeds: 0=automatic speed | 10 = 10 Mbit/s | 100 = 100 Mbit/s etc.
# - Use this when your Ethernet adapter has an unstable 1 Gbit/s link.
# WiFi country code: 2 uppercase character value (e.g. GB US DE JP): https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
# Enter your static network details below, if applicable.
# Set to "1" to convert DHCP leased network settings into static settings automatically on first boot.
03:41PM - 22 Jun 17 UTC
06:41PM - 01 Mar 18 UTC
In DietPi ```/tmp``` is mounted to RAM with default size of 50% of RAM.
After initial bootup and finishing installation, you can set swap file size via:
root@NanoPi-Neo:/# ls -lah /var/swap
-rw------- 1 root root 530M Jun 25 13:03 /var/swap
As you suggest preventing the creation of a swapfile leaves plenty of space for the installation process to fully complete. I can now use my old 2GB cards for some of my projects.