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

Kernel panic resulting from a possible precedence issue #77

Closed
jmc-figueira opened this issue Feb 5, 2022 · 4 comments · Fixed by #85
Closed

Kernel panic resulting from a possible precedence issue #77

jmc-figueira opened this issue Feb 5, 2022 · 4 comments · Fixed by #85

Comments

@jmc-figueira
Copy link

jmc-figueira commented Feb 5, 2022

Hi!

I was previously using impermanence pinned to commit 5855884 and, having seen the recent improvements to the module, decided to update to commit ff540db.

Unfortunately, somewhere in between, possibly due to the addition of #44, I believe that the /etc/NIXOS file, which I currently have configured to be persisted, as it is stated to be necessary for NixOS to recognize its own root partition, became involved in a precedence issue, where it causes NixOS to panic due to its potentially premature loading. The following screenshot exemplifies this occurrence (sorry for the poor quality but, as I do not have systemctl logs persisted, I am unable to directly copy the relevant log lines):

image

What occurs after the /etc/NIXOS clash is that systemd is not found and the boot process is aborted.

I apologize for the vagueness of my explanation, but I am at a loss as to what else may be the root cause of this issue, as well as any potential workarounds.

@maydayv7
Copy link
Contributor

/etc/NIXOS is automatically generated, and needn't be persisted. Works perfectly fine for me that way

@etu
Copy link
Collaborator

etu commented Feb 14, 2022

I believe that the /etc/NIXOS file, which I currently have configured to be persisted, as it is stated to be necessary for NixOS to recognize its own root partition, became involved in a precedence issue, where it causes NixOS to panic due to its potentially premature loading.

Where is this stated to be a necessary file? I'm running all my systems on tmpfs as root and ZFS for persistence mounted in where needed. I've never even looked at this file before.

@talyz
Copy link
Collaborator

talyz commented Feb 14, 2022

Yeah, the /etc/NIXOS file is automatically created on boot by the setup-etc.pl script, so you don't need to persist it. However, the kernel panic is a bug that should be fixed. It probably occurs because the script exits with an error when a conflicting file is found. I'll fix that.

talyz added a commit that referenced this issue Feb 14, 2022
Exiting with an error in the activation script causes the whole script
to fail and system boot thus fails with a kernel panic. Since the
point of exiting with an error is mainly to make the systemd service
fail, let's do it only when the script runs as a service.

Fixes #77
talyz added a commit that referenced this issue Feb 14, 2022
Exiting with an error in the activation script causes the whole script
to fail and system boot thus fails with a kernel panic. Since the
point of exiting with an error is mainly to make the systemd service
fail, let's do it only when the script runs as a service.

Fixes #77
@talyz
Copy link
Collaborator

talyz commented Feb 14, 2022

Can you try out #84 and see if it solves your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants