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

nixos/stage-1: set up /dev/fd #98502

Merged
merged 1 commit into from Sep 23, 2020
Merged

nixos/stage-1: set up /dev/fd #98502

merged 1 commit into from Sep 23, 2020

Conversation

cole-h
Copy link
Member

@cole-h cole-h commented Sep 22, 2020

Otherwise, stage-2-init.sh will complain about not having access to
/dev/fd/62 as of systemd v246.

On IRC, flokli said:

15:14 <flokli> cole-h: hmmm... I could imagine some of the setup inside /dev has been moved into other parts of systemd
15:14 <flokli> And given we run systemd much later (outside initramfs only) it doesn't work properly here
15:17 <flokli> We probably don't invoke udev correctly
Motivation for this change

Fixes #97383.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I tested this by building and running a NixOS VM -- the warning is no longer printed.

cc @flokli + @worldofpeace

(This will need a backport, since we have systemd v246+ in 20.09.)

Otherwise, stage-2-init.sh will complain about not having access to
/dev/fd/62 as of systemd v246.

On IRC, flokli said:

    15:14 <flokli> cole-h: hmmm... I could imagine some of the setup inside /dev has been moved into other parts of systemd
    15:14 <flokli> And given we run systemd much later (outside initramfs only) it doesn't work properly here
    15:17 <flokli> We probably don't invoke udev correctly
@flokli
Copy link
Contributor

flokli commented Sep 23, 2020

backported to 20.09 as a780c60.

@cole-h cole-h deleted the link-dev-fd branch September 23, 2020 08:00
@cole-h
Copy link
Member Author

cole-h commented Sep 23, 2020

Thanks, @flokli!

@cole-h cole-h added 8.has: port to stable A PR already has a backport to the stable release. and removed 9.needs: port to stable A PR needs a backport to the stable release. labels Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"/dev/fd/62: No such file or directory" in init script on nixos-unstable(-small)
2 participants