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

foggy67 foggy67 at paroisses-dettwilleretcollines.fr
Thu Jul 17 19:56:36 BST 2025


Package: grub-efi-amd64-bin
Version: 2.06-13+deb12u1
Severity: important
File: installer
Tags: d-i

Dear Maintainer,

When I install Debian 12 from an netinst ISO file on an USB sticker, the Debian installer doesn't ask to install the GRUB on the EFI/ESP partition previously made by d-i on the sticker. 
Thus, when the installation process is over, the computer cannot boot on the USB sticker. 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

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.

Thank you in advance
Foggy67


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/sda2 / ext4 rw,relatime,errors=remount-ro 0 0
/dev/sda1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  f8f601ed-43cf-46b5-88a4-a6f8166886e0
else
  search --no-floppy --fs-uuid --set=root f8f601ed-43cf-46b5-88a4-a6f8166886e0
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=fr_FR
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f8f601ed-43cf-46b5-88a4-a6f8166886e0' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  f8f601ed-43cf-46b5-88a4-a6f8166886e0
	else
	  search --no-floppy --fs-uuid --set=root f8f601ed-43cf-46b5-88a4-a6f8166886e0
	fi
	echo	'Loading Linux 6.1.0-37-amd64 ...'
	linux	/boot/vmlinuz-6.1.0-37-amd64 root=UUID=f8f601ed-43cf-46b5-88a4-a6f8166886e0 ro  quiet consoleblank=180
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-6.1.0-37-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-f8f601ed-43cf-46b5-88a4-a6f8166886e0' {
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-37-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-37-amd64-advanced-f8f601ed-43cf-46b5-88a4-a6f8166886e0' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  f8f601ed-43cf-46b5-88a4-a6f8166886e0
		else
		  search --no-floppy --fs-uuid --set=root f8f601ed-43cf-46b5-88a4-a6f8166886e0
		fi
		echo	'Loading Linux 6.1.0-37-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-37-amd64 root=UUID=f8f601ed-43cf-46b5-88a4-a6f8166886e0 ro  quiet consoleblank=180
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-37-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-37-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-37-amd64-recovery-f8f601ed-43cf-46b5-88a4-a6f8166886e0' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  f8f601ed-43cf-46b5-88a4-a6f8166886e0
		else
		  search --no-floppy --fs-uuid --set=root f8f601ed-43cf-46b5-88a4-a6f8166886e0
		fi
		echo	'Loading Linux 6.1.0-37-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-37-amd64 root=UUID=f8f601ed-43cf-46b5-88a4-a6f8166886e0 ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-37-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-32-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-32-amd64-advanced-f8f601ed-43cf-46b5-88a4-a6f8166886e0' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  f8f601ed-43cf-46b5-88a4-a6f8166886e0
		else
		  search --no-floppy --fs-uuid --set=root f8f601ed-43cf-46b5-88a4-a6f8166886e0
		fi
		echo	'Loading Linux 6.1.0-32-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-32-amd64 root=UUID=f8f601ed-43cf-46b5-88a4-a6f8166886e0 ro  quiet consoleblank=180
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-32-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-32-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-32-amd64-recovery-f8f601ed-43cf-46b5-88a4-a6f8166886e0' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  f8f601ed-43cf-46b5-88a4-a6f8166886e0
		else
		  search --no-floppy --fs-uuid --set=root f8f601ed-43cf-46b5-88a4-a6f8166886e0
		fi
		echo	'Loading Linux 6.1.0-32-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-32-amd64 root=UUID=f8f601ed-43cf-46b5-88a4-a6f8166886e0 ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-32-amd64
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg

*********************** BEGIN /proc/mdstat
cat: /proc/mdstat: No such file or directory
*********************** END /proc/mdstat

*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 13 Jul 17 19:55 mmc-AJTD4R_0xf5794e90 -> ../../mmcblk0
lrwxrwxrwx 1 root root 15 Jul 17 19:55 mmc-AJTD4R_0xf5794e90-part1 -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 15 Jul 17 19:55 mmc-AJTD4R_0xf5794e90-part2 -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 15 Jul 17 19:55 mmc-AJTD4R_0xf5794e90-part3 -> ../../mmcblk0p3
lrwxrwxrwx 1 root root  9 Jul 17 19:55 usb-Kingston_DataTraveler_3.0_E0D55E6CE772F4C1591823E6-0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 17 19:55 usb-Kingston_DataTraveler_3.0_E0D55E6CE772F4C1591823E6-0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 17 19:55 usb-Kingston_DataTraveler_3.0_E0D55E6CE772F4C1591823E6-0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jul 17 19:55 usb-Kingston_DataTraveler_3.0_E0D55E6CE772F4C1591823E6-0:0-part3 -> ../../sda3
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Jul 17 19:55 66451f73-7e36-4007-ba9f-67351f6f7778 -> ../../sda3
lrwxrwxrwx 1 root root 15 Jul 17 19:55 8694-76C0 -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 15 Jul 17 19:55 9C24-03B0 -> ../../mmcblk0p3
lrwxrwxrwx 1 root root 10 Jul 17 19:55 C54B-3FF4 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 17 19:55 f8f601ed-43cf-46b5-88a4-a6f8166886e0 -> ../../sda2
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: 12.11
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-37-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages grub-efi-amd64-bin depends on:
ii  grub-common  2.06-13+deb12u1

Versions of packages grub-efi-amd64-bin recommends:
ii  efibootmgr             17-2
ii  grub-efi-amd64-signed  1+2.06+13+deb12u1

grub-efi-amd64-bin suggests no packages.

-- no debconf information



More information about the Pkg-grub-devel mailing list