Can't boot into NixOS after installation on Dell XPS 13 9365

I installed NixOS on a Dell XPS 13 9365 using the recommended graphical GNOME installer.
After the installation finished successfully, I selected the “Linux Boot Manager” with the highest boot priority, but it won’t boot into NixOS.

The Dell diagnostic tool (SupportAssist) runs automatically and reports “Hard Drive - Not installed”.

BIOS settings:

  • disable secure boot
  • SATA operation: AHCI
  • boot mode: UEFI
  • “Linux Boot Manager” with the highest boot priority

What I have tried so far:

Nothing worked.

I don’t know what to try next, as I don’t get any error messages other than “Hard Drive - Not installed”.

Is there a way to debug this more effectively?

I just learned about nix and have very limited experience.

Information about the hardware: The Dell XPS 13 9365 is a 2-in-1 Laptop from 2018 with an Intel i7-8500Y CPU and 8 GB of RAM.

hardware-configuration.nix (Comments removed):

{ config, lib, pkgs, modulesPath, ... }:

{
  imports =
    [ (modulesPath + "/installer/scan/not-detected.nix")
    ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/7b63638b-456b-481c-8ab9-b5ae5dae4e5e";
      fsType = "ext4";
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/EA38-28A6";
      fsType = "vfat";
    };

  swapDevices =
    [ { device = "/dev/disk/by-uuid/b17424c5-a9b2-4140-88f0-67159de56e5f"; }
    ];

  networking.useDHCP = lib.mkDefault true;

  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

configuration.nix (most comments removed):

{ config, lib, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      # <nixos-hardware/dell/xps/13-9360/default.nix>
      ./hardware-configuration.nix
    ];

  # Use the systemd-boot EFI boot loader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  # Set your time zone.
  time.timeZone = "Europe/Berlin";

  # Enable the X11 windowing system.
  services.xserver.enable = true;

  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;
  
  # Configure keymap in X11
  services.xserver.xkb.layout = "de";
  # services.xserver.xkb.options = "eurosign:e,caps:escape";

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.mbaer = {
    isNormalUser = true;
    extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
    packages = with pkgs; [
      vim
    ];
  };

  system.stateVersion = "23.11"; # Did you read the comment?
}

I’d try boot.loader.efi.canTouchEfiVariables = false;

Dumb suggestion, sounds like you would have almost certainly tried it already, but have you pressed F12 at boot time to see if there’s a boot entry to select that gets you in?

Thanks for the suggestion.

I changed the setting, executed nixos-install and rebooted, but I get the same behavior.

There is a single boot entry named “Linux Boot Manager”. I tried it again just to make sure, but it does not boot into NixOS.

I get a short beep and it then jumps to the Dell SupportAssist.

According to https://www.reddit.com/r/Dell/comments/6i1sc3/comment/dljxt5p/ your model has a lot of quirks.
You could try adding the boot menu item manually: it should point to /EFI/BOOT/BOOTX64.EFI or /EFI/systemd/systemd-bootx64.efi
Not sure what to do with the secure boot thing though

1 Like

Thank you very much for the fast reply and for pointing me in the right direction!

Enabling secure boot did not work for me, because I then couldn’t boot into the USB drive. However, when I disabled legacy boot in the BIOS (General > Advanced Boot Options > Enable Legacy Option ROMs > disabled), then it all worked. I don’t know why that was necessary because I selected UEFI as the boot mode, but this fixed it.

I didn’t have to add a boot entry manually.

2 Likes