Multi-Boot Advice From Seasoned Purism Users

I was hopeful I could use Qubes os as my root os & run Windows, OSX, & Linux distros inside VMs. But the “Unable to reset PCI device” bug seems to be show stopper.

I need the functionality of Qubes, but also something more stable.

With that in mind, my current plan:

Partition the root drive & install Qubes & PureOS in their own partition. Then install Windows & OSX VMs running in Qubes or PureOS.

Will doing this cause Qubes & PureOS to corrupt each other’s root?

Do they need their own drives? Or can the partitioning work?

1 Like

I don’t think they can share a partition. It should work to give them each separately one or more partitions on the one drive.

1 Like

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.

4 Likes

Right. I took the query to be specifically about the root file system.

Sharing a swap partition I think would be relatively dangerous if you intend to use the hibernate (suspend to disk) functionality.

Particularly if you are using the default encrypted ~ implementation.

In fact, encryption is a complication across all three of {full disk, swap, ~} if sharing between boots. The more separate the better!

1 Like

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.)

you could of course use a separate ssd/hdd for /home. that has all your .config dir/files so it might be worth a shot.

You don’t need a swap partition at all anyway.

If you have enough RAM (doubtful for this particular use case - VMs coming out of your ears) then you can get by without swap at all.

Otherwise you can have a swap file i.e. a file that is simply a normal file on the root file system.

1 Like

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.

1 Like

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.

1 Like

i think that might be different because it’s Windows, but I’ll wait for @kieran to finish replying.

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.

1 Like

Yea I’ve learned it hard way so I’ve stopped using ntfs partition from linux even in RO mode.

1 Like

My question was, in my mind, geared towards two different Linux OSes with separate swap partitions. I just didn’t think “resume” would go through the same startup process as “boot.”

Windows, as I understand it, doesn’t have a swap partition and uses some other mechanism I can’t remember to put itself into and bring itself out of hibernation.

I do agree that, certainly, if two Linux OSes are sharing swap, hibernation has to be done carefully (if at all) if one can indeed hibernate one OS and then boot the other.

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. :slight_smile:

1 Like

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.

1 Like

Yes, I believe this to still be the case. So in that case I guess you could safely hibernate Linux and/or Windows since the hibernated data will be separate.

1 Like

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.

1 Like

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.

2 Likes

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.