Page 1 of 5 123 ... LastLast
Results 1 to 10 of 50

Thread: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

  1. #1

    Default openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    So I FINALLY got grub2 to recognize my Windows 8 install through reading various sources. I had to create a '30_windows' custom grub config because even after installing grub2 & os-prober packages patched with updated proper UEFI support I still couldn't get grub2 to recognize my Windows 8 install. I couldn't get far enough with grub2-efi (failed on locating modules). Windows 8 is installed on a separate 3 TB HDD on my desktop PC with a UEFI & Legacy (BIOS) motherboard. (UEFI & Legacy BIOS is enabled for boot devices in the BIOS). The only problem (I think), is that in the '30_windows' config file I set it to the wrong hd and/or partition before generating the grub config file with 'grub2-mkconfig -o /boot/grub2/grub.cfg' . When tyring to boot the Windows 8 entry in grub2 it says 'error: no such partition'. Can someone please help me determine what the proper config should be for my Windows 8 grub entry so I can boot to it without having to tweak my BIOS/UEFI settings every time I want to boot to Windows?
    Here is my info:

    Code:
    fdisk -l
    WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
    
    Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
    256 heads, 63 sectors/track, 363376 cylinders, total 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
    Disk identifier: 0x00000000
    
    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1  4294967295  2147483647+  ee  GPT
    Partition 1 does not start on physical sector boundary.
    
    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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
    Disk identifier: 0x000837c8
    
    Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *        2048  1953523711   976760832    f  W95 Ext'd (LBA)
    /dev/sdb5            4096      321535      158720   83  Linux
    /dev/sdb6          323584     4530175     2103296   82  Linux swap / Solaris
    /dev/sdb7         4532224    88422399    41945088   83  Linux
    /dev/sdb8        88424448  1953503231   932539392   83  Linux
    
    WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
    
    
    Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
    255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 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                                                                                                                                                                                              
    Disk identifier: 0x4bafcb6a                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                  
    Device Boot      Start         End      Blocks   Id  System                                                                                                                                                                                
    /dev/sdc1            2048  4294969342  2147483647+  83  Linux                                                                                                                                                                                  
    /dev/sdc4               1           1           0+  ee  GPT                                                                                                                                                                                    
                                                                                                                                                                                                                                                  
    Partition table entries are not in disk order                                                                                                                                                                                                  
    Note: sector size is 4096 (not 512)
    Code:
    GNU Parted 2.4
    Using /dev/sda
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) p                                                                
    Model: ATA ST3000DM001-1CH1 (scsi)
    Disk /dev/sda: 3001GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    
    Number  Start   End     Size    File system  Name                          Flags
     1      1049kB  316MB   315MB   ntfs         Basic data partition          hidden, diag
     2      316MB   419MB   104MB   fat32        EFI system partition          boot
     3      419MB   554MB   134MB                Microsoft reserved partition  msftres
     4      554MB   3001GB  3000GB  ntfs         Basic data partition
    Code:
    grub.cfg
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub2-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      load_env
    fi
    set default="${saved_entry}"
    
    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi
    
    export menuentry_id_option
    
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    
    if [ x$feature_default_font_path = xy ] ; then
       font=unicode
    else
    insmod part_msdos
    insmod btrfs
    set root='hd1,msdos7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos7 --hint-efi=hd1,msdos7 --hint-baremetal=ahci1,msdos7 --hint='hd1,msdos7'  71242393-d510-4a6c-b749-018bd581ccf5
    else
      search --no-floppy --fs-uuid --set=root 71242393-d510-4a6c-b749-018bd581ccf5
    fi
        font="/usr/share/grub2/unicode.pf2"
    fi
    
    if loadfont $font ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=en_US
      insmod gettext
    fi
    terminal_output gfxterm
    insmod part_msdos
    insmod ext2
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd1,msdos5'  1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
    else
      search --no-floppy --fs-uuid --set=root 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
    fi
    insmod gfxmenu
    loadfont ($root)/grub2/themes/openSUSE/ascii.pf2
    loadfont ($root)/grub2/themes/openSUSE/DejaVuSans10.pf2
    loadfont ($root)/grub2/themes/openSUSE/DejaVuSans12.pf2
    loadfont ($root)/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
    insmod png
    set theme=($root)/grub2/themes/openSUSE/theme.txt
    export theme
    if [ x${boot_once} = xtrue ]; then
      set timeout=0
    elif sleep --interruptible 0 ; then
      set timeout=10
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'openSUSE 12.2' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-71242393-d510-4a6c-b749-018bd581ccf5' {
            load_video
            set gfxpayload=keep
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd1,msdos5'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd1,msdos5'  1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
            else
              search --no-floppy --fs-uuid --set=root 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
            fi
            echo    'Loading Linux 3.7.2-1-desktop ...'
            linux   /vmlinuz-3.7.2-1-desktop root=UUID=71242393-d510-4a6c-b749-018bd581ccf5   video=1920x1080 splash=0 splash=silent showopts
            echo    'Loading initial ramdisk ...'
            initrd  /initrd-3.7.2-1-desktop
    }
    submenu 'Advanced options for openSUSE 12.2' $menuentry_id_option 'gnulinux-advanced-71242393-d510-4a6c-b749-018bd581ccf5' {
            menuentry 'openSUSE 12.2, with Linux 3.7.2-1-desktop' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.2-1-desktop-advanced-71242393-d510-4a6c-b749-018bd581ccf5' {
                    load_video
                    set gfxpayload=keep
                    insmod gzio
                    insmod part_msdos
                    insmod ext2
                    set root='hd1,msdos5'
                    if [ x$feature_platform_search_hint = xy ]; then
                      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd1,msdos5'  1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
                    else
                      search --no-floppy --fs-uuid --set=root 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
                    fi
                    echo    'Loading Linux 3.7.2-1-desktop ...'
                    linux   /vmlinuz-3.7.2-1-desktop root=UUID=71242393-d510-4a6c-b749-018bd581ccf5   video=1920x1080 splash=0 splash=silent showopts
                    echo    'Loading initial ramdisk ...'
                    initrd  /initrd-3.7.2-1-desktop
            }
            menuentry 'openSUSE 12.2, with Linux 3.7.2-1-desktop (recovery mode)' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.2-1-desktop-recovery-71242393-d510-4a6c-b749-018bd581ccf5' {
                    load_video
                    set gfxpayload=keep
                    insmod gzio
                    insmod part_msdos
                    insmod ext2
                    set root='hd1,msdos5'
                    if [ x$feature_platform_search_hint = xy ]; then
                      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd1,msdos5'  1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
                    else
                      search --no-floppy --fs-uuid --set=root 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
                    fi
                    echo    'Loading Linux 3.7.2-1-desktop ...'
                    linux   /vmlinuz-3.7.2-1-desktop root=UUID=71242393-d510-4a6c-b749-018bd581ccf5  showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset  x11failsafe
                    echo    'Loading initial ramdisk ...'
                    initrd  /initrd-3.7.2-1-desktop
            }
    }
    
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_ppc_terminfo ###
    ### END /etc/grub.d/20_ppc_terminfo ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/30_windows ###
    menuentry "Windows 8" {
            insmod part_gpt
            insmod chain
            set root='(hd0,gpt2)'
            chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }
    ### END /etc/grub.d/30_windows ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    
    ### BEGIN /etc/grub.d/90_persistent ###
    ### END /etc/grub.d/90_persistent ###

  2. #2

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    Quote Originally Posted by echoes- View Post
    The only problem (I think), is that in the '30_windows' config file I set it to the wrong hd and/or partition before generating the grub config file with 'grub2-mkconfig -o /boot/grub2/grub.cfg' . When tyring to boot the Windows 8 entry in grub2 it says 'error: no such partition'. Can someone please help me determine what the proper config should be for my Windows 8 grub entry so I can boot to it without having to tweak my BIOS/UEFI settings every time I want to boot to Windows?
    You should use the UUID of the partition, not the disk/partition number. See examples here: Manually adding a new entry (e.g. Windows) to the GRUB2-EFI boot loader menu an here: Confused with grub2-efi / opensuse / win 8


    Is anyone going/willing to tell me some day if updategrub is able ta add this entry automatically or not (on openSUSE 12.2 + WIndows 8) ... If not, we will never know, as I'm certainly not going to buy a crappy (or even not crappy) Windows8 laptop!

    * Under 12.1 and WIndows7, it would have added a boot entry for Windows, even before we patched os-prober for UEFI.

  3. #3

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    Quote Originally Posted by please_try_again View Post
    You should use the UUID of the partition, not the disk/partition number. See examples here: Manually adding a new entry (e.g. Windows) to the GRUB2-EFI boot loader menu an here: Confused with grub2-efi / opensuse / win 8


    Is anyone going/willing to tell me some day if updategrub is able ta add this entry automatically or not (on openSUSE 12.2 + WIndows 8) ... If not, we will never know, as I'm certainly not going to buy a crappy (or even not crappy) Windows8 laptop!

    * Under 12.1 and WIndows7, it would have added a boot entry for Windows, even before we patched os-prober for UEFI.
    Thank you very much for that information. I will try using the UUID method.

    I don't know if this quite answers your question, but... if you're referring to update-grub, it was featured with grub only, technically not grub2. Some distros still ship grub2 with the update-grub stub (not SUSE from what I can tell), but from what I've read, upgrade-grub was deprecated with grub2 in place of the command 'grub2-mkconfig -o /boot/grub2/grub.cfg'.

  4. #4

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    Well, I tried the UUID method, re-generated my grub.cfg file & chose Windows 8 from the grub screen but unfortunately it didn't work. It said:
    'error: invalid signature.'
    What troubleshooting steps can I take next?

  5. #5

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    Quote Originally Posted by echoes- View Post
    Well, I tried the UUID method, re-generated my grub.cfg file & chose Windows 8 from the grub screen but unfortunately it didn't work. It said:
    'error: invalid signature.'
    What troubleshooting steps can I take next?
    Are you sure you put the UUID of the ESP partition? (the one containing Windows efi boot loader).

  6. #6

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    Quote Originally Posted by please_try_again View Post
    Are you sure you put the UUID of the ESP partition? (the one containing Windows efi boot loader).
    Yes. What I did was, looked at the YaST Partitioner which showed me that /dev/sda2 is the partition that contains the Windows EFI boot loader:


    So then I ran this:
    sudo /usr/sbin/grub2-probe -t fs_uuid -d /dev/sda2

    and it told me that the UUID is: B855-E9C8.

    I then edited my 30_windows file to reflect this:
    Code:
    #!/bin/bash
    cat << EOF
    menuentry "Windows 8" {
            insmod part_gpt
            insmod fat
            insmod search_fs_uuid
            insmod chain
            search --fs-uuid --no-floppy --set=root B855-E9C8
            chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }
    EOF
    I then re-generated my grub.cfg file with this command: grub2-mkconfig -o /boot/grub2/grub.cfg

    Restarted the PC and selected Windows 8 from the grub screen but it just says:
    error: invalid signature.

  7. #7

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    Update:
    Upon further research, I've found two common causes of the 'invalid signature' error.

    #1 is that one is mistakenly pointing the root at the recovery partition instead of the boot partition. Based on my screenshot though, we know that is not the case. The EFI boot partition is clearly listed as /dev/sda2.

    #2 is that the device map is outdated/stale. The Arch wiki recommends deleting the existing device map and regenerating the grub.cfg file, which I did, however, this didn't have any effect at all.

    Grub2 still complains of an invalid signature.

  8. #8

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    @echoes-

    Do you mind trying something - which might even fix your problem if it still works?

    Install the package updategrub from my repo (it has nothing to do with Ubuntu's update-grub).
    Here are some relevant threads:

    latest os-prober and updategrub development ...

    Installing Grub2 with updateGrub2

    It was previously intended to install grub2-efi on UEFI systems under openSUSE 12.1 (where it wan't installed by default). It can be used to refresh the grub menu on both UEFI and legacy systems and has a couple features (some of them require os-prober from my repo - which might be the one you installed alreaydy (?) )

    The following command will just display the boot menu without writing anything:
    Code:
    # updategrub -d
    But I'm not sure it will actually write 40_custom.

    You don't need a separate script such as your 30_windows. Is it exectuable by the way?


    Again, I don't know it updategrub is going to work. I'm afraid it won't. That's why I'm asking you. Unfortunately I don't have an openSUSE 12.2 + Window 8 UEFI system nor time to fix it... Otherwise it would be "simple".

  9. #9

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    Quote Originally Posted by echoes- View Post
    Update:
    Upon further research, I've found two common causes of the 'invalid signature' error.

    #1 is that one is mistakenly pointing the root at the recovery partition instead of the boot partition. Based on my screenshot though, we know that is not the case. The EFI boot partition is clearly listed as /dev/sda2.

    #2 is that the device map is outdated/stale. The Arch wiki recommends deleting the existing device map and regenerating the grub.cfg file, which I did, however, this didn't have any effect at all.

    Grub2 still complains of an invalid signature.
    Something is unclear though. When you say "grub2", do you mean "grub2-efi" ?

  10. #10

    Default Re: openSUSE 12.2/Windows 8 (UEFI) dual boot / grub2

    Quote Originally Posted by echoes- View Post
    I then re-generated my grub.cfg file with this command: grub2-mkconfig -o /boot/grub2/grub.cfg
    If you have 12.2, configuration is in /boot/grub2-efi/grub.cfg

Page 1 of 5 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •