Bug#1109438: installer: d-i: When installing Debian 12 on an USB sticker, grub isn't installed on the EFI/ESP partition

Pascal Hambourg pascal at plouf.fr.eu.org
Thu Jul 17 21:51:24 BST 2025


On 17/07/2025 at 20:56, foggy67 wrote:
> Package: grub-efi-amd64-bin
> 
> When I install Debian 12 from an netinst ISO file on an USB sticker,

What is a "USB sticker" ? A USB stick (flash drive) ?
What is the use case ? Boot it on other computers ?

> the Debian installer doesn't ask to install the GRUB on the EFI/ESP partition previously made by d-i on the sticker.

GRUB is automatically installed in the ESP mounted on /boot/efi, so 
there is no point in asking where to install it. If GRUB installation 
fails, an error message should pop up. Do you have installation logs (in 
/var/log/installer/syslog) ?

The only ambiguity is that if multiple partitions are marked "use as 
ESP" during disk partitioning, then the installer will choose either one 
without asking and mount it on /boot/efi. If you want the installer to 
use a specific ESP, then it is up to you to mark all the others "do not 
use".

> Thus, when the installation process is over, the computer cannot boot on the USB sticker.

This can have other causes that GRUB not being installed in the ESP, 
e.g. faulty UEFI firmware. Besides, grub-efi-amd64-bin has nothing to do 
with this: it only provides GRUB boot loader binaries, it does not 
install them in the ESP. grub-installer is the installer component in 
charge of installing the GRUB boot loader.

> A special sequence must be made afterwards by hand on the USB sticker, involving chroot:
> 
> grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --bootloader-id=debian
> update-grub

--bootloader-id is irrelevant with --removable.

If you want to install GRUB in the ESP removable media path, you must do 
an expert install and answer yes when prompted. If a Debian system is 
already installed on this machine, you should also answer "no" to 
"update NVRAM" in order to not break this system boot.

> After that, the computer is able to boot the newly installed Debian 12 on the USB sticker.
> Is is possible to add that process in the d-i just after the disk partitioning? It would consist in a question asking where to install GRUB.

As explained above, that would be pointless.



More information about the Pkg-grub-devel mailing list