Package: os-prober
Version: 1.80
Severity: normal

Dear Maintainer,

What led to the situation:
Debian Testing new linux kernel 5.18.0-1 and updated grub 2.06-3 installed via
apt package manager; the new linux kernel installation prompted the update-grub
function to run.

By default this new version of grub does not run the the os-prober package,
hence, the Windows 10 partition was not detected and was eliminated from the
grub.cfg list of bootable partitions.

What I did that was effective/ineffective (part 1):
- Added 'GRUB_DISABLE_OS_PROBER=false' to /etc/default/grub and ran 'sudo
update-grub', forcing os-prober/grub to search for Windows partition
- this resulted in the Windows 10 partition on this computer (box0) to be
recognized, but with errors >>
  [incidentally, this exact procedure worked perfectly on my dual-boot Debian
Testing/Windows 10 laptop - no errors]

terminal output >>
zaleksf@box0:~$ sudo update-grub
[sudo] password for zaleksf:
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.18.0-1-amd64
Found initrd image: /boot/initrd.img-5.18.0-1-amd64
Found linux image: /boot/vmlinuz-5.17.0-1-amd64
Found initrd image: /boot/initrd.img-5.17.0-1-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot
/usr/sbin/grub-probe: error: unknown filesystem.
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
/usr/sbin/grub-probe: error: unknown filesystem.
Adding boot menu entry for UEFI Firmware Settings ...

Upon rebooting and seeing the main grub list screen, there were the usual
entries for booting to Debian, Windows, etc. However, upon selecting the
Windows boot entry, I received an error indicating
'/EFI/Microsoft/Boot/bootmgfw.efi does not exist'

This was false, as I could find this file from both the Debian OS and Windows
OS file manager, and I could boot directly into Windows 10 from the BIOS using
the 'Enter/F12' key combination to bring up a list of boot partition choices
(which did show both Debian and Windows as options).

I investigated grub.cfg file and found that the 30_os-prober section for
Windows to be significantly truncated from its usual entry (and other Linux
kernel entries) >>

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os
$menuentry_id_option 'osprober-efi-/dev/sda1' {
        insmod part_gpt
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
### END /etc/grub.d/30_os-prober ###

What I did that was effective/ineffective (part 2):
Since my laptop (box1) also is dual-boot Debian Testing/Windows 10 with a
virtually identical set-up, I tried an experiment of copying its complete (and
functioning) 30_os-prober section to grub.cfg on this misbehaving desktop
system (box0). I tweaked this section (using logic) to point to the proper
Windows partition, etc. (since I really have no experience with grub at all).
Manually changed section 30_os-prober to this >>

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os
$menuentry_id_option 'osprober-efi-/dev/sda1' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-
efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  82CB-1126
          search --no-floppy --fs-uuid --set=root 54C7-5867
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
### END /etc/grub.d/30_os-prober ###

Saved grub.cfg, rebooted machine and selected Windows entry from grub.


Can boot into the Windows 10 partition perfectly, just as before. All grub list
entries work correctly.

If I run 'update-grub' again, the grub-probe error is indicated in the
terminal, and the truncated/broken section 30_os-prober returns to

My machine (and Windows and Debian) works just fine. This machine has been
dual-boot Debian Testing/Windows 10 for the last 5 years and has never
experienced this issue before this version of grub/os-prober was introduced.

My recommendation is to look into why the os-prober successfully recognizes a
dual-boot Windows partition for some machines and not others. Please let me
know if I can send additional files to support troubleshooting and/or

Best regards, SZ

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.18.0-1-amd64 (SMP w/16 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

Versions of packages os-prober depends on:
ii  grub-common  2.06-3
ii  libc6        2.33-7
ii  mount        2.38-4

os-prober recommends no packages.

os-prober suggests no packages.

-- no debconf information

Reply via email to