Skip to content

nixos-enter: Ensures presence of full /sys tree. (for efivarfs) - #39342

Merged
7c6f434c merged 1 commit into
NixOS:masterfrom
samueldr:fix/nixos-enter-efivarfs
Apr 23, 2018
Merged

7c6f434c merged 1 commit into
NixOS:masterfrom
samueldr:fix/nixos-enter-efivarfs

Conversation

@samueldr

@samueldr samueldr commented Apr 22, 2018 •

Copy link
Copy Markdown
Member

This partially reverts a change from e88f289 which removed the mount --rbind /sys.

While true that the activation scripts will mount sysfs at /sys, none of the mountpoints lower in the /sys tree are handled by the activation script, which includes efivarfs.

Motivation for this change

This fixes #38477 since it ensures the presence of efivarfs in the /sys tree, which is why the systemd-boot installation failed.

Things done
  • ☑️ Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • ☑️ Tested execution of all binary files (usually in ./result/bin/)
  • ☑️ Fits CONTRIBUTING.md.

Tested by:

  • Executing in qemu with efi exec qemu-system-x86_64 --enable-kvm -bios /nix/store/qcc1qxnmzg4phgij3ap7v3yq4yhaxiqc-OVMF-2017-12-05-fd/FV/OVMF.fd -device e1000,netdev=net0 -netdev user,id=net0 -m 4G -cdrom /nix/store/i6a4v4jpn1016iipzsqlw9f83a9vh2f7-nixos-18.03.git.06c576b-x86_64-linux.iso/iso/nixos-18.03.git.06c576b-x86_64-linux.iso -hda hdd.img; The actual path for the OVMF bios will change.
  • Ensuring both nixos-install and nixos-enter work, without any warning or weirdness.
Things to do
  • Cherry-pick to 18.03 !

This partially reverts a change from e88f289
which removed the `mount --rbind /sys`.

While true that the activation scripts will mount `sysfs` at `/sys`,
none of the mountpoints lower in the `/sys` tree are handled by the
activation script, which includes `efivarfs`.

This fixes NixOS#38477 since it ensures the presence of `efivarfs` in the
`/sys` tree, which is why the systemd-boot installation failed.
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Apr 22, 2018
@Mic92
Mic92 requested a review from edolstra April 22, 2018 22:20
@7c6f434c
7c6f434c merged commit 6048470 into NixOS:master Apr 23, 2018
7c6f434c added a commit that referenced this pull request Apr 23, 2018
nixos-enter: Ensures presence of full /sys tree. (for efivarfs)
(cherry picked from commit 6048470)
@samueldr
samueldr deleted the fix/nixos-enter-efivarfs branch June 1, 2018 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NixOS 18.03 minimal fails fresh install (systemd-boot-builder)

3 participants