Bootloader won't install

Good day,

Before I begin, let me say thank you. As I am sure compared to you guys and girls I am a 1 month old baby in the linux world. I wanted a challenge. And boy did I get one. Spent almost 2 days on this, with chatGPT mind you. I have posted on the LTT forum. I followed guides. And still it won’t boot. And at this point I think I might just cry.
Minus the program names, I can read the code and understand what it says. I have other distros, the one I am most familiar with is popOS. which is the system I am coming form seeing Chris Titus’s video. And thinking this would be my perfect OS. And a perfect place to learn more.

Things I have done.

  1. Used the default boot loader settings (systemd-boot).
  2. Added grub ( not sure if the settings I used are why it didn’t work with grub)
  3. Changed computers. (but didn’t change the ventoy usb)
  4. Specified the drive from, “/boot/efi” to “/mnt/boot” to even “/dev/sda1”
  5. Gotten the drive to show up on legacy mode in the BIOS. But only ventoy is showing up on UEFI.
  6. Added both systemd and grub (spat out errors it only wanted one)
  7. tried nixos-rebuild switch --install-bootloader
  8. Add an M.2 SSD and tried installing on that

But I still get this error:
Warning: do not know how to make this configuration bootable; please enable a boot loader

The basic code I used

Use the systemd-boot EFI boot loader.

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

An example of what I tried with grub:
boot.loader.grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = true;
device = “/dev/sda1”;

Any help will be awesome!
Thanks :smiley:

Although you’ve provided a long list of various things you’ve tried, it’s not clear what exact steps lead up to your problem. The first snippet is fine is what nixos-generate-config produces if you boot the installer in UEFI mode and shouldn’t result in that error.

I suggest you try again with one important modification: do not use third party ‘installer bootloaders’ like Ventoy - instead write the NixOS cd image to a USB drive directly. To avoid accidentally booting in legacy mode consider disabling legacy boot / CSM in BIOS.

Boot the installer in UEFI mode and follow the steps listed in the manual. Note you shouldn’t have to touch anything related to the bootloader (it will default to systemd boot).

If you still can’t get it to work consider using the graphical installer instead.

1 Like

So you get this error when running nixos-install? Sounds like you didn’t add a bootloader to your configuration.

Where did you put the bootloader configuration?

Well, got it up. It wasn’t cause of something I did wrong, persay. It was the BIOS’s CSM. Only after I disabled it, did it install the boot loader.

Regarding that problem. Everything else but the boot loader installed. I mean everything else.

On this bios under Both legacy and UEFI there is a CSM option. Only after disabling that did it work with the installer. (install the bootloader too)

1 Like