Nixpkgs: nixos-rebuild will not switch to new configuration (possibly gummiboot-related)

Created on 22 Apr 2016  路  16Comments  路  Source: NixOS/nixpkgs

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"
bug nixos

Most helpful comment

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

All 16 comments

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 "";


This is what we get for removing UEFI tests :(

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

See 92837f2dbf2bf3691f3f82548ed29ce6cd79155d

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

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.

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

Great! I already started to work on the UEFI test (without noticing the old one), but got sidetracked by the dbus thing... https://github.com/dezgeg/nixpkgs/commit/348947fc41b7c46310c4389602530f2c0661b6db

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?

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

It's not in master but staging.

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

@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.

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?

Did you try the full fix (#14953)?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

domenkozar picture domenkozar  路  3Comments

ob7 picture ob7  路  3Comments

copumpkin picture copumpkin  路  3Comments

teto picture teto  路  3Comments

lverns picture lverns  路  3Comments