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-rebuild will not switch to new configuration (possibly gummiboot-related) #14902

Closed
NeQuissimus opened this issue Apr 22, 2016 · 16 comments
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@NeQuissimus
Copy link
Member

Issue description

I am trying to nixos-rebuild switch (it does not matter whether I do it with or without -I nixpkgs=~/dev/nixpkgs; where that points at the latest master; I have also run with --upgrade to pull the latest channel updates).
I keep seeing the following, complaining about something with gummiboot:

Traceback (most recent call last):
  File "/nix/store/jppdlvff9ldhxm6wcq2cjsx1094hsg9m-gummiboot-builder.py", line 112, in <module>
    gens = get_generations("system")
  File "/nix/store/jppdlvff9ldhxm6wcq2cjsx1094hsg9m-gummiboot-builder.py", line 67, in get_generations
    "--option", "build-users-group", ""
  File "/nix/store/8gv8s398yqbwfk01x29x1b5hhfq29s8k-python-2.7.11/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/nix/store/8gv8s398yqbwfk01x29x1b5hhfq29s8k-python-2.7.11/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/nix/store/8gv8s398yqbwfk01x29x1b5hhfq29s8k-python-2.7.11/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
warning: error(s) occurred while switching to the new configuration

The gummiboot-builder.py seems to issue nix-env --list-generations --option build-users-group "", which when run by hand, results in the following for me:

  16   2016-04-15 09:27:26   (current)

Steps to reproduce

nixos-rebuild switch

Technical details

  • System: 16.09.git.0729f60 (Flounder)
  • Nix version: nix-env (Nix) 1.12pre4523_3b81b26
  • Nixpkgs version: "16.09pre81686.f1675d9"
@joachifm joachifm added 0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Apr 22, 2016
@dezgeg
Copy link
Contributor

dezgeg commented Apr 22, 2016

Probably this:

diff --git a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
index 6c201eb..69ad2c6 100644
--- a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
+++ b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
@@ -14,7 +14,7 @@ let

     inherit (pkgs) python gummiboot;

-    nix = config.nix.package;
+    nix = config.nix.package.out;

     timeout = if cfg.timeout != null then cfg.timeout else "";


@domenkozar
Copy link
Member

This is what we get for removing UEFI tests :(

@domenkozar
Copy link
Member

@aszlig another reason for ${config.nix.package.out => bin/nix-env}

@domenkozar
Copy link
Member

See 92837f2

@dezgeg
Copy link
Contributor

dezgeg commented Apr 23, 2016

Well, #14766 also helps as a stop-gap solution (requiring no changes to the Nix language).

@dezgeg
Copy link
Contributor

dezgeg commented Apr 23, 2016

BTW we do seem to have UEFI boot tests which do seem to work (well pretty much every test is now broken due to dbus upgrade): http://hydra.nixos.org/build/34909292, though they aren't marked as release-critical.

@domenkozar
Copy link
Member

I've made the boot tests a requirement for a release.

domenkozar added a commit that referenced this issue Apr 23, 2016
(cherry picked from commit 9d1662c)
Signed-off-by: Domen Kožar <[email protected]>
@dezgeg
Copy link
Contributor

dezgeg commented Apr 23, 2016

Great! I already started to work on the UEFI test (without noticing the old one), but got sidetracked by the dbus thing... dezgeg@348947f

@NeQuissimus
Copy link
Member Author

Adding .out to the nix package definition does seem to fix the issue.
The fact that nix-daemon will not start has to do with the dbus issues, I assume?

@dezgeg
Copy link
Contributor

dezgeg commented Apr 23, 2016

Probably yes, just fetch latest master where the dbus update is reverted.

@vcunat
Copy link
Member

vcunat commented Apr 23, 2016

It's not in master but staging.

@dezgeg
Copy link
Contributor

dezgeg commented Apr 24, 2016

Ok so closer look tells that this only happens with e.g. nix.package = pkgs.nixUnstable;. Fix is at #14953.

@bobvanderlinden
Copy link
Member

@domenkozar Just to note, those boot tests are only for booting ISO using UEFI from CD-rom and USB, not for actual 'normal' harddisks: separate boot partition, GPT and all that. The ISO also has custom gummiboot configuration, so generating gummiboot configuration is not covered by those tests. I've made #14956 to continue that conversation separately.

@NeQuissimus
Copy link
Member Author

So after rebuilding against staging, I am still getting the error with nix-daemon. The service file simply has no ExecStart or ExecStop and systemd can therefore not run anything.
Is that an issue along the same lines as this or should I open a new one for it?

@dezgeg
Copy link
Contributor

dezgeg commented Apr 24, 2016

Did you try the full fix (#14953)?

@NeQuissimus
Copy link
Member Author

Yes, it seems fine now. Closing this one, since we seem to have open issues for all the things.

adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

No branches or pull requests

6 participants