How to fix update-grub: error: cannot find a GRUB drive for /dev/sdX in APT

APTADVANCEDHIGHUpdated Dec 29, 2025ยท 256 views

This error occurs when GRUB cannot properly map or detect a drive during installation or update. Common causes include incorrect device mapping, dual-boot configurations, or filesystem support issues. Regenerating the device map and ensuring proper mounting usually resolves the problem.

Quick fix

Fixes update-grub: error: cannot find a GRUB drive for /dev/sdX

sudo grub-mkdevicemap
sudo update-grub
  1. Regenerate the GRUB device map
  2. Verify you are running from the correct boot environment
  3. For UEFI/EFI systems, verify boot partition configuration
  4. Ensure the drive is marked as bootable
apt โ€” error
sudo grub-mkdevicemap
sudo update-grub
update-grub: error: cannot find a GRUB drive for /dev/sdX

What this error means

The "cannot find a GRUB drive" error means that GRUB (the bootloader) cannot locate or properly identify the disk drive specified. This typically happens when update-grub or grub-install runs and GRUB probe fails to detect the drive in the device.map file or cannot access the drive at all. The error indicates a mismatch between the actual hardware configuration and what GRUB expects, often due to missing device mapping files, incorrect partition configurations, or issues with how the drive is being accessed during the installation process.

Typical symptoms

  • update-grub command fails with error about GRUB drive
  • grub-install fails when trying to install to a specific drive
  • Dual-boot systems fail to update GRUB configuration
  • Secondary drives in multi-disk setups are not recognized by GRUB
  • USB or external drive installations fail to complete

Common causes

  1. Missing or outdated device.map file that maps drives incorrectly
  2. Dual-boot or multi-drive configurations where secondary drives are not properly detected
  3. Unsupported filesystem types that GRUB cannot extract UUID information from
  4. Improper mounting of filesystems when running update-grub from a live environment or chroot
  5. UEFI/GPT partition table issues without required BIOS boot partitions
  6. Drive or partition not marked as bootable in the partition table

How to fix "update-grub: error: cannot find a GRUB drive for /dev/sdX"

1Regenerate the GRUB device map

The device.map file may be missing or outdated. Regenerate it by running:

bash
sudo grub-mkdevicemap
sudo update-grub

This recreates the device.map file based on current hardware and should resolve the mapping issue in most cases.

2Verify you are running from the correct boot environment

If you are updating GRUB from a live USB or recovery environment, ensure you have properly mounted the root filesystem and any required partitions:

bash
mount /dev/sdXY /mnt
mount /dev/sdXZ /mnt/boot
sudo chroot /mnt

Before chrooting, also bind critical filesystems:

bash
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /run /mnt/run
mount --bind /sys /mnt/sys

Then run update-grub from within the chroot environment.

3For UEFI/EFI systems, verify boot partition configuration

If your system uses UEFI firmware, ensure the EFI System Partition (ESP) is properly mounted:

bash
mount /dev/nvme0n1p3 /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi
arch-chroot /mnt
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub

Replace the device names with your actual partitions. Ensure the EFI partition has at least 100 MB of space.

4Ensure the drive is marked as bootable

Check if the partition is marked as bootable in the partition table:

bash
sudo fdisk -l /dev/sdX

Look for a "*" in the Boot column. If the boot flag is missing, set it with:

bash
sudo fdisk /dev/sdX

Then type "a" to toggle the boot flag on the correct partition, then "w" to write changes.

5Check filesystem compatibility and UUID extraction

If GRUB cannot extract UUID information from your filesystem, it falls back to device names like /dev/sdXX. Verify your filesystem is supported:

bash
df -T

Common supported filesystems include ext4, btrfs, and xfs. If using an unsupported filesystem, you may need to manually edit /boot/grub/grub.cfg and replace device names with UUID values:

bash
blkid /dev/sdXY

Use the UUID output to update your GRUB configuration if needed.

6As a last resort, work around grub-probe failures

If grub-probe continues to fail even after proper mounting, you can replace the grub-probe binary with a shell script that outputs a known filesystem type:

bash
sudo mv /usr/sbin/grub-probe /usr/sbin/grub-probe.orig
sudo tee /usr/sbin/grub-probe > /dev/null << EOF
#!/bin/bash
echo ext4
EOF
sudo chmod +x /usr/sbin/grub-probe

Run update-grub, then restore the original binary:

bash
sudo mv /usr/sbin/grub-probe.orig /usr/sbin/grub-probe

Use this only if all other solutions fail, as it bypasses GRUB filesystem detection.

Advanced notes

For dual-boot systems, ensure the primary boot drive (the one with the GRUB loader) is set as the first boot drive in firmware settings. On systems with multiple drives, GRUB may fail to detect secondary drives if they are not properly initialized or if the partition table is corrupted. Use parted or gdisk for GPT partitions to verify partition integrity. In some cases, especially with LVM or encrypted partitions, you may need to load additional modules or configure GRUB explicitly in /etc/default/grub before running update-grub.

Frequently asked questions

What does "update-grub: error: cannot find a GRUB drive for /dev/sdX" mean?
The "cannot find a GRUB drive" error means that GRUB (the bootloader) cannot locate or properly identify the disk drive specified. map file or cannot access the drive at all. The error indicates a mismatch between the actual hardware configuration and what GRUB expects, often due to missing device mapping files, incorrect partition configurations, or issues with how the drive is being accessed during the installation process.
How do I fix "update-grub: error: cannot find a GRUB drive for /dev/sdX"?
This error occurs when GRUB cannot properly map or detect a drive during installation or update. Common causes include incorrect device mapping, dual-boot configurations, or filesystem support issues. Regenerating the device map and ensuring proper mounting usually resolves the problem.
What causes "update-grub: error: cannot find a GRUB drive for /dev/sdX"?
Missing or outdated device.map file that maps drives incorrectly Dual-boot or multi-drive configurations where secondary drives are not properly detected Unsupported filesystem types that GRUB cannot extract UUID information from
Is the "update-grub: error: cannot find a GRUB drive for /dev/sdX" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading