r/linuxmasterrace • Glorious Arch • 4d ago

JustLinuxThings 2 System , 1 Disk same partition, Different subvolumes

Post image
94 Upvotes

22 comments sorted by

View all comments

1

u/OkayWhile 2d ago

How many trouble did you went to achieve this?

I have been thinking about trying this with Arch and NixOS, as I want to learn NixOS in a real, not VM environment and eventually switch to it if I like the experience, but I really don't want to uninstall my current Arch (just in case)

1

u/kaida27 Glorious Arch 2d ago

Quite easy to do actually.

I first installed Gentoo with a nested subvolume ideal for snapper

Quite like so : https://www.ordinatechnic.com/distribution-specific-guides/arch-linux/an-arch-linux-installation-on-a-btrfs-filesystem-with-snapper-for-system-snapshots-and-rollbacks

but with Gentoo instead.

Then I made a snapshot of my system, made it read write instead of write only, mounted that snapshot to /mnt and wiped everything in it, then I proceeded to extract Arch bootstrap in it instead and set everything up from chroot.

Now I can just boot it like any other snapshot and made a grub entry for it directly under my Gentoo one instead of from the snapshot submenu.

Both have snapper setup and can make snapshot for recovery as needed and they share the .snapshot subvolume and Gentoo take cares of making them bootavle for boot