Oh, the irony of:
echo "/swapfile none swap defaults 0 0" >> /etc/fstab
If we are going full modern, why not create a Systemd unit? ( https://www.freedesktop.org/software/systemd/man/latest/syst... ) if you need more info. If you didn't know this: /etc/fstab is not used directly after the pivot. Systemd parses it, creates units for every record in it, and that's what gets executed in reality. I can't imagine why would you want a swap file before pivot.
systemd is malware.