Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 552146

Summary: sys-boot/os-prober with >=sys-apps/grep-2.21-r1 misreports sys-boot/grub:2 Windows Name
Product: Gentoo Linux Reporter: Carter Young <ecyoung>
Component: [OLD] Core systemAssignee: Ai Locke Shinseiko (Wizzleby) <Wizzleby>
Status: RESOLVED FIXED    
Severity: trivial CC: jcallen, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772901
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: os-prober.diff

Description Carter Young 2015-06-14 22:21:48 UTC
Copied from Debian Bugzilla(772901):

Package: os-prober
Version: 1.65
Tags: patch

os-prober uses 'grep' in an unportable way, in that it assumes that the regular 
expression "." matches the NUL byte (all zero bits).  POSIX doesn't guarantee 
this, and as of grep 2.21 this might not work.  If os-prober assumes GNU grep 
the fix should be fairly straightforward; please see the attached (untested) 
patch.  If os-prober is intended to be portable to non-GNU grep, more hacking 
will be needed, as POSIX says grep has undefined behavior when given binary 
input data.

For more details about this issue please see:

https://bugzilla.redhat.com/show_bug.cgi?id=1172405
https://bugzilla.redhat.com/show_bug.cgi?id=1172804
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19348


Reproducible: Always

Steps to Reproduce:
1. Boot using Grub 2

Actual Results:  
2. Windows 7 misidentified as Windows Vista


Expected Results:  
Windows Partition Types should identify properly above Vista
Comment 1 Carter Young 2015-06-14 22:23:59 UTC
Created attachment 405160 [details, diff]
os-prober.diff

The proposed patch from the Debian bug mentioned in the URL
Comment 2 Mike Gilbert gentoo-dev 2015-06-17 01:59:14 UTC
This is an os-prober bug, yet you fail to mention this in the summary.
Comment 3 Pacho Ramos gentoo-dev 2017-02-06 16:27:19 UTC
should be fixed since 1.66