They can share a partition for file storage and I think swap, but I wouldn’t try it with your /home partition and certainly not for the system partitions (/, /etc, etc). If they’re completely separated on their own partitions then they’ll behave as if they’re on their own disks.
If I read OP right the question is not whether they can share a partition but whether they can co-exist on one drive.
The answer is yes. You can have as many OSes on drive as space allows.
I don’t own librem laptop but IIRC coreboot uses MBR paritions which could be limiting factor theoretically, however even that should allow at least 3 OSes (3 boot paritions and one extended with the rest of the roots/swaps/etc.)
Is it possible to hibernate one OS and then boot into the other? Not asked as a point of argument, I was just under the impression that when turned back on, the computer would resume from hibernation, not go through the boot process, but I haven’t used hibernation in quite some time.
Yes, it is possible, that’s what I do on my multiboot laptop. But I do it because of windows long boot, so I hibernate windows and boot to linux. Linux boots/stops instantly so I’ve never tried to hibernate it. But windows resumes ok.
NOT if they are sharing a swap partition. At best you would get errors - at medium it would fail to boot but recover gracefully (i.e. override the resume) - at worst it would crash on boot and require mucking around.
To be clear on the bad scenario that I was envisaging - separate boot partitions but shared swap partition.
As countless Windows+Linux users have found out, the other complication of “hibernate one OS and boot the other” is that you must also not share any file systems between the two boots i.e. not even an unrelated data disk and file system. This is because when you hibernate one OS, it has not safely unmounted the file system.
One other point of clarification … when I talk about sharing a swap partition (or indeed NOT doing so), I am talking about two Linux installs (which I took the OP to be talking about). Ghod help you if you try to share swap between Windows and Linux. It probably isn’t even possible but if you fight your way to doing it then you get what you deserve.
My experience on Windows is not recent but in the last Windows that I had, it uses a hibernation file (a normal file on a normal file system with a normal drive letter) - exactly the same as, for example, recent Ubuntu installs will do i.e. no more swap partition.
In that arrangement you realistically can’t share swap between Linux and Windows or between one Linux install and another Linux install.
Therefore, let me try to help @Gavaudan (as having right, all the way, because good idea counts always). Focusing just on two (or more) Linux installations (Windows is irrelevant here) with one swap partition (with 4GB as a good number). I’ll not test this in the future either but (from what I can recall) please do not forget to adjust/have the very same (by using manual partition procedure: fdisk is good option) UUID (for both Linux distros).
mkswap --swapversion 1 -L Swap /dev/sdX8,
or if someone prefers direct approach: mkswap --swapversion 1 -L Swap -U 8XXX888X-8888-8X8X-X888-XXXX888888XX /dev/sdX8
This above just means that someone that prepares disk(s) and its partitions: Swap partition (in particular) should not be reformatted through installer (automated) process. Not sure 100% (without testing) but IMO this might work well with two or more Linux distributions on one PC. Again, this is not step by step how-to guide, just something that needs to be considered as necessary (same UUID + reboot or shutdown usage), in order to boot again into selected distro with the same/one Swap partition.
I was only saying DON’T share a swap partition if you use hibernate (suspend to disk).
There are probably many ways of setting up a shared swap partition e.g.
install first distro with normal swap partition
install second distro with NO swap partition
then adjust fstab in second distro if necessary to use the existing swap partition
If it becomes necessary to change the UUID on an existing swap partition then swaplabel should be able to do the job. However you can always edit fstab to fix it instead of fixing the swap partition, if things get out of whack.
I have Windows 10 booting from the 120 GB drive that shipped with the computer. I bought a 1 TB drive and installed PureOS to that and then set up Windows on the 120. I use the boot menu to select the Windows drive when I need it.