diff --git a/extensions/cloud-init/config/99-armbian-no-zram-swap.cfg b/extensions/cloud-init/config/99-armbian-no-zram-swap.cfg new file mode 100644 index 000000000000..dc478529e5fc --- /dev/null +++ b/extensions/cloud-init/config/99-armbian-no-zram-swap.cfg @@ -0,0 +1,16 @@ +# Do not let cloud-init persist the (dynamic) zram swap into /etc/fstab. +# +# Armbian sets up zram swap at boot via armbian-zram-config.service. cloud-init's +# `mounts` module otherwise sees that active swap and writes a matching +# "/dev/zram0 none swap ... comment=cloudconfig" line to /etc/fstab. On the next +# boot systemd turns that line into a dev-zram0.swap unit and blocks ~90s on the +# device timeout waiting for /dev/zram0 — which only appears once +# armbian-zram-config runs — before swap.target fails/recovers. Result: a very +# slow boot every time. +# +# Setting the `swap` mount to null removes cloud-init's default swap mount, so it +# leaves zram/swap management to Armbian while keeping the rest of the `mounts` +# module intact. (cc_mounts sanitizes the config before de-duplicating, so this +# suppresses the auto-added default swap entry too.) +mounts: + - [ swap, null ]