I have had the same problem:
Windows 7 and Linux (Slax with Grub2 and Debian in my case) and os-prober
didn't recognizes the Windows partition when I used update-grub
; Windows was left out.
I repaired the problem. First I tested adding the entry for Windows 7 manually to /boot/grub/grub.cfg
(update-grub
overwrites this file whenever it is run, so changes made to it are not permanent).
I rebooted and Windows 7 appeared in the menu and booted ok, aside from this error appearing:
error: no suck device: xxxxxxxxxxx (disk ID)
When this came up, I pressed Enter and Windows booted fine.
I investigated the execution of the os-prober
command and others scripts involved in the process of recognizing OS and I test the output of
sudo /etc/grub.d/30_os-prober 2>/dev/null
Windows is not listed. I opened Dolphin file manager to browse the Windows partition and searched for the UUID of the partition and replaced it in /boot/grub/grub.cfg
to resolve the error.
I executed
sudo /etc/grub.d/30_os-prober 2>/dev/null
and Windows was then listed ok
I rebooted the PC, went to console, and executed
sudo /etc/grub.d/30_os-prober 2>/dev/null
and then Windows was again not listed.
I opened Dolphin, browsed the Windows partition, executed
sudo /etc/grub.d/30_os-prober 2>/dev/null
again and Windows was listed.
I executed update-grub
and the GRUB menu is now ok.
I think os-prober
needs the partition (in NTFS case, because the Debian partition always is listed) mounted before it can find it. I haven't found out why os-prober
has this behaviour but the solution works.