Grub 2 os prober for windows 8











up vote
4
down vote

favorite












I'm trying to dual boot with fedora 20 and windows 8.
I install first windows and then fedora. And grub detects windows automatically.



So the default etcgrub.d30_os-prober for windows is this:



case ${BOOT} in chain)

onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os $menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
EOF
save_default_entry | grub_add_tab
prepare_grub_to_access_device ${DEVICE} | grub_add_tab

case ${LONGNAME} in
Windows Vista*|Windows 7*|Windows Server 2008*)
;;
*)
cat << EOF
drivemap -s (hd0) ${root}
EOF
;;
esac

cat <<EOF
chainloader +1
}


This creates this menuentry which doesn't boot windows:



What I've tried



I created in my /etc/grub.d/40_custom manually a menuentry which works fine



menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root your_UUID
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}


So I try to adapt this for the etcgrub.d30_os-prober and add replace the last part with this:



cat <<EOF
search --fs-uuid --no-floppy --set=root $(grub_get_device_id "${DEVICE}")
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
EOF


but this creates:



menuentry 'Windows Boot Manager' {
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
}


Which doesn't work.



My question



How should I change 30_os-prober so that it creates a working grub menuentry?










share|improve this question
























  • I don't know a ton about grub, but if I were you I would try changing Windows Vista*|Windows 7*|Windows Server 2008*) to Windows Vista*|Windows 7*|Windows Server 2008*|Windows 8*).
    – Alex Layton
    Feb 6 '14 at 1:49










  • Consider using rEFInd as your bootloader. For more information on how it stacks up to grub, look here
    – evamvid
    Sep 5 '17 at 3:47















up vote
4
down vote

favorite












I'm trying to dual boot with fedora 20 and windows 8.
I install first windows and then fedora. And grub detects windows automatically.



So the default etcgrub.d30_os-prober for windows is this:



case ${BOOT} in chain)

onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os $menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
EOF
save_default_entry | grub_add_tab
prepare_grub_to_access_device ${DEVICE} | grub_add_tab

case ${LONGNAME} in
Windows Vista*|Windows 7*|Windows Server 2008*)
;;
*)
cat << EOF
drivemap -s (hd0) ${root}
EOF
;;
esac

cat <<EOF
chainloader +1
}


This creates this menuentry which doesn't boot windows:



What I've tried



I created in my /etc/grub.d/40_custom manually a menuentry which works fine



menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root your_UUID
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}


So I try to adapt this for the etcgrub.d30_os-prober and add replace the last part with this:



cat <<EOF
search --fs-uuid --no-floppy --set=root $(grub_get_device_id "${DEVICE}")
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
EOF


but this creates:



menuentry 'Windows Boot Manager' {
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
}


Which doesn't work.



My question



How should I change 30_os-prober so that it creates a working grub menuentry?










share|improve this question
























  • I don't know a ton about grub, but if I were you I would try changing Windows Vista*|Windows 7*|Windows Server 2008*) to Windows Vista*|Windows 7*|Windows Server 2008*|Windows 8*).
    – Alex Layton
    Feb 6 '14 at 1:49










  • Consider using rEFInd as your bootloader. For more information on how it stacks up to grub, look here
    – evamvid
    Sep 5 '17 at 3:47













up vote
4
down vote

favorite









up vote
4
down vote

favorite











I'm trying to dual boot with fedora 20 and windows 8.
I install first windows and then fedora. And grub detects windows automatically.



So the default etcgrub.d30_os-prober for windows is this:



case ${BOOT} in chain)

onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os $menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
EOF
save_default_entry | grub_add_tab
prepare_grub_to_access_device ${DEVICE} | grub_add_tab

case ${LONGNAME} in
Windows Vista*|Windows 7*|Windows Server 2008*)
;;
*)
cat << EOF
drivemap -s (hd0) ${root}
EOF
;;
esac

cat <<EOF
chainloader +1
}


This creates this menuentry which doesn't boot windows:



What I've tried



I created in my /etc/grub.d/40_custom manually a menuentry which works fine



menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root your_UUID
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}


So I try to adapt this for the etcgrub.d30_os-prober and add replace the last part with this:



cat <<EOF
search --fs-uuid --no-floppy --set=root $(grub_get_device_id "${DEVICE}")
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
EOF


but this creates:



menuentry 'Windows Boot Manager' {
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
}


Which doesn't work.



My question



How should I change 30_os-prober so that it creates a working grub menuentry?










share|improve this question















I'm trying to dual boot with fedora 20 and windows 8.
I install first windows and then fedora. And grub detects windows automatically.



So the default etcgrub.d30_os-prober for windows is this:



case ${BOOT} in chain)

onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os $menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
EOF
save_default_entry | grub_add_tab
prepare_grub_to_access_device ${DEVICE} | grub_add_tab

case ${LONGNAME} in
Windows Vista*|Windows 7*|Windows Server 2008*)
;;
*)
cat << EOF
drivemap -s (hd0) ${root}
EOF
;;
esac

cat <<EOF
chainloader +1
}


This creates this menuentry which doesn't boot windows:



What I've tried



I created in my /etc/grub.d/40_custom manually a menuentry which works fine



menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root your_UUID
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}


So I try to adapt this for the etcgrub.d30_os-prober and add replace the last part with this:



cat <<EOF
search --fs-uuid --no-floppy --set=root $(grub_get_device_id "${DEVICE}")
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
EOF


but this creates:



menuentry 'Windows Boot Manager' {
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
}


Which doesn't work.



My question



How should I change 30_os-prober so that it creates a working grub menuentry?







fedora windows grub2






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 29 '17 at 9:38









Thomas

3,65141225




3,65141225










asked Dec 18 '13 at 18:40









Sir l33tname

200415




200415












  • I don't know a ton about grub, but if I were you I would try changing Windows Vista*|Windows 7*|Windows Server 2008*) to Windows Vista*|Windows 7*|Windows Server 2008*|Windows 8*).
    – Alex Layton
    Feb 6 '14 at 1:49










  • Consider using rEFInd as your bootloader. For more information on how it stacks up to grub, look here
    – evamvid
    Sep 5 '17 at 3:47


















  • I don't know a ton about grub, but if I were you I would try changing Windows Vista*|Windows 7*|Windows Server 2008*) to Windows Vista*|Windows 7*|Windows Server 2008*|Windows 8*).
    – Alex Layton
    Feb 6 '14 at 1:49










  • Consider using rEFInd as your bootloader. For more information on how it stacks up to grub, look here
    – evamvid
    Sep 5 '17 at 3:47
















I don't know a ton about grub, but if I were you I would try changing Windows Vista*|Windows 7*|Windows Server 2008*) to Windows Vista*|Windows 7*|Windows Server 2008*|Windows 8*).
– Alex Layton
Feb 6 '14 at 1:49




I don't know a ton about grub, but if I were you I would try changing Windows Vista*|Windows 7*|Windows Server 2008*) to Windows Vista*|Windows 7*|Windows Server 2008*|Windows 8*).
– Alex Layton
Feb 6 '14 at 1:49












Consider using rEFInd as your bootloader. For more information on how it stacks up to grub, look here
– evamvid
Sep 5 '17 at 3:47




Consider using rEFInd as your bootloader. For more information on how it stacks up to grub, look here
– evamvid
Sep 5 '17 at 3:47










2 Answers
2






active

oldest

votes

















up vote
0
down vote













I am not that well versed with the Fedora and its Grub2. But i will share a solution i adopted in my dual-boot system with Ubuntu and Windows XP Professional
Edit grub.cfg with vim or any other editor



vim /boot/grub/grub.cfg 


To:



 121 ### BEGIN /etc/grub.d/30_os-prober ###
122 menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
123 insmod part_msdos
124 insmod ntfs
125 set root='(/dev/sda,msdos1)'
126 search --no-floppy --fs-uuid --set=root AC60CA8160CA522E
127 drivemap -s (hd0) ${root}
128 chainloader +1
129 }


as the Ubuntu grub default adds this Windows as the last entry. I just added this entry in front of all other menu entries.






share|improve this answer





















  • your solution look like what I do at the moment in 30_custom, but thank you anyway :D
    – Sir l33tname
    Feb 11 '14 at 14:30


















up vote
0
down vote













Try this :-



menuentry "WINDOWS"{
set root='(hd0,msdos1)'
chainloader +1
}



Change the partition number , where your windows is installed.
hd0 :- means first disk
msdos1 :- means first partition.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f105766%2fgrub-2-os-prober-for-windows-8%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I am not that well versed with the Fedora and its Grub2. But i will share a solution i adopted in my dual-boot system with Ubuntu and Windows XP Professional
    Edit grub.cfg with vim or any other editor



    vim /boot/grub/grub.cfg 


    To:



     121 ### BEGIN /etc/grub.d/30_os-prober ###
    122 menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
    123 insmod part_msdos
    124 insmod ntfs
    125 set root='(/dev/sda,msdos1)'
    126 search --no-floppy --fs-uuid --set=root AC60CA8160CA522E
    127 drivemap -s (hd0) ${root}
    128 chainloader +1
    129 }


    as the Ubuntu grub default adds this Windows as the last entry. I just added this entry in front of all other menu entries.






    share|improve this answer





















    • your solution look like what I do at the moment in 30_custom, but thank you anyway :D
      – Sir l33tname
      Feb 11 '14 at 14:30















    up vote
    0
    down vote













    I am not that well versed with the Fedora and its Grub2. But i will share a solution i adopted in my dual-boot system with Ubuntu and Windows XP Professional
    Edit grub.cfg with vim or any other editor



    vim /boot/grub/grub.cfg 


    To:



     121 ### BEGIN /etc/grub.d/30_os-prober ###
    122 menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
    123 insmod part_msdos
    124 insmod ntfs
    125 set root='(/dev/sda,msdos1)'
    126 search --no-floppy --fs-uuid --set=root AC60CA8160CA522E
    127 drivemap -s (hd0) ${root}
    128 chainloader +1
    129 }


    as the Ubuntu grub default adds this Windows as the last entry. I just added this entry in front of all other menu entries.






    share|improve this answer





















    • your solution look like what I do at the moment in 30_custom, but thank you anyway :D
      – Sir l33tname
      Feb 11 '14 at 14:30













    up vote
    0
    down vote










    up vote
    0
    down vote









    I am not that well versed with the Fedora and its Grub2. But i will share a solution i adopted in my dual-boot system with Ubuntu and Windows XP Professional
    Edit grub.cfg with vim or any other editor



    vim /boot/grub/grub.cfg 


    To:



     121 ### BEGIN /etc/grub.d/30_os-prober ###
    122 menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
    123 insmod part_msdos
    124 insmod ntfs
    125 set root='(/dev/sda,msdos1)'
    126 search --no-floppy --fs-uuid --set=root AC60CA8160CA522E
    127 drivemap -s (hd0) ${root}
    128 chainloader +1
    129 }


    as the Ubuntu grub default adds this Windows as the last entry. I just added this entry in front of all other menu entries.






    share|improve this answer












    I am not that well versed with the Fedora and its Grub2. But i will share a solution i adopted in my dual-boot system with Ubuntu and Windows XP Professional
    Edit grub.cfg with vim or any other editor



    vim /boot/grub/grub.cfg 


    To:



     121 ### BEGIN /etc/grub.d/30_os-prober ###
    122 menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
    123 insmod part_msdos
    124 insmod ntfs
    125 set root='(/dev/sda,msdos1)'
    126 search --no-floppy --fs-uuid --set=root AC60CA8160CA522E
    127 drivemap -s (hd0) ${root}
    128 chainloader +1
    129 }


    as the Ubuntu grub default adds this Windows as the last entry. I just added this entry in front of all other menu entries.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 11 '14 at 6:54









    Shashank Bajpai

    9817




    9817












    • your solution look like what I do at the moment in 30_custom, but thank you anyway :D
      – Sir l33tname
      Feb 11 '14 at 14:30


















    • your solution look like what I do at the moment in 30_custom, but thank you anyway :D
      – Sir l33tname
      Feb 11 '14 at 14:30
















    your solution look like what I do at the moment in 30_custom, but thank you anyway :D
    – Sir l33tname
    Feb 11 '14 at 14:30




    your solution look like what I do at the moment in 30_custom, but thank you anyway :D
    – Sir l33tname
    Feb 11 '14 at 14:30












    up vote
    0
    down vote













    Try this :-



    menuentry "WINDOWS"{
    set root='(hd0,msdos1)'
    chainloader +1
    }



    Change the partition number , where your windows is installed.
    hd0 :- means first disk
    msdos1 :- means first partition.






    share|improve this answer

























      up vote
      0
      down vote













      Try this :-



      menuentry "WINDOWS"{
      set root='(hd0,msdos1)'
      chainloader +1
      }



      Change the partition number , where your windows is installed.
      hd0 :- means first disk
      msdos1 :- means first partition.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Try this :-



        menuentry "WINDOWS"{
        set root='(hd0,msdos1)'
        chainloader +1
        }



        Change the partition number , where your windows is installed.
        hd0 :- means first disk
        msdos1 :- means first partition.






        share|improve this answer












        Try this :-



        menuentry "WINDOWS"{
        set root='(hd0,msdos1)'
        chainloader +1
        }



        Change the partition number , where your windows is installed.
        hd0 :- means first disk
        msdos1 :- means first partition.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 1 '17 at 7:49









        avtar singh

        603




        603






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f105766%2fgrub-2-os-prober-for-windows-8%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Morgemoulin

            Scott Moir

            Souastre