-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
nixos/lxd-container: add /run to squashfs #264276
Conversation
Without /run the system won't boot with the following error: ``` To detach from the console, press: <ctrl>+a q setting up /etc... ln: failed to create symbolic link '/run/current-system': No such file or directory ln: failed to create symbolic link '/run/booted-system': No such file or directory error: getting status of '/run/current-system': No such file or directory starting systemd... /sbin/init: line 146: /run/current-system/systemd/lib/systemd/systemd: No such file or directory Error: write /dev/pts/ptmx: file already closed ``` Creating it fixes the error I'm not entierly sure if this is an lxd error or if nix is actually supposed to create /run if it doesn't exist
@ofborg eval |
Hmm, can you share your lxd container config? Or at least which options you're setting outside the defaults? |
Adding a pre-created directory probably doesn't hurt anything, but I've never run into an issue with
|
From my own image server I used the unstable squashfs image https://images.mkg20001.io/ No extra flags, security.nesting and security.privileged are both false Have you tested since systemd-run was introduced for the? There were other issues like "ln" being missing d156ab6 . Maybe this is new since that was introduced. You can test it yourself
LXD version is 5.18 |
Yeah, the image I built and ran above includes that commit. Do you know what commit your image is built off of? I can confirm yours does fail to start. |
It's from here https://hydra.nixos.org/build/239669483 (Unrelated: the squashfs image doesn't have build products, the .tar.xz one has - we should look into that aswell https://hydra.nixos.org/build/239408325) |
It's unclear to me whether we will need something like this PR if and when the reverted change is added back. |
It seems to me that nix is supposed to handle /run not existing. Unless that is a stage 1 only thing, in which case we need thispr. |
Do we want to revisit this? |
Is there any new trouble with the images? Otherwise if nixos is supposed to create /run anyways and there's no issues then we can close this PR. |
I think resolved. Will close for now. |
Without /run the system won't boot with the following error:
Creating it fixes the error
I'm not entierly sure if this is an lxd error or if nix is actually supposed to create /run if it doesn't exist
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)