Where to install Grub for Debian upgrade

debiangrub2linux

I am upgrading a Debian system, and it is asking me where to install grub. I have Debian installed on /dev/sda1. Does the grub bootloader need to be installed on /dev/sda or /dev/sda1?

Best Answer

On systems booting in native UEFI mode, you can usually select the whole-disk device (e.g. /dev/sda) too: if the disk contains just one EFI System Partition (= the usual configuration), the GRUB installer will do the right thing automatically. You'll need to specify the partition number only if there are multiple ESP partitions on the same disk.

So when the Debian installer asks that question, picking the whole-disk device is usually the correct choice, no matter which boot style (BIOS or UEFI) you're using.

Installing GRUB to a specific partition (e.g. /dev/sda1) has some caveats and is only needed in some special circumstances, so you should not do that unless you positively know that it's needed for your case.

Related Question