NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.61k stars 13.77k forks source link

cannot find a GRUB drive for /dev/sda1. Check your device.map. #227296

Open Brobeast opened 1 year ago

Brobeast commented 1 year ago

hello guys, I can't change my boot loader from systemd to grub in nixos and have the following errors

/nix/store/b9lyl6cn5r3gwkhkzgbrsiaff1haq1k8-grub-2.06/sbin/grub-install: error: cannot find a GRUB drive for /dev/sda1. Check your device.map. /nix/store/q3xj7v453vy78vrs4sz3w6lhy753pl3z-install-grub.pl: installation of GRUB EFI into /boot failed: No such file or directory warning: error(s) occurred while switching to the new configuration

Additional context

Add any other context about the problem here.

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here
RaitoBezarius commented 1 year ago

Please provide more information about your systems:

shapr commented 6 months ago

I'm having this exact same error on a NixOS VPS from gandi.net, I've added my info:

nix-shell -p nix-info --run "nix-info -m"
these 4 paths will be fetched (0.71 MiB download, 9.84 MiB unpacked):
  /nix/store/2q1x5hazpr8yf5hh0pj09nmz94sc7q81-file-5.44
  /nix/store/ik9ibmq0rbznwyj6472lv2ab0c397lhy-gnumake-4.4.1
  /nix/store/5rbqiz11vagap5fsk3vw8fgznw6vxyrh-patchelf-0.15.0
  /nix/store/vfdg65hiv4bwls48588msw8la7452w2q-stdenv-linux
copying path '/nix/store/5rbqiz11vagap5fsk3vw8fgznw6vxyrh-patchelf-0.15.0' from 'https://cache.nixos.org'...
copying path '/nix/store/ik9ibmq0rbznwyj6472lv2ab0c397lhy-gnumake-4.4.1' from 'https://cache.nixos.org'...
copying path '/nix/store/2q1x5hazpr8yf5hh0pj09nmz94sc7q81-file-5.44' from 'https://cache.nixos.org'...
copying path '/nix/store/vfdg65hiv4bwls48588msw8la7452w2q-stdenv-linux' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.80, NixOS, 23.11 (Tapir), 23.11.5060.617579a78725`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
RaitoBezarius commented 6 months ago

Please provide more information about your systems:

  • filesystem layouts
  • NixOS configuration for GRUB
  • UEFI/legacy?
  • and your NixOS metadata please.

I will repeat the same question.

tim-tx commented 6 days ago

I ran into this when accidentally trying to deploy to host A a configuration for host B. The GRUB device/partition in the error indeed did not exist on host A.