Bug#1038974: grub2: Update Linux erases Windows entry in boot list

bud budheal508 at gmail.com
Fri Jun 23 21:31:55 BST 2023


Package: grub2
Severity: important
File: grub2
X-Debbugs-Cc: budheal508 at gmail.com

Dear Maintainer,

   * What led up to the situation?
I installed the 2023-04-24 weekly build, downloaded the 2023-06-05 build and used that as the jigdo base to download bookworm 12.0.0
Then I added the 21 DVD images and synaptic suggested adding the online main repository. After apt-get update --allow-insecure-repositories, I rebooted.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
The computer booted into bookworm. However, the existing option to boot Windows is no longer available. Looking in the Advanced options finds the prior Linux entry. 

Compare Bugs #1033985, #1008294 and #250626

   * What was the outcome of this action?
Without a Windows option, there is a suggestion in bug #1033985 that os-prober will help set me reset the grub list. Otherwise, the Windows DVD will contrarily erase grub. I only added a Linux partition to this laptop to investigate a HDMI bug, as this one has HDMI, VGA and DisplayPort connectors.
   * What outcome did you expect instead?
Just because the Linux kernel has been updated, any existing entries should not be erased - except for the one being replaced. 

An update should not erase the settings the user or administrator has added to customize the system. This looks like a bug.

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/sda5 / ext4 rw,relatime,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_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  e1d60c55-5261-4de0-9689-725d6a1ecc08
else
  search --no-floppy --fs-uuid --set=root e1d60c55-5261-4de0-9689-725d6a1ecc08
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=en_US
  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 ###
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  e1d60c55-5261-4de0-9689-725d6a1ecc08
else
  search --no-floppy --fs-uuid --set=root e1d60c55-5261-4de0-9689-725d6a1ecc08
fi
insmod png
if background_image /usr/share/desktop-base/emerald-theme/grub/grub-4x3.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### 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-e1d60c55-5261-4de0-9689-725d6a1ecc08' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  e1d60c55-5261-4de0-9689-725d6a1ecc08
	else
	  search --no-floppy --fs-uuid --set=root e1d60c55-5261-4de0-9689-725d6a1ecc08
	fi
	echo	'Loading Linux 6.1.0-9-amd64 ...'
	linux	/boot/vmlinuz-6.1.0-9-amd64 root=UUID=e1d60c55-5261-4de0-9689-725d6a1ecc08 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-6.1.0-9-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-e1d60c55-5261-4de0-9689-725d6a1ecc08' {
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-9-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-9-amd64-advanced-e1d60c55-5261-4de0-9689-725d6a1ecc08' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  e1d60c55-5261-4de0-9689-725d6a1ecc08
		else
		  search --no-floppy --fs-uuid --set=root e1d60c55-5261-4de0-9689-725d6a1ecc08
		fi
		echo	'Loading Linux 6.1.0-9-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-9-amd64 root=UUID=e1d60c55-5261-4de0-9689-725d6a1ecc08 ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-9-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-9-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-9-amd64-recovery-e1d60c55-5261-4de0-9689-725d6a1ecc08' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  e1d60c55-5261-4de0-9689-725d6a1ecc08
		else
		  search --no-floppy --fs-uuid --set=root e1d60c55-5261-4de0-9689-725d6a1ecc08
		fi
		echo	'Loading Linux 6.1.0-9-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-9-amd64 root=UUID=e1d60c55-5261-4de0-9689-725d6a1ecc08 ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-9-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-7-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-7-amd64-advanced-e1d60c55-5261-4de0-9689-725d6a1ecc08' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  e1d60c55-5261-4de0-9689-725d6a1ecc08
		else
		  search --no-floppy --fs-uuid --set=root e1d60c55-5261-4de0-9689-725d6a1ecc08
		fi
		echo	'Loading Linux 6.1.0-7-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-7-amd64 root=UUID=e1d60c55-5261-4de0-9689-725d6a1ecc08 ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-7-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-7-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-7-amd64-recovery-e1d60c55-5261-4de0-9689-725d6a1ecc08' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  e1d60c55-5261-4de0-9689-725d6a1ecc08
		else
		  search --no-floppy --fs-uuid --set=root e1d60c55-5261-4de0-9689-725d6a1ecc08
		fi
		echo	'Loading Linux 6.1.0-7-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-7-amd64 root=UUID=e1d60c55-5261-4de0-9689-725d6a1ecc08 ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-7-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 ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### 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  9 Jun 22 16:41 ata-ST2000LM015-2E8174_WDZ2Z8DQ -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 22 16:41 ata-ST2000LM015-2E8174_WDZ2Z8DQ-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 22 16:41 ata-ST2000LM015-2E8174_WDZ2Z8DQ-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 22 16:41 ata-ST2000LM015-2E8174_WDZ2Z8DQ-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 22 16:41 ata-ST2000LM015-2E8174_WDZ2Z8DQ-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Jun 22 16:41 ata-ST2000LM015-2E8174_WDZ2Z8DQ-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Jun 22 16:41 ata-ST2000LM015-2E8174_WDZ2Z8DQ-part6 -> ../../sda6
lrwxrwxrwx 1 root root  9 Jun 22 16:43 ata-TSSTcorp_DVD+_-RW_TS-U633J_R7216GABC20384 -> ../../sr0
lrwxrwxrwx 1 root root  9 Jun 22 16:41 wwn-0x5000c500a89c878c -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 22 16:41 wwn-0x5000c500a89c878c-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 22 16:41 wwn-0x5000c500a89c878c-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 22 16:41 wwn-0x5000c500a89c878c-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 22 16:41 wwn-0x5000c500a89c878c-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Jun 22 16:41 wwn-0x5000c500a89c878c-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Jun 22 16:41 wwn-0x5000c500a89c878c-part6 -> ../../sda6
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Jun 22 16:41 0E38877838875D99 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 22 16:41 105682AB56829160 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 22 16:41 1cb2edff-0972-47b4-9ce0-86ce2db22ae8 -> ../../sda6
lrwxrwxrwx 1 root root 10 Jun 22 16:41 5202854002852A55 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 22 16:41 e1d60c55-5261-4de0-9689-725d6a1ecc08 -> ../../sda5
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: 12.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-9-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.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



More information about the Pkg-grub-devel mailing list