Add support for SWAP in a secondary persistent storage
Hi,
I want to use a different device for the SWAP partition. Any idea to put it on a secondary persistent storage? Perhaps with a different magic header like "lightwhale-please-make-swap" for example?
Thank you.
Comments (6)
-
reporter -
Hey Rebek,
Well done! That was quite skilled of you to find that option! Not that it’s secret on any way, it’s just not as well-documented as I'd like it to be. It’s actual only documented in SYSLINUX menus when booting using BIOS. And in source, of course.
(continued…)
-
I’m back ;) So yes, boot with “lightwhale noswap” to avoid creating swap. Lightwhale will pick up any swap partition using
swapon -a
, no matter how its named.I consider the boot parameter somewhat of a hack. I think at some point I’ll address this with a more advanced magic label, e.g.
lightwhale-please-format-me:data
vs.lightwhale-please-format-me:data+swap
-
I’ll close this because swap is supported on a secondary storage device.
-
- changed status to open
-
- changed status to resolved
- Log in to comment
Hi Stephan,
I discovered a method to create the SWAP partition (or multiple of it). You only need to boot with the no swap option when you want to initialize the persistence. With this strategy no swap will be added to your persistent storage. And after that you only need to do this stuff:
lightwhale-swap
".After these steps any “swapon” command (automatically executed at each boot) will use the swap partition.
I suggest to comment this in the README.
Thank you for this useful project.