Hey all,
I have a habit of updating my nixos before any reboots. So i did the rebuild switch
step and rebooted. Booted into windows and apparently there was a pending update on Windows which when finished, rebooted my PC. Once i got into my linux bootloader, i got no entry for Windows.
Started checking around:
[ -d /sys/firmware/efi/efivars ] && echo "UEFI" || echo "fail"
UEFI
sudo nixos-rebuild --install-bootloader switch
[sudo] password for mav:
building Nix...
building the system configuration...
Copied "/nix/store/jimz0md5q3l7w1nrgd2j3bi1w9l6da7l-systemd-250.4/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/efi/EFI/systemd/systemd-bootx64.efi".
Copied "/nix/store/jimz0md5q3l7w1nrgd2j3bi1w9l6da7l-systemd-250.4/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/efi/EFI/BOOT/BOOTX64.EFI".
Random seed file /boot/efi/loader/random-seed successfully written (512 bytes).
Created EFI boot entry "Linux Boot Manager".
activating the configuration...
setting up /etc...
reloading user units for mav...
setting up tmpfiles
Still no windows in there.
df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.2G 0 3.2G 0% /dev
tmpfs 32G 15M 32G 1% /dev/shm
tmpfs 16G 8.6M 16G 1% /run
tmpfs 32G 432K 32G 1% /run/wrappers
/dev/nvme1n1p1 916G 436G 434G 51% /
/dev/nvme0n1p1 96M 47M 50M 49% /boot/efi
/dev/nvme0n1p3 931G 732G 200G 79% /run/media/mav/windows
/dev/sda 916G 512G 359G 59% /run/media/mav/sd1
tmpfs 6.3G 32K 6.3G 1% /run/user/1000
Apparently, my windows partition is mounted on nvme1n1p3 so no problem there.
Double checked my configs and all seem to be in order:
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.supportedFilesystems = [ "ntfs" ];
fileSystems."/run/media/mav/windows" = {
device = "/dev/nvme0n1p3";
label = "Windows";
fsType = "ntfs";
options = [ "rw" "uid=1000" ];
};
fileSystems."/run/media/mav/sd1" = {
device = "/dev/sda";
fsType = "auto";
label = "SD1";
options = [ "defaults" "user" "rw" "auto" ];
};
Not much in my hardware-configuration.nix either:
ā cat -p /etc/nixos/hardware-configuration.nix
# Do not modify this file! It was generated by ānixos-generate-configā
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/32a9a971-79f6-4f11-9d1e-fdaf9b51cb02";
fsType = "ext4";
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/4E76-5B21";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}
I am unable to figure out why the EFI bootloader wonāt show the Windows option in the menu.
What can i do to restore back Windows back into the bootloader?