"Reboot Into Firmware Interface" instead of old generations

Hi,

I’ve tried to add ntfs support to my working just fine nixOS. As I’ve already had zfs support I’ve modifed the line:

boot.supportedFilesystems = [ "zfs" "ntfs" ];

However it didn’t work:

# nixos-rebuild switch --show-trace
building Nix...
building the system configuration...
these derivations will be built:
  /nix/store/1q4klhg04z38sz1ryqwhi6q9qnfmp2s6-stage-2-init.sh.drv
  /nix/store/bjh7i791mi5j00qbhwiq647sdmkkyc55-system-path.drv
  /nix/store/a2s4fx8rg0m4hx8gvyc1kyajyw4kqs81-dbus-1.drv
  /nix/store/yxgqg4rmyvffc7jqa60zzyki3wdrs4l9-unit-dbus.service.drv
  /nix/store/2anan8xp4lnhnywz9hd69in6868nvx8a-user-units.drv
  /nix/store/4a10qm09k07mdzw6qx74by1avzirq00c-unit-dbus.service.drv
  /nix/store/6y0dy2irad2fmzl7ywj6nyd21z5dgw61-unit-polkit.service.drv
  /nix/store/s7nbbij84q5d6qficzddjniwclp8j4va-unit-systemd-fsck-.service.drv
  /nix/store/ail4y79aqip0hfbsmz8i77l63rkrxiqq-system-units.drv
  /nix/store/c0cvvlb9i5i49yv084wz3xmjki9mbjym-etc.drv
  /nix/store/2f5z2m85wyldxxc5nnanj8k001lllqbn-nixos-system-nixos-19.09.941.27a5ddcf747.drv
these paths will be fetched (0.05 MiB download, 0.06 MiB unpacked):
  /nix/store/4fv75rir86ddgqbg18vdg47b6bhyblm4-ntfs3g-2017.3.23-doc
  /nix/store/5i84zmdzcykz1d3nkd86rlv0mpwgfywh-ntfs3g-2017.3.23-man
copying path '/nix/store/4fv75rir86ddgqbg18vdg47b6bhyblm4-ntfs3g-2017.3.23-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/5i84zmdzcykz1d3nkd86rlv0mpwgfywh-ntfs3g-2017.3.23-man' from 'https://cache.nixos.org'...
building '/nix/store/1q4klhg04z38sz1ryqwhi6q9qnfmp2s6-stage-2-init.sh.drv'...
building '/nix/store/bjh7i791mi5j00qbhwiq647sdmkkyc55-system-path.drv'...
created 6225 symlinks in user environment
building '/nix/store/a2s4fx8rg0m4hx8gvyc1kyajyw4kqs81-dbus-1.drv'...
building '/nix/store/6y0dy2irad2fmzl7ywj6nyd21z5dgw61-unit-polkit.service.drv'...
building '/nix/store/s7nbbij84q5d6qficzddjniwclp8j4va-unit-systemd-fsck-.service.drv'...
building '/nix/store/4a10qm09k07mdzw6qx74by1avzirq00c-unit-dbus.service.drv'...
building '/nix/store/yxgqg4rmyvffc7jqa60zzyki3wdrs4l9-unit-dbus.service.drv'...
building '/nix/store/ail4y79aqip0hfbsmz8i77l63rkrxiqq-system-units.drv'...
building '/nix/store/2anan8xp4lnhnywz9hd69in6868nvx8a-user-units.drv'...
building '/nix/store/c0cvvlb9i5i49yv084wz3xmjki9mbjym-etc.drv'...
building '/nix/store/2f5z2m85wyldxxc5nnanj8k001lllqbn-nixos-system-nixos-19.09.941.27a5ddcf747.drv'...
mktemp: failed to create directory via template ‘initrd-secrets.XXXXXXXXXX’: Read-only file system
Traceback (most recent call last):
  File "/nix/store/w2qf4b1gyb0bkk9r5vq0fnh27x3k047x-systemd-boot-builder.py", line 240, in <module>
    main()
  File "/nix/store/w2qf4b1gyb0bkk9r5vq0fnh27x3k047x-systemd-boot-builder.py", line 209, in main
    write_entry(*gen, machine_id)
  File "/nix/store/w2qf4b1gyb0bkk9r5vq0fnh27x3k047x-systemd-boot-builder.py", line 95, in write_entry
    subprocess.check_call([append_initrd_secrets, "/boot%s" % (initrd)])
  File "/nix/store/zqr5sy6dxnas41s0axyhhvlqnhwj0ywk-python3-3.7.5/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/fhc7by398nqhsrckxmwkib0yknpimf98-append-initrd-secrets/bin/append-initrd-secrets', '/boot/efi/nixos/hyka0zhzpcqrgvksq1brdah7fa0rs07s-initrd-linux-4.19.80-initrd.efi']' returned non-zero exit status 1.
warning: error(s) occurred while switching to the new configuration

Trying to remove that line caused:

building Nix...
building the system configuration...
mktemp: failed to create directory via template ‘initrd-secrets.XXXXXXXXXX’: Read-only file system
Traceback (most recent call last):
  File "/nix/store/w2qf4b1gyb0bkk9r5vq0fnh27x3k047x-systemd-boot-builder.py", line 240, in <module>
    main()
  File "/nix/store/w2qf4b1gyb0bkk9r5vq0fnh27x3k047x-systemd-boot-builder.py", line 209, in main
    write_entry(*gen, machine_id)
  File "/nix/store/w2qf4b1gyb0bkk9r5vq0fnh27x3k047x-systemd-boot-builder.py", line 95, in write_entry
    subprocess.check_call([append_initrd_secrets, "/boot%s" % (initrd)])
  File "/nix/store/zqr5sy6dxnas41s0axyhhvlqnhwj0ywk-python3-3.7.5/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/fhc7by398nqhsrckxmwkib0yknpimf98-append-initrd-secrets/bin/append-initrd-secrets', '/boot/efi/nixos/hyka0zhzpcqrgvksq1brdah7fa0rs07s-initrd-linux-4.19.80-initrd.efi']' returned non-zero exit status 1.
warning: error(s) occurred while switching to the new configuration

Unfortunately I rebooted the machine hoping to just use older generation, instead of that I’ve got one liner menu with:
"Reboot Into Firmware Interface"

Could someone elaborate what has happened?
Is there any chance to revive my system or should I revert it from my backups?

If this is the “press del to enter setup”, I"d love it if somebody knew how to add it to grub.

This doesn’t seem like it has anything to do with the ntfs driver thing. It looks like you’re using boot.initrd.secrets, and the part of the switch-to-configuration script which handles that is failing because its working directory is a readonly file system. This errors the script, leaving things in a dirty state.

First of all, I’d file this as a bug. An error case like this should not result in a dirty state.

Secondly, I’d wager you can still recover by booting a live disk, mounting your file systems appropriately at /mnt, and simply running nixos-install. This will leave the system intact as it was while redoing the boot loader configuration.

I had a similiar problem: https://github.com/NixOS/nixpkgs/issues/73404

Please try to reinstall the bootloader: https://nixos.wiki/wiki/Bootloader

Thank you, with more advanced NixOS friend’s help we did nixos-install from live image. Worked!

@h0m1 - sounds like similar issue, however in my case I was in mounted external drive directory: /mnt/hdd

Regards,