Closed a12l closed 4 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
.
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
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
.
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?
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;
};
};
}
closing then - feel free to open a new issue if it's still broken. Thanks!
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
dd if=/dev/urandom of=/dev/sda bs=4M status=progress
.gdisk /dev/sda
.512 MiB
of typeef00
(EFI). The partition becomes/dev/sda1
.8e00
(LVM). The partition becomes/dev/sda2
./dev/sda2
withcryptsetup luksFormat --type luks2 /dev/sda2
.cryptsetup open /dev/sda2 crypt
./dev/sda1
:mkfs.fat -F32 /dev/sda1
mkfs.xfs /dev/[volume group]/root
mkswap /dev/[volume group]/swap
/mnt
and/dev/sda1
to/mnt/boot
.nixos-generate-config
.nixos-install
.Technical details
Error message:
cat /mnt/etc/nixos/configuration.nix
:cat /mnt/etc/nixos/hardware-configuration.nix
:mount
:fdisk -l
:To get it working I had to make some changes in
configuration.nix
. Changed to the options below.nix-shell -p nix-info --run "nix-info -m"
: