Grub blank no list of generations only timer

hi all
im brand new to nixos and installed 23.05
after install and reboot grub shows Nixos and formware menu, boots into nix no problems
i add my custom entries into the configuration.nix and run the rebuild switch. no erros, all good.
i added the nvidia services and no errors and can log into either x11 or wayland.
the problem i have is that i have a blank grub menu and no display of any generations and just presented with a visable timer counting down from 5 sec’s.
I can see all the entries in loader (5 generation.conf) , grub.cfg and the efi folders (boot,linux,systemd and nixos)

i did all sorts of things to no sucesss:

  • sudo nix-store --verify --check-contents --repair
  • sudo nixos-rebuild boot
  • sudo nix-channel --update
  • sudo nixos-rebuild switch --upgrade
  • sudo nix-store --verify --check-contents --repair
  • which grub-install > /nix/var/nix/profiles/default/bin/grub-install
  • sudo nix-env -i grub
  • sudo grub-mkconfig -o /boot/grub/grub.cfg
  • sudo mkdir -p /boot/grub
  • sudo grub-mkconfig -o /boot/grub/grub.cfg
  • [ -d /sys/firmware/efi/efivars ] && echo “UEFI” || echo “Legacy” > uefi
  • sudo nixos-rebuild --install-bootloader switch

I’m out of ideas currently for why I’m not getting generations to display in grub screen?

# Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
fileSystems."/" =
    { device = "/dev/disk/by-uuid/e0e0daba-b88e-4171-8ea1-19ea9711303b";
      fsType = "ext4";
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/B538-2C4B";
      fsType = "vfat";
    };

  swapDevices =
    [ { device = "/dev/disk/by-uuid/a7fe4b95-dea0-42b6-b4f3-fc970e896e8c"; }
    ];
sudo blkid
/dev/sda2: UUID="e0e0daba-b88e-4171-8ea1-19ea9711303b" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="root" PARTUUID="57334452-af19-9241-9693-751469be603b"
/dev/sda3: LABEL="swap" UUID="a7fe4b95-dea0-42b6-b4f3-fc970e896e8c" TYPE="swap" PARTUUID="73136ef7-dd89-214b-a873-6a2c32187abc"
/dev/sda1: UUID="B538-2C4B" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="ae6fb7f0-2ff7-8243-ab41-c97f282c5be2"
lsblk -o NAME,PARTUUID
NAME   PARTUUID
sda    
├─sda1 ae6fb7f0-2ff7-8243-ab41-c97f282c5be2
├─sda2 57334452-af19-9241-9693-751469be603b
└─sda3 73136ef7-dd89-214b-a873-6a2c32187abc
sr0

I don’t know what exactly is wrong here, but I notice confusion.

There are two different bootloaded that NixOS can use. One is called “Grub”, another “systemd-boot”. Your post talks about grub, but it seems that you are actually using systemd-boot:

boot.loader.systemd-boot.enable = true;

Thanks for the feedback. I have no idea why the grub screen dosnt show any generation lists. I have 5 in the enteries folder.

Just a blank screen and timer ticking backwards. On fresh install and 1st reboot it was presented with 2 options in the grub screen (nixos and firmware settings) .

The issue is with blank grub screen with no visible generation entries only happened straight after i ran the rebuild switch fir the first time and I rebooted afterwards

Grub does not display many generations, just the latest, the previous are in an extra submenu.

Systemd boot gives you a flat list.

Interestingly, neither systemd nor grub display anything on the post-boot screen. meaning a black screen with a timer counting backwards from 5 seconds and booting blindly to whatever my latest conf file is? None of my generations are visible. Is this a S3 server issue or a 23.05 bug? only got this after my first rebuild switch on a fresh install?

So far I am really not understanding what you are currently using. Can you provide a screenshot or photo, or video even of what you see during boot?

I reinstalled Nexus after changing the bios from UEFI to BIOS. Everything is now operational. I believe I’ve figured it out. I didn’t configure the proper partitions, labels, and flags to include efi, and the os prober always failed to scan and display the generations on the grub screen when I booted the computer. All of my bash scripts are being converted to work on Nixos. The shebang in normal bash scripts does not run unless I include

#!/run/current-system/sw/bin/bash

at the start. extremely aggravating

Depends on the shebang. #!/usr/bin/env bash should work, but #!/bin/env bash or #!/usr/bin/bash will not.