Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make /etc a subvolume that needs no mounting #59

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

NeroReflex
Copy link
Contributor

This is meant to solve the /etc mounting issue where the /etc overlay fires off some race conditions with the system loading resulting in the infamous "gamer is not the password".

This also deals with the overlays that prevents chimeraos team to effectively distribute updates that needs /etc changes.


# copy the machine-id file: this was created by systemd the very first boot and identify the machine:
# changing this will also make ssh warn about machine not matching.
if [ -f "/etc/machine-id" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary? Do we have a mchine-id in our system image such that this would get overwritten? If we do, we should remove it.

Copy link
Contributor Author

@NeroReflex NeroReflex Mar 31, 2024

Choose a reason for hiding this comment

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

This PR, as the hibernation one, was superceeded by the upcoming frzr rework. Machine-id file is created at first boot by systemd on the first boot. I don't know if we have one in our image, but for sure it is something to investigate.

However I don't think we have one simply because systemd is not run from arch-chroot.

Moreover after a system restore the macchine changes id and SSH complains, so I think this is an indirect proof that wedon't ship such a file.

@alkazar
Copy link
Member

alkazar commented Mar 31, 2024

This introduces complexity which I am not comfortable with.

"Distributing updates to /etc" which will overwrite user's configuration is not something I think we need or should do.
For example, this would revert the password if the user has changed it.

I would much prefer to keep the overlay system we have now. If there is an issue with it, we should try to fix that.

@NeroReflex
Copy link
Contributor Author

NeroReflex commented Mar 31, 2024

This introduces complexity which I am not comfortable with.

"Distributing updates to /etc" which will overwrite user's configuration is not something I think we need or should do. For example, this would revert the password if the user has changed it.

I would much prefer to keep the overlay system we have now. If there is an issue with it, we should try to fix that.

The problem is articulated in two points, and 3 solutions exists.

  1. (Current) user modifications take precedence and we cannot update certain parts of the system. The user requires modifing /etc only once at the risk of (very difficult to spot) incompatibilities
  2. (Proposed) updates takes precedence. The user requires constantly editing /etc but this means that everything can be updated, restoring is much easier thanks to snapshots, and since modifications must be replaied it's much easier to spot subtle incompatibilities. This is the solution with higher coherence between the /etc and the rest of the system.
  3. 3-way merge that fedora and in general ostree distro uses (and I think bootc too). Difficult to implement and introduces failure point during the upgrade as well as possible incoherent files.

In the case of 2 we can carry over the password as well as machine-id

@ruineka ruineka merged commit 7f46f86 into ChimeraOS:master Jul 24, 2024
1 check 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.

3 participants