How to Change Boot Entry Content

background information ( It doesn’t matter )

current i have trying to reinstall ubuntu in my dual system computer (ubuntu, nixos), after installed, the nixos bootloader has disappear, only ubuntu’s existed. The boot just like this, after serise of operation base on guildline and wiki, it magically reinstall bootloader successed.

Information about current situation

But after the leading authority of bootloader have been change from Ubuntu into NixOS, the item inside the file under the /boot/efi/EFI/ubuntu{BOOTX64, grubx64.efi, mmx64.efi, shimx64.efi} has been change into binary, ** isn’t means that this file has been control by NixOS? What should I do to change this file, for example GRUB_TIMEOUT_STYLE and GRUB_TIMEOUT ** ?

I have checked all options under boot.loader.systemd-boot, but it seems to haven’t any help.

Configuration file right now

  boot.loader = {
    systemd-boot = {
      enable = true;
      extraEntries = {
        "UkyinUbuntu.conf" = ''
          title UkyinUbuntu
          efi /efi/ubuntu/shimx64.efi
        '';
      };
    };
    efi.canTouchEfiVariables = true;
    efi.efiSysMountPoint = "/boot/efi";
  };

NixOS uses systemd-boot by default when installed under UEFI.

Have a look at configuration options: Arch Wiki , Gentoo Wiki.

If you want to change the timeout, it is in esp/loader/loader.conf. The default boot option is also configured there, and nixos-rebuild switch will set it to the latest generation. You can override that by selecting your desired boot choice and typing d . See Systemd-boot man pages , key bindings.

1 Like