The zram-generator's documentation states,
If a mount point is not specified, the device will be initialized, but will not be used for anything.
Why would anyone want to initialize a swap file without mounting it?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThe zram-generator's documentation states,
If a mount point is not specified, the device will be initialized, but will not be used for anything.
Why would anyone want to initialize a swap file without mounting it?
Well, according to that code snippet, it isn't a swapfile it is a compressed file system.
As to why init it without mounting it, I can see mounting it later to copy files to, then unmount, then make an image, etc. of it. Just because it isn't automatically mounted doesn't mean you can't mount it later....