Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 4daccf208feccb027731d3fc8dc2686ab9ef3428
      
https://github.com/NixOS/nixpkgs/commit/4daccf208feccb027731d3fc8dc2686ab9ef3428
  Author: aszlig <asz...@redmoonstudios.org>
  Date:   2017-02-20 (Mon, 20 Feb 2017)

  Changed paths:
    M nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py

  Log Message:
  -----------
  systemd-boot: Make sure /etc/machine-id exists

This leads to the following error when trying to install a new machine
where the machine ID wasn't yet initialized during boot:

Failed to get machine did: No such file or directory

In addition this was also detected by the simpleUefiGummiboot installer
test.

So let's generate a fallback machine ID by using
systemd-machine-id-setup before actually running bootctl.

Tested this by running the installer.simpleUefiGummiboot test, it still
fails but not because of the machine ID.

Signed-off-by: aszlig <asz...@redmoonstudios.org>
Cc: @edolstra, @shlevy, @mic92
Fixes: #22561


  Commit: dc31a1ea29cae217b71134bf59f888c5a90f630b
      
https://github.com/NixOS/nixpkgs/commit/dc31a1ea29cae217b71134bf59f888c5a90f630b
  Author: aszlig <asz...@redmoonstudios.org>
  Date:   2017-02-20 (Mon, 20 Feb 2017)

  Changed paths:
    M nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py

  Log Message:
  -----------
  systemd-boot: Unlink loader.conf if it exists

Since systemd version 232 the install subcommand of bootctl opens the
loader.conf with fopen() modes "wxe", where the "e" stands for
exclusive, so the call will fail if the file exists.

For installing the boot loader just once this is fine, but if we're
using NIXOS_INSTALL_BOOTLOADER on a systemd where the bootloader is
already present this will fail.

Exactly this is done within the simpleUefiGummiboot installer test,
where nixos-install is called twice and thus the bootloader is also
installed twice, resulting in an error during the fopen call:

Failed to open loader.conf for writing: File exists

Removing the file prior to calling bootctl should fix this.

I've tested this using the installer.simpleUefiGummiboot test and it now
succeeds.

Signed-off-by: aszlig <asz...@redmoonstudios.org>
Cc: @edolstra, @shlevy, @mic92
Fixes: #22925


Compare: https://github.com/NixOS/nixpkgs/compare/2c4d9c922868...dc31a1ea29ca
_______________________________________________
nix-commits mailing list
nix-comm...@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to