Swap file problem on 2G card

I’m installing DietPi on a 2G SD card, with the intention to move it all over to an external USB HD once things have been set up.

There seems to be a problem though - as I go through the different DietPi-Config steps, the last one is Install. I have not changed the swapfile settings (it was set to “Off” when I looked), but for some reason the Install step decides to install a 2G swap file (and fails) - this is on an old RasPi B v1 w/ 256K RAM.

   ┌────────────────────────┤ DietPi-Drive_Manager ├────────────────────────┐
   │ Mount target: /                                                        │
   │ Mount source: /dev/mmcblk0p2                                           │
   │ Mount method: UUID (Permanent: always mount to "Mount Target")         │
   │ Filesystem:   ext4                                                     │
   │ UUID:         060b57a8-62bd-4d48-a471-0d28466d1fbb                     │
   │ Capacity:     1.8Gb (Reserved blocks: 0.02%)                           │
   │ Used:         1.8Gb (100%)                                             │
   │ Status:       Drive is online and ready for use                        │
   │ Read only:    Disabled                                                 │
   │                                                                        │
   │ User data                        : [X] | DietPi user data is curre  ↑  │
   │ Swapfile                         : [X] | 1821MB used on this drive  ▮  │
   │ Read Only                        : [ ] | Select to toggle RW/RO mo  ▒  │
   │ Mount Method                     : Change from UUID to /dev/sd      ↓  │
   │                                                                        │
   │                                                                        │
   │                   <Ok>                       <Cancel>                  │
   │                                                                        │
   └────────────────────────────────────────────────────────────────────────┘

At this point, it seems to be impossible to recover via DietPi-Config. I logged in via a second SSH session and deleted the /var/swap file. That gave the disk space back (swap has not been enabled yet), but now I’m lost on how to fix the swapfile size choice. Repeating steps then runs into the same issue again.

A mentioned, I’m using a 2G SD card, because it’ll only be used for booting into a HD-based setup later. Even 1G should be possible, but there’s a problem in both 6.8 and 6.9 I think, with the default logic for swapfile size on initial setup.

Has anyone else been able to do a successful install with 6.x on an SD card of 1 or 2 G?

-jcw

FWIW, I’ve worked around it by editing the “dietpi.txt” file and turning swap off before first boot.

Then it all works: initial setup on a 2 GB SD card, as well as transferring root to an external USB drive.

maybe it would be better to start a small swap file at start…then once installed…create and activate a much larger final swap file