Running Arch in chroot

user_naa@lemmy.world to Linux@lemmy.ml – 22 points –

I am using Debian for long time and really like it for stability. Recently I wondered if it is possible to run Arch Linux from chroot. I want to run full Wayland session from Arch. I found Archbox project and it is worked for me, but I couldn't start any Wayland compositor from tty (Error: can't connect to Wayland socket . ). How can I properly do this? Or maybe there is a better way than chroot?

11

You are viewing a single comment

I don't think I can run native Wayland session from container

You can use wayland in container but the easy way probably would require to give whole GPU to the container (but my knowlwdge is limited)

What I do know that this project is doing that: https://games-on-whales.github.io/

That also came up in search results that could help: https://unix.stackexchange.com/a/359244

Why I need a full isolated container? Can't I just use chroot?

Container is just a term for a set of isolation solutions bundled together.

Like file system isolation (chroot), network isolation, process isolation, device isolation...

One of them is ofc chroot, yes container use exactly the same chroot functionality.

So to answer your question, no, you don't need full isolated container. You can use only chroot.

You just need to pass all required devices ( and match the driver version running in kernel with your files in container and (avoid) more than one app having full unrestricted access to GPU as that would result in issues (but dont know the details so can't help you with that)).

Because you're relying on compatibility between older Debian software (systemd, etc) and newer versions installed in the chroot. Things get weird quickly.

Consider a nested privileged container instead (LXC or similar) and cross your fingers that Debian systemd and Arch systemd play nice.

If the above fails just make a VM and pass through the GPU with GVT-g (otherwise pass through the entire GPU.)

If all of that fails install Arch to a USB attached SSD or something.

What Systemd compatibility I need to run Graphics session?