Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 2829500ac2bd
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 91488173319e
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jan 10, 2021

  1. nixos: fix "nixos-rebuild build-vm-with-bootloader" for EFI systems

    (The first version of this change, in commit 39fad29, broke
    `nix-build -A nixosTests.installer.simpleUefiSystemdBoot`. This is the
    2nd version, which hopefully does not break anything.)
    
    `nixos-rebuild build-vm-with-bootloader` currently fails with the
    default NixOS EFI configuration:
    
      $ cat >configuration.nix <<EOF
      {
        fileSystems."/".device = "/dev/sda1";
        boot.loader.systemd-boot.enable = true;
        boot.loader.efi.canTouchEfiVariables = true;
      }
      EOF
    
      $ nixos-rebuild build-vm-with-bootloader -I nixos-config=$PWD/configuration.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-20.09.tar.gz
      [...]
      insmod: ERROR: could not insert module /nix/store/1ibmgfr13r8b6xyn4f0wj115819f359c-linux-5.4.83/lib/modules/5.4.83/kernel/fs/efivarfs/efivarfs.ko.xz: No such device
      mount: /sys/firmware/efi/efivars: mount point does not exist.
      [    1.908328] reboot: Power down
      builder for '/nix/store/dx2ycclyknvibrskwmii42sgyalagjxa-nixos-boot-disk.drv' failed with exit code 32
      [...]
    
    Fix it by setting virtualisation.useEFIBoot = true when needed.
    
    Before:
    * release-20.03: successful build, unsuccessful run
    * release-20.09 (and master): unsuccessful build
    
    After:
    * Successful build and run.
    
    Fixes #107255
    
    (cherry picked from commit 72d906a)
    bjornfor committed Jan 10, 2021
    Copy the full SHA
    9148817 View commit details
    Browse the repository at this point in the history