Bug 775612

Summary: grub2-efi incorrect win7 menu stanza
Product: [openSUSE] openSUSE 12.2 Reporter: Forgotten User KTTkqM4upJ <forgotten_KTTkqM4upJ>
Component: BootloaderAssignee: Jiri Srain <jsrain>
Status: RESOLVED DUPLICATE QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None    
Version: RC 2   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User KTTkqM4upJ 2012-08-12 20:28:55 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1

Installed RC2 onto a duel boot system with existing win7 efi install.

I have the openSUSE 12.2RC2 booting fine with grub2-efi install but the win7 entry is unbootable. The efi partition
is at the end partition which I think is causing the problem.


Model: ATA WDC WD5000AAKS-0 (scsi)Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt


Number  Start   End    Size   File system  Name                  Flags
 1      32.3kB  500GB  500GB  ntfs         Microsoft basic data
 2      500GB   500GB  209MB  fat32                              boot

The stanza created automatically by the 30_os-prober in /etc/grub.d creates this which points to the first partition (ntfs) 
and appears to be a mbr boot config.


### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-746C89606C891E4C' {
        insmod part_gpt
        insmod ntfs
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  746C89606C891E4C
        else
          search --no-floppy --fs-uuid --set=root 746C89606C891E4C
        fi
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

The uuids are for the ntfs partition not the gpt partition and the chainloader command is should be:

chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi


grub2-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgr.efi 
3185-A28F

grub2-probe --target=fs_uuid /windows/C/
746C89606C891E4C

As seen the uuid being used is the one for the ntfs but should be the uuid for the efi partition. And
what I think is casuing the problem is that it isn't on the first partition.

I can fix the issue by adding a custom menu item in the /etc/gub.d/40_custom using please_try_again's guide but
the automatic generation produces a extra menu item.


Reproducible: Always

Steps to Reproduce:
1.run grub2-efi-mkconfig
2.
3.
Actual Results:  
Mbr stanza instead of efi stanza

Expected Results:  
correct stanza for efi booting
Comment 1 Lukas Ocilka 2012-09-06 14:58:11 UTC
Seems to be a duplicate

*** This bug has been marked as a duplicate of bug 775610 ***