Bug 1172405

Summary: grub2-mkconfig misidentifies windows partition as Vista
Product: [Fedora] Fedora Reporter: Frank McCormick <beacon>
Component: os-proberAssignee: Hedayat Vatankhah <hedayatv>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: awilliam, bugzilla, eggert, eliadevito, hedayatv
Target Milestone: ---Keywords: CommonBugs
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: https://fedoraproject.org/wiki/Common_F21_bugs#os-prober-vista
Fixed In Version: os-prober-1.65-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-29 09:56:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1172804    
Bug Blocks:    
Attachments:
Description Flags
Latest grub.cfg generated by os-prober none

Description Frank McCormick 2014-12-10 01:29:26 UTC
Created attachment 966568 [details]
Latest grub.cfg generated by os-prober

Description of problem:

When I run grub2-mkconfig, os-prober misidentifies my Windows partition as
Windows Vista. It actually is Windows 7. Until recently, it always identified
it as Windows 7


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.run 'grub2-mkconfig -o /boot/grub2/grub.cfg' on my machine
2.
3.

Actual results:

Windows is identified as Vista not 7

Expected results:

Proper identification

Additional info:

Comment 1 Chris Murphy 2014-12-10 18:04:14 UTC
Please include output from
$ sudo os-prober

Comment 2 Frank McCormick 2014-12-10 18:07:13 UTC
[frankzen@localhost rox]$ sudo os-prober
/dev/sda1:Windows Vista (loader):Windows:chain
/dev/sda4:Debian GNU/Linux (8.0):Debian:linux
[frankzen@localhost rox]$

Comment 3 Chris Murphy 2014-12-10 18:38:28 UTC
I'm not finding debug options for os-prober, but try this, it might give some hint why it thinks it's Vista:
$ sudo bash -x os-prober

Comment 4 Frank McCormick 2014-12-10 18:41:51 UTC
[frankzen@localhost rox]$ sudo bash -x os-prober
+ set -e
+ export fd_result=3
+ fd_result=3
+ export fd_logger=9
+ fd_logger=9
+ . /usr/share/os-prober/common.sh
++ cleanup_tmpdir=false
++ cleanup_ro_partitions=
++ progname=
++ eval '
  log() {
    cache_progname
    echo "$progname: $@"  1>&9
  }
'
++ export fd_logger
++ eval '
  result() {
    log "result:" "$@"
    echo "$@"  1>&3
  }
'
++ export fd_result
++ type mapdevfs
+++ which umount
++ umount_exec=/bin/umount
+ newns
+ '[' '' ']'
+ exec /usr/libexec/newns os-prober
/dev/sda1:Windows Vista (loader):Windows:chain
/dev/sda4:Debian GNU/Linux (8.0):Debian:linux
[frankzen@localhost rox]$ 


I dunno, hope this makes sense to someone :)

Comment 5 Hedayat Vatankhah 2014-12-10 18:55:05 UTC
I'm investigating the issue, it's related to grep! not os-prober. grep's behavior in searching binary files is changed in Fedora 21. I'm trying to find out if it is a bug, or an intended change!

Comment 6 Hedayat Vatankhah 2014-12-10 19:33:01 UTC
Seems to be a bug. I've filled bug #1172804 against grep.

Comment 7 Chris Murphy 2014-12-10 20:40:57 UTC
Thanks Hedayat.

Common Bugs proposed text: After installing Fedora along side Windows, the (GRUB) boot menu entry for Windows might be mislabeled with the wrong version of Windows. This is a cosmetic bug, the entry should still successfully boot Windows. A future update is anticipated that will fix the underlying cause, but following that update it will be necessary to manually run 'grub2-mkconfig -o /boot/grub2/grub.cfg' for the change to take effect.

Comment 8 Frank McCormick 2014-12-10 21:44:05 UTC
I haven't tried yet to boot Windows from the mis-labeled prompt. If it works you'll hear nothing from me.

Comment 9 Paul Eggert 2014-12-12 05:28:34 UTC
This is due to a bug in os-prober; it's making an unportable assumption about 'grep'.  I have filed a bug report with a proposed (but untested) patch at:

http://bugs.debian.org/772901

Comment 10 Elia Devito 2014-12-20 22:29:48 UTC
*** Bug 1176133 has been marked as a duplicate of this bug. ***

Comment 11 Fedora Update System 2014-12-23 21:08:31 UTC
os-prober-1.65-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/os-prober-1.65-2.fc21

Comment 12 Fedora Update System 2014-12-25 05:31:39 UTC
Package os-prober-1.65-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing os-prober-1.65-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-17566/os-prober-1.65-2.fc21
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2014-12-29 09:56:48 UTC
os-prober-1.65-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.