Ask Your Question

os-prober doesn't seem to find windows 7.

asked 2015-03-03 22:01:47 -0500

c0untzer0 gravatar image

updated 2015-03-04 21:58:03 -0500

mether gravatar image

I have Fedora 21 partitioned across a SSD and a hard disk and I have Windows 7 on a separate hard disk. What I'm trying to accomplish is having Windows 7 as an option in the grub2 menu.

I've had the disk with Windows 7 mounted and I can view its contents like any other drive, and the "disks" program says that it is bootable. I've ran os-prober and grub2-mkconfig -o /boot/grub2/grub.cfg but it doesn't seem to turn anything up. Where am I going wrong?

Some information that may be of use:

Output of fdisk -l

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8024E193-4BEC-401A-AE40-3E50B913C1C1

Device       Start       End   Sectors  Size Type
/dev/sda1     2048   2095103   2093056 1022M EFI System
/dev/sda2  2095104   5998591   3903488  1.9G Linux filesystem
/dev/sda3  5998592 234440703 228442112  109G Linux filesystem

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000e5071

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1  *     2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT

Disk /dev/sdc: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2EE0B556-FE68-4EEF-B687-7CA25AB82612

Device        Start        End    Sectors  Size Type
/dev/sdc1      2048   31248383   31246336 14.9G Linux swap
/dev/sdc2  31248384   46870527   15622144  7.5G Linux filesystem
/dev/sdc3  46870528 5860528127 5813657600  2.7T Linux filesystem

Output of grub2-mkconfig -o /boot/grub2/grub.cfg

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.18.7-200.fc21.x86_64
Found initrd image: /boot/initramfs-3.18.7-200.fc21.x86_64.img
Found linux image: /boot/vmlinuz-3.17.4-301.fc21.x86_64
Found initrd image: /boot/initramfs-3.17.4-301.fc21.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-0643e9e293a647b1bb98958c92e64e9e
Found initrd image: /boot/initramfs-0-rescue-0643e9e293a647b1bb98958c92e64e9e.img

Output of blkid

/dev/sda1: UUID="4FFC-1F6F" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="cfb5ffb5-21a2-4104-8721-250a751e8a91"
/dev/sda2: UUID="5195f5f3-4a6f-439c-b105-4d2260a7d153" TYPE="ext4" PARTUUID="8082cea2-456f-4347-ae95-201fae6f6ca5"
/dev/sda3: UUID="bd776c3d-ef1a-4fc3-89b2-90ddf15ecd29" TYPE="ext4" PARTUUID="ddb7d267-5335-423b-b858-c8b57acc03b6"
/dev/sdb1: UUID="7C0C79BB0C79714E" TYPE="ntfs" PARTUUID="000e5071-01"
/dev/sdc1: UUID="ae1bfab1-da34-40e0-8622-f5ff76d11061" TYPE="swap" PARTUUID="200afd0b-5f6d-4fca-a918-587a4f115436"
/dev/sdc2: UUID="5c1f85af-81a6-4358-aea8-ad3116e9eab9" TYPE="ext4" PARTUUID="62f3c4b1-0f31-45cb-a189-e777d6bbb2ac"
/dev/sdc3: UUID="65846047-0fce-4c06-891c-dbcdb44d4aad" TYPE="ext4" PARTUUID="667058bd-1039-4b59-b220-d254123052e2"
/dev/sr1: UUID="2009-11-10-10-24-15-00" LABEL="CDROM" TYPE="udf"
[c0unt@Wintermute-IV ~]$


I was able to boot into Windows using UEFI. After I restarted the computer from Windows, I noticed that a Windows 7 entry had appeared in grub but when selected, it gave me the following errors:

error: file /EFI/fedora/x86_64-efi/ntfs.mod not found
error: disk hd1,1 not found

Any ideas?

edit retag flag offensive close merge delete


are you able to boot into windows 7? how? Is it installed in EFI mode or not? doesn't seem so. IIRC, when in EFI mode, only EFI system partition (/dev/sda1) is searched for OSes, because it is unclear that grub in EFI mode is able to boot an OS in BIOS mode. But if Windows is installed in EFI mode and you can boot it normally (or using your system's EFI boot menu before grub starts), run os-prober and upload your system messages generated by os-prober (using journalctl).

hedayat gravatar imagehedayat ( 2015-03-04 00:24:18 -0500 )edit

I just booted into Windows by entering UEFI and selecting the hard disk that Windows is on. If you could please read the update I just posted.

Also, could you please elaborate on your last sentence? I'm something of a novice.

c0untzer0 gravatar imagec0untzer0 ( 2015-03-04 02:20:52 -0500 )edit

I will. But before that, please give me the menuentry created for Windows in your /boot/grub2/grub.cfg (there is a menuentry line which includes your Windows grub entry title. Give me that section).

hedayat gravatar imagehedayat ( 2015-03-04 05:04:25 -0500 )edit

menuentry "Windows" { set root=(hd1,1) chainloader +1 }

It may be worth mentioning that at one point, I tried making an entry in 40_custom.

c0untzer0 gravatar imagec0untzer0 ( 2015-03-04 05:14:14 -0500 )edit

Is it complete? Please give me a few more lines. Maybe the complete grub.cfg is also useful.

hedayat gravatar imagehedayat ( 2015-03-04 05:21:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-07 02:39:14 -0500

hedayat gravatar image

OK, as I guessed, your Windows is installed in BIOS mode in the other disk; and so you cannot boot it using UEFI OS selection menu (you can boot Windows by selecting to boot from the other HDD, but it won't appear in UEFI os selection menu as Windows). Currently, when in UEFI mode, os-prober ignores non-EFI OSes (since it is unclear to us that we can boot such an OS when grub is loaded in UEFI mode). The following lines indicate this clearly:

Mar 06 16:46:12 c0unt[3374]: os-prober: debug: running /usr/libexec/os-probes/mounted/20microsoft on mounted /dev/sdb1
Mar 06 16:46:12 c0unt[3374]: 20microsoft: debug: Skipping legacy bootloaders on UEFI system

If you are able to create a custom menu entry in grub which can actually boot Windows in your case (without re-installing Windows in UEFI mode), please let me know so that we can modify os-prober accordingly.


edit flag offensive delete link more


Just to clarify, am I correct in assuming that the second line "Skipping legacy bootloaders..." means its ignoring the BIOS?

Also, does this mean that my only clear option is to reinstall Windows in UEFI mode?

c0untzer0 gravatar imagec0untzer0 ( 2015-03-07 05:17:36 -0500 )edit

It doesn't ignore 'BIOS', but ignores OSes installed in BIOS (non-EFI) mode (installed with a non-EFI boot loader).

Yes, at least this is the only option which is currently supported by os-prober if Fedora is installed in UEFI mode. (similarly, if you install Fedora in BIOS mode, it'll ignore UEFI OSes).

hedayat gravatar imagehedayat ( 2015-03-07 12:25:18 -0500 )edit

fantastic. thanks!

c0untzer0 gravatar imagec0untzer0 ( 2015-03-07 16:51:21 -0500 )edit

You're welcome :)

hedayat gravatar imagehedayat ( 2015-03-10 14:35:43 -0500 )edit

Question Tools



Asked: 2015-03-03 22:01:47 -0500

Seen: 3,630 times

Last updated: Mar 07 '15