this post was submitted on 18 Aug 2024
21 points (80.0% liked)

Linux

47337 readers
650 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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?

top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 month ago

Use distrobox with podman

[–] [email protected] 3 points 1 month ago (1 children)
[–] [email protected] 1 points 1 month ago (2 children)

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

[–] [email protected] 2 points 1 month ago* (last edited 1 month ago) (1 children)

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

[–] [email protected] 1 points 1 month ago (2 children)

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

[–] [email protected] 4 points 1 month ago* (last edited 1 month ago)

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

[–] [email protected] 3 points 1 month ago (1 children)

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.

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago)

What Systemd compatibility I need to run Graphics session?

[–] [email protected] 1 points 1 month ago
[–] [email protected] 1 points 1 month ago (1 children)

If you're using an Intel chip look into GVT-g and consider running Arch from a VM, that'll be the closest thing to native.

The unfortunate thing about running an Arch container from a Debian host is that you're relying on an older kernel and an older systemd host side and I've found that often causes compatibility problems inside the Arch container. If you are very, very lucky Arch will just work inside the container, but IME that's fairly rare as systemd often has breaking changes over several releases (and Arch tends to be at least several releases ahead of Debian.)

[–] [email protected] 1 points 1 month ago

If you're using an Intel chip look into GVT-g and consider running Arch from a VM, that'll be the closest thing to native.

I want to start clear Arch Wayland session on one my ttys and want to Arch have full direct hardware access.

The unfortunate thing about running an Arch container from a Debian host is that you're relying on an older kernel

I use latest Linux-libre on my Debian machine and everything works well.

If you are very, very lucky Arch will just work inside the container, but IME that's fairly rare as systemd often has breaking changes over several releases (and Arch tends to be at least several releases ahead of Debian.)

As I mentioned earlier I tried running Archbox. It is basically script to easy set up chroot. The main problem was that compositor couldn't connect to Wayland socket.