NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.16k stars 14.19k forks source link

Can't install NixOS with systemd-boot #45032

Closed a12l closed 5 years ago

a12l commented 6 years ago

Issue description

I can't install NixOS 18.03 with the bootloader systemd-boot. When I run nixos-install I get an error message. Installing NixOS with Grub works flawlessly. The machine is a Lenovo Thinkpad X230 with only UEFI enabled and CSM support disabled. The disk is encrypted with LVM-on-LUKS.

The ISO file I used was verified with the SHA256 sum and written to the USB stick with Etcher with verification turned on.

Steps to reproduce

  1. Boot from NixOS liveUSB.
  2. Write random data to the disk with dd if=/dev/urandom of=/dev/sda bs=4M status=progress.
  3. Partition disk
    1. Execute gdisk /dev/sda.
    2. Create partition with size 512 MiB of type ef00 (EFI). The partition becomes /dev/sda1.
    3. Create partition with rest of the available storage of type 8e00 (LVM). The partition becomes /dev/sda2.
  4. Encrypt /dev/sda2 with cryptsetup luksFormat --type luks2 /dev/sda2.
  5. Decrypt the partition with cryptsetup open /dev/sda2 crypt.
  6. Create LVM logical volumes.
    1. Create volume group.
    2. Create logical volume for swap ("swap").
    3. Create logical volume for everything else ("root").
  7. Create filesystems
    1. /dev/sda1: mkfs.fat -F32 /dev/sda1
    2. "root": mkfs.xfs /dev/[volume group]/root
    3. "swap": mkswap /dev/[volume group]/swap
  8. Mount "root" to /mnt and /dev/sda1 to /mnt/boot.
  9. Run nixos-generate-config.
  10. Edit config. See below.
  11. Run nixos-install.
  12. Error message shows after some time.

Technical details

Error message:

building the configuration in /mnt/etc/nixos/configuration.nix...
warning: dumping very large path (> 256 MiB); this may run out of memory
[194 built, 852 copied (3480.1 MiB), 65.4 MiB DL]
copying channel...
installing the boot loader...
setting up /etc...
Initializing machine ID from random generator.
Created "/boot/EFI".
Created "/boot/EFI/systemd".
Created "/boot/EFI/BOOT".
Created "/boot/loader".
Created "/boot/loader/entries".
Copied "/nix/store/f9dbl8y4zjgr81hs3y3zf187rqv83apz-systemd-237/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/nix/store/f9dbl8y4zjgr81hs3y3zf187rqv83apz-systemd-237/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI".
Created EFI boot entry "Linux Boot Manager".
Traceback (most recent call last):
  File "/nix/store/5dbvfczza5c4qkhgcvd2da65sg4lhy1l-systemd-boot-builder.py", line 210, in <module>
    main()
  File "/nix/store/5dbvfczza5c4qkhgcvd2da65sg4lhy1l-systemd-boot-builder.py", line 185, in main
    subprocess.check_call(["/nix/store/f9dbl8y4zjgr81hs3y3zf187rqv83apz-systemd-237/bin/bootctl", "--path=/boot", "install"])
  File "/nix/store/gxay7sx4jv1l69kcif1vw6vb28fsciws-python3-3.6.5/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/f9dbl8y4zjgr81hs3y3zf187rqv83apz-systemd-237/bin/bootctl', '--path=/boot', 'install']' returned non-zero exit status 1.

cat /mnt/etc/nixos/configuration.nix:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];

  # Use the systemd-boot EFI boot loader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  # Prompt for decrypting disk at startup
  boot.initrd.luks.devices = [ {
    name = "root";
    device = "/dev/disk/by-uuid/592faaef-ff2f-45c1-9582-85268b8ad01b";
  } ];

  networking.hostName = "dobby"; # Define your hostname.
  networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

  # Select internationalisation properties.
  i18n = {
    consoleFont = "Lat2-Terminus16";
    consoleKeyMap = "us";
    defaultLocale = "en_US.UTF-8";
  };

  # Set your time zone.
  time.timeZone = "Europe/Stockholm";

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
    kakoune
    rsync
    firefox
    curl
    wget 
  ];

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  # programs.bash.enableCompletion = true;
  # programs.mtr.enable = true;
  # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  # services.openssh.enable = true;

  # Open ports in the firewall.
  # networking.firewall.allowedTCPPorts = [ ... ];
  # networking.firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  # networking.firewall.enable = false;

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound.
  sound.enable = true;
  hardware.pulseaudio.enable = true;

  # Enable the X11 windowing system.
  services.xserver.enable = true;
  services.xserver.layout = "us";
  services.xserver.xkbOptions = "eurosign:e";

  # Enable touchpad support.
  services.xserver.libinput.enable = true;

  # Enable the KDE Desktop Environment.
  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  # users.extraUsers.guest = {
  #   isNormalUser = true;
  #   uid = 1000;
  # };

  # This value determines the NixOS release with which your system is to be
  # compatible, in order to avoid breaking some software such as database
  # servers. You should change this only after NixOS release notes say you
  # should.
  system.stateVersion = "18.03"; # Did you read the comment?

}

cat /mnt/etc/nixos/hardware-configuration.nix:

# Do not modify this file!  It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations.  Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:

{
  imports =
    [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
    ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/558b5b21-211f-4c4d-a1ba-93b47121176c";
      fsType = "xfs";
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/5AF8-3387";
      fsType = "vfat";
    };

  swapDevices = [ ];

  nix.maxJobs = lib.mkDefault 4;
  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

mount:

devtmpfs on /dev type devtmpfs (rw,nosuid,size=399452k,nr_inodes=996901,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=3,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=1997244k,mode=755)
ramfs on /run/keys type ramfs (rw,nosuid,nodev,relatime,mode=750)
tmpfs on /run/wrappers type tmpfs (rw,nodev,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on / type tmpfs (rw,relatime,mode=755)
/dev/sdb1 on /iso type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)
/iso/nix-store.squashfs on /nix/.ro-store type squashfs (ro,relatime)
tmpfs on /nix/.rw-store type tmpfs (rw,relatime,mode=755)
unionfs on /nix/store type fuse.unionfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other)
unionfs on /nix/store type fuse.unionfs (ro,relatime,user_id=0,group_id=0,default_permissions,allow_other)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=798896k,mode=700)
/dev/mapper/dobby--vg-root on /mnt type xfs (rw,relatime,attr2,inode64,noquota)
/dev/sda1 on /mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

fdisk -l:

Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9EAEC4D3-1FC9-42F5-88C7-2AD22E335B41

Device       Start       End   Sectors   Size Type
/dev/sda1     2048   1050623   1048576   512M EFI System
/dev/sda2  1050624 468862094 467811471 223.1G Linux LVM

To get it working I had to make some changes in configuration.nix. Changed to the options below.

# Use the systemd-boot EFI boot loader.
#boot.loader.systemd-boot.enable = true;
boot.loader.grub.enable = true;
boot.loader.grub.device = "nodev";
boot.loader.grub.efiSupport = true;
boot.loader.efi.canTouchEfiVariables = true;

nix-shell -p nix-info --run "nix-info -m":

error: getting status of `/home/user/default.nix': No such file or directory
emmanuelrosa commented 6 years ago

Yeah... I've had that happen to me.

First run find /mnt/boot, so we can see if systemd-boot was copied to the ESP. Next, use efibootmgr (which you can install from the live ISO/USB) to check your boot entries and change it so it boots systemd-boot by default. The Gentoo Linux documentation may help you with efibootmgr.

a12l commented 6 years ago

I'm running the following commands from the same system (booting using Grub as descried above). Adding the information before I test to change boot loader at a later time. I want to be able to boot the system.

find /boot/:

/boot/
/boot/EFI
/boot/EFI/systemd
/boot/EFI/systemd/systemd-bootx64.efi
/boot/EFI/BOOT
/boot/EFI/BOOT/BOOTX64.EFI
/boot/EFI/NixOS-boot
/boot/EFI/NixOS-boot/grubx64.efi
/boot/loader
/boot/loader/entries
/boot/loader/loader.conf
/boot/grub
/boot/grub/state
/boot/grub/grub.cfg
/boot/grub/x86_64-efi
/boot/grub/x86_64-efi/acpi.mod
/boot/grub/x86_64-efi/adler32.mod
/boot/grub/x86_64-efi/affs.mod
/boot/grub/x86_64-efi/afs.mod
/boot/grub/x86_64-efi/ahci.mod
/boot/grub/x86_64-efi/all_video.mod
/boot/grub/x86_64-efi/aout.mod
/boot/grub/x86_64-efi/appleldr.mod
/boot/grub/x86_64-efi/archelp.mod
/boot/grub/x86_64-efi/at_keyboard.mod
/boot/grub/x86_64-efi/ata.mod
/boot/grub/x86_64-efi/backtrace.mod
/boot/grub/x86_64-efi/bfs.mod
/boot/grub/x86_64-efi/bitmap.mod
/boot/grub/x86_64-efi/bitmap_scale.mod
/boot/grub/x86_64-efi/blocklist.mod
/boot/grub/x86_64-efi/boot.mod
/boot/grub/x86_64-efi/bsd.mod
/boot/grub/x86_64-efi/bswap_test.mod
/boot/grub/x86_64-efi/btrfs.mod
/boot/grub/x86_64-efi/bufio.mod
/boot/grub/x86_64-efi/cat.mod
/boot/grub/x86_64-efi/cbfs.mod
/boot/grub/x86_64-efi/cbls.mod
/boot/grub/x86_64-efi/cbmemc.mod
/boot/grub/x86_64-efi/cbtable.mod
/boot/grub/x86_64-efi/cbtime.mod
/boot/grub/x86_64-efi/chain.mod
/boot/grub/x86_64-efi/cmdline_cat_test.mod
/boot/grub/x86_64-efi/cmp.mod
/boot/grub/x86_64-efi/cmp_test.mod
/boot/grub/x86_64-efi/configfile.mod
/boot/grub/x86_64-efi/cpio.mod
/boot/grub/x86_64-efi/cpio_be.mod
/boot/grub/x86_64-efi/cpuid.mod
/boot/grub/x86_64-efi/crc64.mod
/boot/grub/x86_64-efi/crypto.mod
/boot/grub/x86_64-efi/cryptodisk.mod
/boot/grub/x86_64-efi/cs5536.mod
/boot/grub/x86_64-efi/ctz_test.mod
/boot/grub/x86_64-efi/date.mod
/boot/grub/x86_64-efi/datehook.mod
/boot/grub/x86_64-efi/datetime.mod
/boot/grub/x86_64-efi/disk.mod
/boot/grub/x86_64-efi/diskfilter.mod
/boot/grub/x86_64-efi/div.mod
/boot/grub/x86_64-efi/div_test.mod
/boot/grub/x86_64-efi/dm_nv.mod
/boot/grub/x86_64-efi/echo.mod
/boot/grub/x86_64-efi/efi_gop.mod
/boot/grub/x86_64-efi/efi_uga.mod
/boot/grub/x86_64-efi/efifwsetup.mod
/boot/grub/x86_64-efi/efinet.mod
/boot/grub/x86_64-efi/ehci.mod
/boot/grub/x86_64-efi/elf.mod
/boot/grub/x86_64-efi/eval.mod
/boot/grub/x86_64-efi/exfat.mod
/boot/grub/x86_64-efi/exfctest.mod
/boot/grub/x86_64-efi/ext2.mod
/boot/grub/x86_64-efi/extcmd.mod
/boot/grub/x86_64-efi/fat.mod
/boot/grub/x86_64-efi/file.mod
/boot/grub/x86_64-efi/fixvideo.mod
/boot/grub/x86_64-efi/font.mod
/boot/grub/x86_64-efi/fshelp.mod
/boot/grub/x86_64-efi/functional_test.mod
/boot/grub/x86_64-efi/gcry_arcfour.mod
/boot/grub/x86_64-efi/gcry_blowfish.mod
/boot/grub/x86_64-efi/gcry_camellia.mod
/boot/grub/x86_64-efi/gcry_cast5.mod
/boot/grub/x86_64-efi/gcry_crc.mod
/boot/grub/x86_64-efi/gcry_des.mod
/boot/grub/x86_64-efi/gcry_dsa.mod
/boot/grub/x86_64-efi/gcry_idea.mod
/boot/grub/x86_64-efi/gcry_md4.mod
/boot/grub/x86_64-efi/gcry_md5.mod
/boot/grub/x86_64-efi/gcry_rfc2268.mod
/boot/grub/x86_64-efi/gcry_rijndael.mod
/boot/grub/x86_64-efi/gcry_rmd160.mod
/boot/grub/x86_64-efi/gcry_rsa.mod
/boot/grub/x86_64-efi/gcry_seed.mod
/boot/grub/x86_64-efi/gcry_serpent.mod
/boot/grub/x86_64-efi/gcry_sha1.mod
/boot/grub/x86_64-efi/gcry_sha256.mod
/boot/grub/x86_64-efi/gcry_sha512.mod
/boot/grub/x86_64-efi/gcry_tiger.mod
/boot/grub/x86_64-efi/gcry_twofish.mod
/boot/grub/x86_64-efi/gcry_whirlpool.mod
/boot/grub/x86_64-efi/geli.mod
/boot/grub/x86_64-efi/gettext.mod
/boot/grub/x86_64-efi/gfxmenu.mod
/boot/grub/x86_64-efi/gfxterm.mod
/boot/grub/x86_64-efi/gfxterm_background.mod
/boot/grub/x86_64-efi/gfxterm_menu.mod
/boot/grub/x86_64-efi/gptsync.mod
/boot/grub/x86_64-efi/gzio.mod
/boot/grub/x86_64-efi/halt.mod
/boot/grub/x86_64-efi/hashsum.mod
/boot/grub/x86_64-efi/hdparm.mod
/boot/grub/x86_64-efi/hello.mod
/boot/grub/x86_64-efi/help.mod
/boot/grub/x86_64-efi/hexdump.mod
/boot/grub/x86_64-efi/hfs.mod
/boot/grub/x86_64-efi/hfsplus.mod
/boot/grub/x86_64-efi/hfspluscomp.mod
/boot/grub/x86_64-efi/http.mod
/boot/grub/x86_64-efi/iorw.mod
/boot/grub/x86_64-efi/iso9660.mod
/boot/grub/x86_64-efi/jfs.mod
/boot/grub/x86_64-efi/jpeg.mod
/boot/grub/x86_64-efi/keylayouts.mod
/boot/grub/x86_64-efi/keystatus.mod
/boot/grub/x86_64-efi/ldm.mod
/boot/grub/x86_64-efi/legacy_password_test.mod
/boot/grub/x86_64-efi/legacycfg.mod
/boot/grub/x86_64-efi/linux.mod
/boot/grub/x86_64-efi/linux16.mod
/boot/grub/x86_64-efi/loadbios.mod
/boot/grub/x86_64-efi/loadenv.mod
/boot/grub/x86_64-efi/loopback.mod
/boot/grub/x86_64-efi/ls.mod
/boot/grub/x86_64-efi/lsacpi.mod
/boot/grub/x86_64-efi/lsefi.mod
/boot/grub/x86_64-efi/lsefimmap.mod
/boot/grub/x86_64-efi/lsefisystab.mod
/boot/grub/x86_64-efi/lsmmap.mod
/boot/grub/x86_64-efi/lspci.mod
/boot/grub/x86_64-efi/lssal.mod
/boot/grub/x86_64-efi/luks.mod
/boot/grub/x86_64-efi/lvm.mod
/boot/grub/x86_64-efi/lzopio.mod
/boot/grub/x86_64-efi/macbless.mod
/boot/grub/x86_64-efi/macho.mod
/boot/grub/x86_64-efi/mdraid09.mod
/boot/grub/x86_64-efi/mdraid09_be.mod
/boot/grub/x86_64-efi/mdraid1x.mod
/boot/grub/x86_64-efi/memdisk.mod
/boot/grub/x86_64-efi/memrw.mod
/boot/grub/x86_64-efi/minicmd.mod
/boot/grub/x86_64-efi/minix.mod
/boot/grub/x86_64-efi/minix2.mod
/boot/grub/x86_64-efi/minix3.mod
/boot/grub/x86_64-efi/minix2_be.mod
/boot/grub/x86_64-efi/minix3_be.mod
/boot/grub/x86_64-efi/minix_be.mod
/boot/grub/x86_64-efi/mmap.mod
/boot/grub/x86_64-efi/morse.mod
/boot/grub/x86_64-efi/mpi.mod
/boot/grub/x86_64-efi/msdospart.mod
/boot/grub/x86_64-efi/mul_test.mod
/boot/grub/x86_64-efi/multiboot.mod
/boot/grub/x86_64-efi/multiboot2.mod
/boot/grub/x86_64-efi/nativedisk.mod
/boot/grub/x86_64-efi/net.mod
/boot/grub/x86_64-efi/newc.mod
/boot/grub/x86_64-efi/nilfs2.mod
/boot/grub/x86_64-efi/normal.mod
/boot/grub/x86_64-efi/ntfs.mod
/boot/grub/x86_64-efi/ntfscomp.mod
/boot/grub/x86_64-efi/odc.mod
/boot/grub/x86_64-efi/offsetio.mod
/boot/grub/x86_64-efi/ohci.mod
/boot/grub/x86_64-efi/part_acorn.mod
/boot/grub/x86_64-efi/part_amiga.mod
/boot/grub/x86_64-efi/part_apple.mod
/boot/grub/x86_64-efi/part_bsd.mod
/boot/grub/x86_64-efi/part_dfly.mod
/boot/grub/x86_64-efi/part_dvh.mod
/boot/grub/x86_64-efi/part_gpt.mod
/boot/grub/x86_64-efi/part_msdos.mod
/boot/grub/x86_64-efi/part_plan.mod
/boot/grub/x86_64-efi/part_sun.mod
/boot/grub/x86_64-efi/part_sunpc.mod
/boot/grub/x86_64-efi/parttool.mod
/boot/grub/x86_64-efi/password.mod
/boot/grub/x86_64-efi/password_pbkdf2.mod
/boot/grub/x86_64-efi/pata.mod
/boot/grub/x86_64-efi/pbkdf2.mod
/boot/grub/x86_64-efi/pbkdf2_test.mod
/boot/grub/x86_64-efi/pcidump.mod
/boot/grub/x86_64-efi/play.mod
/boot/grub/x86_64-efi/png.mod
/boot/grub/x86_64-efi/priority_queue.mod
/boot/grub/x86_64-efi/probe.mod
/boot/grub/x86_64-efi/procfs.mod
/boot/grub/x86_64-efi/progress.mod
/boot/grub/x86_64-efi/raid5rec.mod
/boot/grub/x86_64-efi/raid6rec.mod
/boot/grub/x86_64-efi/random.mod
/boot/grub/x86_64-efi/read.mod
/boot/grub/x86_64-efi/reboot.mod
/boot/grub/x86_64-efi/regexp.mod
/boot/grub/x86_64-efi/reiserfs.mod
/boot/grub/x86_64-efi/relocator.mod
/boot/grub/x86_64-efi/romfs.mod
/boot/grub/x86_64-efi/scsi.mod
/boot/grub/x86_64-efi/search.mod
/boot/grub/x86_64-efi/search_fs_file.mod
/boot/grub/x86_64-efi/search_fs_uuid.mod
/boot/grub/x86_64-efi/search_label.mod
/boot/grub/x86_64-efi/serial.mod
/boot/grub/x86_64-efi/setjmp.mod
/boot/grub/x86_64-efi/setjmp_test.mod
/boot/grub/x86_64-efi/setpci.mod
/boot/grub/x86_64-efi/sfs.mod
/boot/grub/x86_64-efi/shift_test.mod
/boot/grub/x86_64-efi/signature_test.mod
/boot/grub/x86_64-efi/sleep.mod
/boot/grub/x86_64-efi/sleep_test.mod
/boot/grub/x86_64-efi/spkmodem.mod
/boot/grub/x86_64-efi/squash4.mod
/boot/grub/x86_64-efi/syslinuxcfg.mod
/boot/grub/x86_64-efi/tar.mod
/boot/grub/x86_64-efi/terminal.mod
/boot/grub/x86_64-efi/terminfo.mod
/boot/grub/x86_64-efi/test.mod
/boot/grub/x86_64-efi/test_blockarg.mod
/boot/grub/x86_64-efi/testload.mod
/boot/grub/x86_64-efi/testspeed.mod
/boot/grub/x86_64-efi/tftp.mod
/boot/grub/x86_64-efi/tga.mod
/boot/grub/x86_64-efi/time.mod
/boot/grub/x86_64-efi/tr.mod
/boot/grub/x86_64-efi/trig.mod
/boot/grub/x86_64-efi/true.mod
/boot/grub/x86_64-efi/udf.mod
/boot/grub/x86_64-efi/ufs1.mod
/boot/grub/x86_64-efi/ufs1_be.mod
/boot/grub/x86_64-efi/ufs2.mod
/boot/grub/x86_64-efi/uhci.mod
/boot/grub/x86_64-efi/usb.mod
/boot/grub/x86_64-efi/usb_keyboard.mod
/boot/grub/x86_64-efi/usbms.mod
/boot/grub/x86_64-efi/usbserial_common.mod
/boot/grub/x86_64-efi/usbserial_ftdi.mod
/boot/grub/x86_64-efi/usbserial_pl2303.mod
/boot/grub/x86_64-efi/usbserial_usbdebug.mod
/boot/grub/x86_64-efi/usbtest.mod
/boot/grub/x86_64-efi/verify.mod
/boot/grub/x86_64-efi/video.mod
/boot/grub/x86_64-efi/video_bochs.mod
/boot/grub/x86_64-efi/video_cirrus.mod
/boot/grub/x86_64-efi/video_colors.mod
/boot/grub/x86_64-efi/video_fb.mod
/boot/grub/x86_64-efi/videoinfo.mod
/boot/grub/x86_64-efi/videotest.mod
/boot/grub/x86_64-efi/videotest_checksum.mod
/boot/grub/x86_64-efi/xfs.mod
/boot/grub/x86_64-efi/xnu.mod
/boot/grub/x86_64-efi/xnu_uuid.mod
/boot/grub/x86_64-efi/xnu_uuid_test.mod
/boot/grub/x86_64-efi/xzio.mod
/boot/grub/x86_64-efi/zfs.mod
/boot/grub/x86_64-efi/zfscrypt.mod
/boot/grub/x86_64-efi/zfsinfo.mod
/boot/grub/x86_64-efi/moddep.lst
/boot/grub/x86_64-efi/command.lst
/boot/grub/x86_64-efi/fs.lst
/boot/grub/x86_64-efi/partmap.lst
/boot/grub/x86_64-efi/parttool.lst
/boot/grub/x86_64-efi/video.lst
/boot/grub/x86_64-efi/crypto.lst
/boot/grub/x86_64-efi/terminal.lst
/boot/grub/x86_64-efi/modinfo.sh
/boot/grub/x86_64-efi/core.efi
/boot/grub/x86_64-efi/grub.efi
/boot/grub/locale
/boot/grub/locale/ast.mo
/boot/grub/locale/ca.mo
/boot/grub/locale/da.mo
/boot/grub/locale/de.mo
/boot/grub/locale/de@hebrew.mo
/boot/grub/locale/de_CH.mo
/boot/grub/locale/en@arabic.mo
/boot/grub/locale/en@cyrillic.mo
/boot/grub/locale/en@greek.mo
/boot/grub/locale/en@hebrew.mo
/boot/grub/locale/en@piglatin.mo
/boot/grub/locale/en@quot.mo
/boot/grub/locale/eo.mo
/boot/grub/locale/es.mo
/boot/grub/locale/fi.mo
/boot/grub/locale/fr.mo
/boot/grub/locale/gl.mo
/boot/grub/locale/hr.mo
/boot/grub/locale/hu.mo
/boot/grub/locale/id.mo
/boot/grub/locale/it.mo
/boot/grub/locale/ja.mo
/boot/grub/locale/ko.mo
/boot/grub/locale/lt.mo
/boot/grub/locale/nb.mo
/boot/grub/locale/nl.mo
/boot/grub/locale/pa.mo
/boot/grub/locale/pl.mo
/boot/grub/locale/pt_BR.mo
/boot/grub/locale/ru.mo
/boot/grub/locale/sl.mo
/boot/grub/locale/sr.mo
/boot/grub/locale/sv.mo
/boot/grub/locale/tr.mo
/boot/grub/locale/uk.mo
/boot/grub/locale/vi.mo
/boot/grub/locale/zh_CN.mo
/boot/grub/locale/zh_TW.mo
/boot/grub/fonts
/boot/grub/fonts/unicode.pf2
/boot/grub/grubenv
/boot/converted-font.pf2
/boot/background.png
/boot/kernels
/boot/kernels/sny3mhrza6bz8fb1fa0pv193j809mcf4-linux-4.14.54-bzImage
/boot/kernels/nawb4w9ki175s5waz5bqp0n02fabdb5s-initrd-initrd
/boot/kernels/82bclf2ic1ndx0p9mdmanmcf11dl7wxs-initrd-initrd
/boot/kernels/95p8ffh74bpllwfvh3aa6zh1znvjky56-linux-4.14.62-bzImage
/boot/kernels/9jhq0q7ag01knafhxxi0yb1fn95kz8a9-initrd-initrd
/boot/kernels/ig78fs9c5hbw9m4fspk2z8zdp8piwqy0-linux-4.14.63-bzImage
/boot/kernels/vjwm06mvzs225rkb3bz799zhi53lxmf1-initrd-initrd
/boot/kernels/ipj9y5mbd9i94cfkqzzgqn1jan790cr6-linux-4.14.63-bzImage
/boot/kernels/8p4shpwym5iqy6q8pq3vzsiqf6a9fk5d-initrd-initrd
/boot/kernels/khn417q1hwca7i1k217wcw2b8wan1cmx-linux-4.14.65-bzImage
/boot/kernels/cypbi6nyg2lm1swh7jb4dj3d9s9kfy80-initrd-initrd
/boot/kernels/nsaq3x4bpmaf0cxq0yfkx5qim7d50kak-linux-4.14.66-bzImage
/boot/kernels/swjr40hgc06h3pb41pp81cbjggy3qb51-initrd-initrd

efibootmgr:

BootCurrent: 0019
Timeout: 2 seconds
BootOrder: 0019,0000,0001,0002,0003,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0012
Boot0000  Setup
Boot0001  Boot Menu
Boot0002  Diagnostic Splash Screen
Boot0003  Lenovo Diagnostics
Boot0004  Startup Interrupt Menu
Boot0005  ME Configuration Menu
Boot0006  Rescue and Recovery
Boot0007* USB CD
Boot0008* USB FDD
Boot0009* ATAPI CD0
Boot000A* ATA HDD0
Boot000B* ATA HDD1
Boot000C* ATA HDD2
Boot000D* USB HDD
Boot000E* PCI LAN
Boot000F* ATAPI CD1
Boot0010  Other CD
Boot0011* ATA HDD3
Boot0012  Other HDD
Boot0013* IDER BOOT CDROM
Boot0014* IDER BOOT Floppy
Boot0015* ATA HDD
Boot0016* ATAPI CD:
Boot0017* PCI LAN
Boot0018* Linux Boot Manager
Boot0019* NixOS-boot
emmanuelrosa commented 6 years ago

I'm glad you got it working by using Grub. It's interesting systemd-boot didn't work for you.

Note, you forgot to enable the swap LV prior to running nixos-generate-config, which is why swapDevices = [ ] is an empty list in your hardware-configuration.nix. It's an easy fix, just boot the system, use swapon to enable your swap LV, run nixos-generate-config again, and finally nixos-rebuild switch.

flokli commented 5 years ago

We run installer tests, also with systemd-boot - so in general I'd say this should work - we also didn't receive a ton of bug reports either.

Can you test whether this is still the case on 19.03?

srghma commented 5 years ago

found this issue accidentally (was perplexed that nixos-generate-config generated config with grub instead of systemd-boot)

anyway, had no errors

my config

{ config, lib, pkgs, ... }:

{
  boot = {
    tmpOnTmpfs = false;
    cleanTmpDir = true;

    # Bootloader
    loader = {
      efi.canTouchEfiVariables = true;
      systemd-boot.enable = true;
    };
  };
}
flokli commented 5 years ago

closing then - feel free to open a new issue if it's still broken. Thanks!

aleks-sidorenko commented 1 month ago

I had this issue reproduced in 23.11, grub was the fix for me