Package: grub-pc
Version: 2.06-13+deb12u1
Severity: important
X-Debbugs-Cc: rsa...@gmail.com

Dear Maintainer,

I'm writing this report before I try upgrading to the backported grub. I wanted
to write all this down in case I wasn't able to boot afterwards again.

What led up to the situation? I've setup two operating system disks. Windows 10
is on the primary boot disk with its own bootloader(HD0 below).
Debian12+Grub2.06 is on another disk which I select from the BIOS(HD1 below).
Once a baremetal OS is booted, I boot the other disk under VirtualBox.

What exactly did you do (or not do) that was effective (or ineffective)? I
attempted to boot my Grub2.06+Debian/12 disk inside of VirtualBox on Windows
10. However, I looked away and grub timed out and chose Windows10(whose disk is
not visible in the VM)

What was the outcome of this action? Grub reported:
    error: no such device: ${Win10_DISK_ID}
    setting partition type to 0x83
    error:disk `hd0,msdos1’ not found
    error:disk `hd0,msdos1’ not found

After this, I was unable to boot Grub+Debian within VirtualBox or on bare-
metal. I have attached the MBRs of both disks, before and after this point.

What outcome did you expect instead? I expected that grub, upon failing to
locate the target boot drive, would not attempt to update the partition table.

To repair, I booted the machine with Debian-Live, rebuilt the partition table
with testdisk, then reinstalled grub and was able to boot both in VirtualBox
and natively.


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/sdf1 / ext4 rw,relatime,errors=remount-ro 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)   /dev/disk/by-id/ata-Samsung_SSD_840_EVO_500GB_S1DHNSAFA00613T
(hd1)   /dev/disk/by-id/ata-INTEL_SSDSC2BW240A4_PHDA4333001L2403GN
(hd2)   /dev/disk/by-id/ata-HGST_HTS725032A7E630_TF7B5AY9KVTGLM
(hd3)   /dev/disk/by-id/usb-__070B4C5F21223947-0:0
(hd4)   /dev/disk/by-id/ata-ST250DM000-1BD141_9VYLHAR0
(hd5)   /dev/disk/by-id/ata-WDC_WD400JD-22JNA0_WD-WMAMA1246391
(hd6)   /dev/disk/by-id/ata-WDC_WD10EURX-73C57Y0_WD-WCC4J0674753
(hd7)   /dev/disk/by-id/ata-WDC_WD10EARS-00Y5B1_WD-WCAV55474379
(hd8)   /dev/disk/by-id/scsi-SSEAGATE_ST973401LSUN72G381100XT_3LB100XT
(hd9)   /dev/disk/by-id/scsi-SSEAGATE_ST973401LSUN72G3710YV16_3LB0YV16
(hd10)  /dev/disk/by-id/scsi-35000c500077c2783
(hd11)  /dev/disk/by-id/scsi-SSEAGATE_ST973401LSUN72G1010Q8SL_3LB0Q8SL
*********************** END /boot/grub/device.map

*********************** 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='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 
--hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1 --hint='hd1,msdos1'  
6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
else
  search --no-floppy --fs-uuid --set=root 6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
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='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 
--hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1 --hint='hd1,msdos1'  
6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
else
  search --no-floppy --fs-uuid --set=root 6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
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/20_linux_xen ###

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

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (on /dev/sdc1)' --class windows --class os 
$menuentry_id_option 'osprober-chain-7460727360723BC4' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 
--hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1 --hint='hd0,msdos1'  
7460727360723BC4
        else
          search --no-floppy --fs-uuid --set=root 7460727360723BC4
        fi
        parttool ${root} hidden-
        drivemap -s (hd0) ${root}
        chainloader +1
}
### 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_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-6b9f70b0-1ec1-4ad9-a55c-d772980f3e81' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 
--hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1 --hint='hd1,msdos1'  
6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
        else
          search --no-floppy --fs-uuid --set=root 
6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
        fi
        echo    'Loading Linux 6.1.0-33-amd64 ...'
        linux   /boot/vmlinuz-6.1.0-33-amd64 
root=UUID=6b9f70b0-1ec1-4ad9-a55c-d772980f3e81 ro  
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-6.1.0-33-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-6b9f70b0-1ec1-4ad9-a55c-d772980f3e81' {
        menuentry 'Debian GNU/Linux, with Linux 6.1.0-33-amd64' --class debian 
--class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.1.0-33-amd64-advanced-6b9f70b0-1ec1-4ad9-a55c-d772980f3e81' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; 
fi
                insmod part_msdos
                insmod ext2
                set root='hd1,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root 
--hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1 
--hint='hd1,msdos1'  6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
                else
                  search --no-floppy --fs-uuid --set=root 
6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
                fi
                echo    'Loading Linux 6.1.0-33-amd64 ...'
                linux   /boot/vmlinuz-6.1.0-33-amd64 
root=UUID=6b9f70b0-1ec1-4ad9-a55c-d772980f3e81 ro  
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-6.1.0-33-amd64
        }
        menuentry 'Debian GNU/Linux, with Linux 6.1.0-33-amd64 (systemd)' 
--class debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.1.0-33-amd64-init-systemd-6b9f70b0-1ec1-4ad9-a55c-d772980f3e81' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; 
fi
                insmod part_msdos
                insmod ext2
                set root='hd1,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root 
--hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1 
--hint='hd1,msdos1'  6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
                else
                  search --no-floppy --fs-uuid --set=root 
6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
                fi
                echo    'Loading Linux 6.1.0-33-amd64 ...'
                linux   /boot/vmlinuz-6.1.0-33-amd64 
root=UUID=6b9f70b0-1ec1-4ad9-a55c-d772980f3e81 ro   init=/lib/systemd/systemd
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-6.1.0-33-amd64
        }
        menuentry 'Debian GNU/Linux, with Linux 6.1.0-33-amd64 (recovery mode)' 
--class debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.1.0-33-amd64-recovery-6b9f70b0-1ec1-4ad9-a55c-d772980f3e81' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; 
fi
                insmod part_msdos
                insmod ext2
                set root='hd1,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root 
--hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1 
--hint='hd1,msdos1'  6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
                else
                  search --no-floppy --fs-uuid --set=root 
6b9f70b0-1ec1-4ad9-a55c-d772980f3e81
                fi
                echo    'Loading Linux 6.1.0-33-amd64 ...'
                linux   /boot/vmlinuz-6.1.0-33-amd64 
root=UUID=6b9f70b0-1ec1-4ad9-a55c-d772980f3e81 ro single 
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-6.1.0-33-amd64
        }
}

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

### 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
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] 
[raid10] 
md126 : active (auto-read-only) raid5 sda[3] sdb[2] sdd[1] sde[0]
      5567515648 blocks super external:/md127/0 level 5, 64k chunk, algorithm 0 
[4/4] [UUUU]
      
md127 : inactive sdb[3](S) sda[2](S) sdd[1](S) sde[0](S)
      20804 blocks super external:imsm
       
unused devices: <none>
*********************** END /proc/mdstat

*********************** BEGIN LVM
*********************** END LVM

*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Apr 20 14:28 
ata-INTEL_SSDSC2BW240A4_PHDA4333001L2403GN -> ../../sdf
lrwxrwxrwx 1 root root 10 Apr 20 14:28 
ata-INTEL_SSDSC2BW240A4_PHDA4333001L2403GN-part1 -> ../../sdf1
lrwxrwxrwx 1 root root  9 Apr 20 14:28 ata-MB2000GCWDA_Z1X29TCS -> ../../sdb
lrwxrwxrwx 1 root root  9 Apr 20 14:28 ata-MB2000GCWDA_Z1Y1SYXX -> ../../sda
lrwxrwxrwx 1 root root  9 Apr 20 14:28 ata-MB2000GCWDA_Z1Y1WH0S -> ../../sde
lrwxrwxrwx 1 root root  9 Apr 20 14:28 ata-MB2000GCWDA_Z1Y1YRE4 -> ../../sdd
lrwxrwxrwx 1 root root  9 Apr 20 14:28 
ata-ST2000LM003_HN-M201RAD_S34RJ9EG735436 -> ../../sdh
lrwxrwxrwx 1 root root 10 Apr 20 14:28 
ata-ST2000LM003_HN-M201RAD_S34RJ9EG735436-part1 -> ../../sdh1
lrwxrwxrwx 1 root root  9 Apr 20 14:28 
ata-ST2000LM003_HN-M201RAD_S34RJ9FG217135 -> ../../sdg
lrwxrwxrwx 1 root root 10 Apr 20 14:28 
ata-ST2000LM003_HN-M201RAD_S34RJ9FG217135-part1 -> ../../sdg1
lrwxrwxrwx 1 root root  9 Apr 20 14:28 
ata-Samsung_SSD_840_EVO_500GB_S1DHNSAFA00613T -> ../../sdc
lrwxrwxrwx 1 root root 10 Apr 20 14:28 
ata-Samsung_SSD_840_EVO_500GB_S1DHNSAFA00613T-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Apr 20 14:28 
ata-Samsung_SSD_840_EVO_500GB_S1DHNSAFA00613T-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Apr 20 14:28 
ata-Samsung_SSD_840_EVO_500GB_S1DHNSAFA00613T-part3 -> ../../sdc3
lrwxrwxrwx 1 root root  9 Apr 20 14:28 ata-hp_DVD_A_DH16AESH_2L8338900215 -> 
../../sr0
lrwxrwxrwx 1 root root 11 Apr 20 14:28 
md-uuid-8be1a6f2:64a7cb96:1b78e2e5:7225950a -> ../../md126
lrwxrwxrwx 1 root root 13 Apr 20 14:28 
md-uuid-8be1a6f2:64a7cb96:1b78e2e5:7225950a-part1 -> ../../md126p1
lrwxrwxrwx 1 root root 13 Apr 20 14:28 
md-uuid-8be1a6f2:64a7cb96:1b78e2e5:7225950a-part2 -> ../../md126p2
lrwxrwxrwx 1 root root 11 Apr 20 14:28 
md-uuid-9b2f5b80:a9570879:af4444d0:955b724d -> ../../md127
lrwxrwxrwx 1 root root 13 Apr 20 14:28 
nvme-INTEL_SSDPEKNW020T8_PHNH852200342P0C -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Apr 20 14:28 
nvme-INTEL_SSDPEKNW020T8_PHNH852200342P0C-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 13 Apr 20 14:28 
nvme-INTEL_SSDPEKNW020T8_PHNH852200342P0C_1 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Apr 20 14:28 
nvme-INTEL_SSDPEKNW020T8_PHNH852200342P0C_1-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 13 Apr 20 14:28 
nvme-eui.0000000001000000e4d25c46776a5001 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Apr 20 14:28 
nvme-eui.0000000001000000e4d25c46776a5001-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root  9 Apr 20 14:28 wwn-0x50004cf20f3260d8 -> ../../sdg
lrwxrwxrwx 1 root root 10 Apr 20 14:28 wwn-0x50004cf20f3260d8-part1 -> 
../../sdg1
lrwxrwxrwx 1 root root  9 Apr 20 14:28 wwn-0x50004cf210262411 -> ../../sdh
lrwxrwxrwx 1 root root 10 Apr 20 14:28 wwn-0x50004cf210262411-part1 -> 
../../sdh1
lrwxrwxrwx 1 root root  9 Apr 20 14:28 wwn-0x5000c50066ce35ae -> ../../sdb
lrwxrwxrwx 1 root root  9 Apr 20 14:28 wwn-0x5000c500673a8e4f -> ../../sda
lrwxrwxrwx 1 root root  9 Apr 20 14:28 wwn-0x5000c50067654094 -> ../../sde
lrwxrwxrwx 1 root root  9 Apr 20 14:28 wwn-0x5000c50078c23f25 -> ../../sdd
lrwxrwxrwx 1 root root  9 Apr 20 14:28 wwn-0x50025388a0716cc3 -> ../../sdc
lrwxrwxrwx 1 root root 10 Apr 20 14:28 wwn-0x50025388a0716cc3-part1 -> 
../../sdc1
lrwxrwxrwx 1 root root 10 Apr 20 14:28 wwn-0x50025388a0716cc3-part2 -> 
../../sdc2
lrwxrwxrwx 1 root root 10 Apr 20 14:28 wwn-0x50025388a0716cc3-part3 -> 
../../sdc3
lrwxrwxrwx 1 root root  9 Apr 20 14:28 wwn-0x55cd2e404ba257ba -> ../../sdf
lrwxrwxrwx 1 root root 10 Apr 20 14:28 wwn-0x55cd2e404ba257ba-part1 -> 
../../sdf1
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Apr 20 14:28 2C0273D80273A60C -> ../../sdc2
lrwxrwxrwx 1 root root 15 Apr 20 14:28 5709a0d9-14d3-47a8-a65c-7896881e5d0b -> 
../../nvme0n1p1
lrwxrwxrwx 1 root root 10 Apr 20 14:28 5ECA9A05CA99DA1B -> ../../sdc3
lrwxrwxrwx 1 root root 10 Apr 20 14:28 6b9f70b0-1ec1-4ad9-a55c-d772980f3e81 -> 
../../sdf1
lrwxrwxrwx 1 root root 10 Apr 20 14:28 727805727805367F -> ../../sdg1
lrwxrwxrwx 1 root root 10 Apr 20 14:28 72FACCC5FACC86B7 -> ../../sdh1
lrwxrwxrwx 1 root root 10 Apr 20 14:28 7460727360723BC4 -> ../../sdc1
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: 12.10
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable'), (100, 'bookworm-fasttrack'), (100, 'bookworm-backports-staging')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-33-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
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

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]  1.5.82
ii  grub-common            2.06-13+deb12u1
ii  grub-pc-bin            2.06-13+deb12u1
ii  grub2-common           2.06-13+deb12u1
ii  ucf                    3.0043+nmu1+deb12u1

grub-pc recommends no packages.

grub-pc suggests no packages.

-- debconf information:
  grub2/force_efi_extra_removable: false
  grub-pc/timeout: 5
  grub2/kfreebsd_cmdline_default: quiet
  grub-pc/install_devices_empty: false
* grub-pc/install_devices: 
/dev/disk/by-id/ata-Samsung_SSD_840_EVO_500GB_S1DHNSAFA00613T
* grub2/linux_cmdline_default:
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/mixed_legacy_and_grub2: true
  grub2/kfreebsd_cmdline:
  grub2/device_map_regenerated:
  grub-pc/install_devices_failed: false
  grub-pc/install_devices_disks_changed:
  grub-pc/partition_description:
  grub2/update_nvram: true
  grub-pc/hidden_timeout: false
  grub-pc/kopt_extracted: false
* grub2/enable_os_prober: false
* grub2/linux_cmdline:
  grub-pc/disk_description:
  grub-pc/install_devices_failed_upgrade: true
  grub-pc/chainload_from_menu.lst: true

Attachment: hd1_debian.before
Description: Binary data

Attachment: hd1_debian.after
Description: Binary data

Attachment: hd0_win10.before
Description: Binary data

Attachment: hd0_win10.after
Description: Binary data

Reply via email to