You are not logged in.
Pages: 1
During mounting, Arch install guide instructs: "If you created a swap volume, enable it with swapon(8):"
# swapon /dev/swap_partitionBut
man swaponCalls to swapon normally occur in the system boot scripts making all swap devices available, so that the paging and swapping activity is interleaved across several devices and files.
So as I understand,
swaponwould only enable swap in the live installation medium. And when the installation finishes, and Arch boots up from hard disk, init scripts will issue swapon. So what is the purpose of swapon in the first place?
Offline
Caveat: I've not used swap in decades.
I believe running swapon ensures genfstab will create the proper fstab for the swap partition which will ensure it is enabled on each boot. However, this can be less relevant on some systems (GPT disks perhaps) on which systemd will auto-detect swap partition types anways.
So you might say it's less relevant than it once was, but still good practice - and for some configurations it would be important to have the fstab entry and thus necessary to enable swap during the installation for genfstab to create it.
Last edited by Trilby (2023-05-27 20:00:00)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1