Skip to content

Conversation

@yehorb
Copy link
Contributor

@yehorb yehorb commented Nov 21, 2025

Hi.

Recently I decided to set up Distrobox on my (more-or-less) vanilla Ubuntu 24.04 host, and I ran into the "root filesystem is not mounted as a shared mount" problem.

The current compatibility page suggests to run mount --make-rshared / command and to add it to /etc/rc.local "to make it permanent". While mount --make-rshared / absolutely works, "add it to /etc/rc.local" does not. /etc/rc.local was not present on my system, and just creating it was not enough (it did nothing).

If I understand correctly, /etc/rc.local is considered deprecated (in Ubuntu, at least) in favor of systemd units, and to make it work you need to create some kind of rc-local.service - and there was no such service in my system.

If you need to interact with systemd anyway, you may as well create a proper service for the task. I believe this approach is more "in line" with what most distros consider "up to date".

Here I propose an addition to the compatibility page that explains how it can be done.

This solution is tested by me on my machine. But the service is quite simple, and I can't think of a reason why shouldn't it work on any other systemd-enabled system.

@dottorblaster dottorblaster changed the title docs: provide systemd Service unit example to mount root as a shared … docs: systemd unit example to mount root as a shared mount Nov 22, 2025
@dottorblaster
Copy link
Collaborator

Hi, thanks for this! The markdown linting check failed, could you check and update the guide accordingly?

@yehorb
Copy link
Contributor Author

yehorb commented Nov 22, 2025

Looks like a simple formatting issue, should be good now. My local markdownlint is happy.

Copy link
Collaborator

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dottorblaster dottorblaster merged commit 45cb136 into 89luca89:main Nov 22, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants