Hmmm⦠
First of all, Iβm really happy because it got fixed finally

I donβt know what was the problem and enven how it got fixed but others may point it out by reading my workflow. Here, I just share my experience and it maybe help others.
After os-prober
failed to find windows, I motivated to add windows boot entry manually (I know it seems crazy
but it was my last shot).
To do so, I first need to find out which device block really belongs to windows boot manager. I had a suggestion about /dev/sda1
but I wasnβt sure:
$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 105.8M 1 loop /var/lib/snapd/snap/core/16202
loop1 7:1 0 104.2M 1 loop /var/lib/snapd/snap/core/17200
loop2 7:2 0 63.5M 1 loop /var/lib/snapd/snap/core20/2015
loop3 7:3 0 63.7M 1 loop /var/lib/snapd/snap/core20/2434
loop4 7:4 0 8.3M 1 loop /var/lib/snapd/snap/gost/539
loop5 7:5 0 9M 1 loop /var/lib/snapd/snap/gost/559
sda 8:0 0 931.5G 0 disk
ββsda1 8:1 0 350M 0 part
ββsda2 8:2 0 97.3G 0 part
ββsda3 8:3 0 1K 0 part
ββsda5 8:5 0 293G 0 part
ββsda6 8:6 0 207G 0 part
ββsda7 8:7 0 52.6G 0 part
ββsda8 8:8 0 15.6G 0 part [SWAP]
ββsda9 8:9 0 1000M 0 part /boot
ββsda10 8:10 0 107.4G 0 part /
ββsda11 8:11 0 157.2G 0 part /home
sdb 8:16 0 931.5G 0 disk
ββsdb1 8:17 0 931.5G 0 part
To make sure /dev/sda1
contains windows boot manager, I mounted it and inspected its content:
$ sudo mount /dev/sda1 /mnt
/dev/sda1 content
$ tree /mnt
/mnt
βββ $RECYCLE.BIN
β βββ S-1-5-21-3802437951-2989038664-4021769935-1001
β βββ desktop.ini
βββ Boot
β βββ BCD
β βββ BCD.LOG
β βββ BCD.LOG1
β βββ BCD.LOG2
β βββ bg-BG
β β βββ bootmgr.exe.mui
β βββ BOOTSTAT.DAT
β βββ cs-CZ
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ da-DK
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ de-DE
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ el-GR
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ en-GB
β β βββ bootmgr.exe.mui
β βββ en-US
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ es-ES
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ et-EE
β β βββ bootmgr.exe.mui
β βββ fi-FI
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ Fonts
β β βββ chs_boot.ttf
β β βββ cht_boot.ttf
β β βββ jpn_boot.ttf
β β βββ kor_boot.ttf
β β βββ malgun_boot.ttf
β β βββ malgunn_boot.ttf
β β βββ meiryo_boot.ttf
β β βββ meiryon_boot.ttf
β β βββ msjh_boot.ttf
β β βββ msjhn_boot.ttf
β β βββ msyh_boot.ttf
β β βββ msyhn_boot.ttf
β β βββ segmono_boot.ttf
β β βββ segoen_slboot.ttf
β β βββ segoe_slboot.ttf
β β βββ wgl4_boot.ttf
β βββ fr-FR
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ hr-HR
β β βββ bootmgr.exe.mui
β βββ hu-HU
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ it-IT
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ ja-JP
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ ko-KR
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ lt-LT
β β βββ bootmgr.exe.mui
β βββ lv-LV
β β βββ bootmgr.exe.mui
β βββ memtest.exe
β βββ nb-NO
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ nl-NL
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ pl-PL
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ pt-BR
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ pt-PT
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ qps-ploc
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ Resources
β β βββ bootres.dll
β β βββ en-US
β β βββ bootres.dll.mui
β βββ ro-RO
β β βββ bootmgr.exe.mui
β βββ ru-RU
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ sk-SK
β β βββ bootmgr.exe.mui
β βββ sl-SI
β β βββ bootmgr.exe.mui
β βββ sr-Latn-CS
β β βββ bootmgr.exe.mui
β βββ sr-Latn-RS
β β βββ bootmgr.exe.mui
β βββ sv-SE
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ tr-TR
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ uk-UA
β β βββ bootmgr.exe.mui
β βββ zh-CN
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ zh-HK
β β βββ bootmgr.exe.mui
β β βββ memtest.exe.mui
β βββ zh-TW
β βββ bootmgr.exe.mui
β βββ memtest.exe.mui
βββ bootmgr
βββ BOOTNXT
βββ BOOTSECT.BAK
βββ C
βββ Recovery
β βββ WindowsRE
β βββ boot.sdi
β βββ ReAgent.xml
β βββ Winre.wim
βββ System Volume Information
βββ $MRCBT
βββ FileProtector
β βββ STDB
β βββ status.db
βββ IndexerVolumeGuid
βββ MasterFileStatus.db
βββ tracking.log
βββ WPSettings.dat
49 directories, 97 files
Because there is no /EFI/
directory, I switched my idea about different Installation Modes again
and suggested maybe windows is installed in BIOS-style mode.
To make sure that windows is installed in legacy mode, I tried two different ways.
parted command
Iβm not sure about this claim but through my research, It seems if a block device contains EFI installation mode files, it is flagged by esp
.
$ sudo parted -l
[sudo] password for milad:
Model: ATA Samsung SSD 870 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 368MB 367MB primary ntfs boot
2 368MB 105GB 104GB primary ntfs
3 105GB 1000GB 895GB extended lba
5 105GB 419GB 315GB logical ntfs
6 419GB 642GB 222GB logical ntfs
8 642GB 659GB 16.8GB logical linux-swap(v1) swap
9 659GB 660GB 1049MB logical ext4
10 660GB 775GB 115GB logical ext4
11 775GB 944GB 169GB logical ext4
7 944GB 1000GB 56.5GB logical ntfs
Model: ATA WDC WD10JPCX-24U (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary ntfs
As you can see, /dev/sda1
is only flagged by boot
which is another evidence for Legacy installation mode of windows!
grub
Reboot your system and in boot menu, press c to enter grub prompt.
List all your available devices:
ls
(hd0), (hd0,msdos1) (hd0,msdos2) ...
Just another evidence is that devices are labeld with msdos
instead of gpt
and it confirms that windows is installed in Legacy Mode but letβs continue.
Note that numbers are mapped directly, I mean dev/sdax
is mapped to msdosx
. So to inspect /dev/sda1
, I should consider (hd0,msdos1)
:
ls (hd0,msdos1)/
$AttrDef $BadClus $Bitmap $Boot $Extend/ $LogFile $MFT $MFTMirr $RECYCLE.BIN/ $SECURE $UpCase $Volume Boot/ bootmgr BOOTNXT BOOTSECT.BAK C/ Recovery/ Sytem Volume Inforamtion/
Because I only have Boot
and bootmgr
, now Iβm sure that window is installed in legacy mode too!
If windows is installed in EFI mode, You should be able to find bootmgfw.efi
file in (hd0,gpt1)/EFI/Microsoft/Boot/
default path.
Now that we are sure windows is installed in Legacy mode, we should add a manual entry in /etc/grub.d/40_custom
:
menuentry "Windows 8 (legacy BIOS)" {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
chainloader +1
}
insmod part_msdos
loads MBR partition support.
insmod ntfs
loads NTFS filesystem support.
chainloader +1
tells GRUB to hand off to the first sector (the Windows bootloader code) of that partition.
Now we are ready to regenerate grub configurations but before that, make sure to take a backup:
$ sudo cp /boot/grub/grub.cfg /grub.conf.backup
Regenerate grub configurations:
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
This time os-prober
took a longer time to probe operations systems and it found the Windows on its own 
I rebooted and There was two new boot entrys in grub menu:
- Windows 8
- Windows 8 (legacy BIOS)
The first one is detected by os-prober
and the last one is my manual entry.
I selected first one and windows booted without any problem.
NOTE: I never tried Window 8 (legacy BIOS)
boot option and didnβt remove it too because I donβt touch a code if itβs working 
Final Note:
I really donβt know what was the root of problem and if adding manual entry was effective or not! I think itβs a bug in new update of os-prober
or grub. Iβm just happy that I fixed it.