The Linux swap partition uses a 4096-byte header that holds the label & UUID. You can see the structure here: https://github.com/util-linux/util-linux/blob/master/include/swapheader.h The problem is thus how to prevent FreeBSD from overwriting the header. It turns out there's a neat way to do just that with GEOM using the gnop system tool. This PR modifies swapon to automate this process, which also works with /etc/fstab. This will benefit dual-boot installations and also live-CD's. Fix: https://github.com/freebsd/freebsd-src/pull/1084
We can handle the discussion and code review over in the GitHub PR.