Add Windows 10 to Grub2 bootloader












0














I've gone through the usual steps for adding Windows to the bootloader options by modifying 40_custom and adding the following:



menuentry "Windows 10" {
insmod part_gpt
insmod chain
set root='(hd0,msdos2)'
chainloader +1
}


However, when I select Windows in the bootloader, it says "Error: invalid signature. Press any key to continue". I don't know why I'm getting this error. How can I fix it?
EDIT: It says there are syntax errors here but I can't see any.
if [ "${grub_platform}" == "pc" ]; then
menuentry "Microsoft Windows Vista/7/8/8.1/10 BIOS/MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr

search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 XXXXXXXXXXXXXXXX
ntldr /bootmgr
}
fi



EDIT2: Output of sudo fdisk -l



~$ sudo fdisk -l
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 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
Disklabel type: dos
Disk identifier: 0x71b1e4fb

Device Boot Start End Sectors Size Id Type
/dev/sda1 63 80324 80262 39.2M de Dell Utility
/dev/sda2 * 223580160 286285823 62705664 29.9G 83 Linux
/dev/sda3 30801920 223580159 192778240 91.9G 7 HPFS/NTFS/exFAT
/dev/sda4 286287870 625141759 338853890 161.6G 5 Extended
/dev/sda5 571742208 573741055 1998848 976M 82 Linux swap / Solaris
/dev/sda6 573743104 625141759 51398656 24.5G 83 Linux
/dev/sda7 286287872 345180159 58892288 28.1G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdb: 7.5 GiB, 8004829184 bytes, 15634432 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
Disklabel type: dos
Disk identifier: 0x037cbc77

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 15634431 15632384 7.5G c W95 FAT32 (LBA)









share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Give some more information, are you using UEFI or BIOS mode? Which guide you are following ?
    – Arpit Agarwal
    Jul 5 at 23:40










  • @ArpitAgarwal I'm honestly not sure. This is an old 32=bit computer from 2009 and there bios doesn't even let me choose between UEFI or Legacy. I was following generic guides for adding Windows to the bootloader by editing 40_custom and then rewriting using grub-mkconfig
    – Christopher Russell
    Jul 6 at 21:43












  • have a look at wiki.archlinux.org/index.php/…
    – Arpit Agarwal
    Jul 6 at 21:54










  • Dang, I followed the steps for Windows Vista/7/8/8.1/10 but I'm still getting Invalid Signature. I might have messed with a file that I shouldn't have
    – Christopher Russell
    Jul 7 at 0:36










  • @ArpitAgarwal It actually says there are syntax errors. Do you see any? Check my update above
    – Christopher Russell
    Jul 7 at 0:58
















0














I've gone through the usual steps for adding Windows to the bootloader options by modifying 40_custom and adding the following:



menuentry "Windows 10" {
insmod part_gpt
insmod chain
set root='(hd0,msdos2)'
chainloader +1
}


However, when I select Windows in the bootloader, it says "Error: invalid signature. Press any key to continue". I don't know why I'm getting this error. How can I fix it?
EDIT: It says there are syntax errors here but I can't see any.
if [ "${grub_platform}" == "pc" ]; then
menuentry "Microsoft Windows Vista/7/8/8.1/10 BIOS/MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr

search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 XXXXXXXXXXXXXXXX
ntldr /bootmgr
}
fi



EDIT2: Output of sudo fdisk -l



~$ sudo fdisk -l
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 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
Disklabel type: dos
Disk identifier: 0x71b1e4fb

Device Boot Start End Sectors Size Id Type
/dev/sda1 63 80324 80262 39.2M de Dell Utility
/dev/sda2 * 223580160 286285823 62705664 29.9G 83 Linux
/dev/sda3 30801920 223580159 192778240 91.9G 7 HPFS/NTFS/exFAT
/dev/sda4 286287870 625141759 338853890 161.6G 5 Extended
/dev/sda5 571742208 573741055 1998848 976M 82 Linux swap / Solaris
/dev/sda6 573743104 625141759 51398656 24.5G 83 Linux
/dev/sda7 286287872 345180159 58892288 28.1G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdb: 7.5 GiB, 8004829184 bytes, 15634432 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
Disklabel type: dos
Disk identifier: 0x037cbc77

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 15634431 15632384 7.5G c W95 FAT32 (LBA)









share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Give some more information, are you using UEFI or BIOS mode? Which guide you are following ?
    – Arpit Agarwal
    Jul 5 at 23:40










  • @ArpitAgarwal I'm honestly not sure. This is an old 32=bit computer from 2009 and there bios doesn't even let me choose between UEFI or Legacy. I was following generic guides for adding Windows to the bootloader by editing 40_custom and then rewriting using grub-mkconfig
    – Christopher Russell
    Jul 6 at 21:43












  • have a look at wiki.archlinux.org/index.php/…
    – Arpit Agarwal
    Jul 6 at 21:54










  • Dang, I followed the steps for Windows Vista/7/8/8.1/10 but I'm still getting Invalid Signature. I might have messed with a file that I shouldn't have
    – Christopher Russell
    Jul 7 at 0:36










  • @ArpitAgarwal It actually says there are syntax errors. Do you see any? Check my update above
    – Christopher Russell
    Jul 7 at 0:58














0












0








0







I've gone through the usual steps for adding Windows to the bootloader options by modifying 40_custom and adding the following:



menuentry "Windows 10" {
insmod part_gpt
insmod chain
set root='(hd0,msdos2)'
chainloader +1
}


However, when I select Windows in the bootloader, it says "Error: invalid signature. Press any key to continue". I don't know why I'm getting this error. How can I fix it?
EDIT: It says there are syntax errors here but I can't see any.
if [ "${grub_platform}" == "pc" ]; then
menuentry "Microsoft Windows Vista/7/8/8.1/10 BIOS/MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr

search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 XXXXXXXXXXXXXXXX
ntldr /bootmgr
}
fi



EDIT2: Output of sudo fdisk -l



~$ sudo fdisk -l
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 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
Disklabel type: dos
Disk identifier: 0x71b1e4fb

Device Boot Start End Sectors Size Id Type
/dev/sda1 63 80324 80262 39.2M de Dell Utility
/dev/sda2 * 223580160 286285823 62705664 29.9G 83 Linux
/dev/sda3 30801920 223580159 192778240 91.9G 7 HPFS/NTFS/exFAT
/dev/sda4 286287870 625141759 338853890 161.6G 5 Extended
/dev/sda5 571742208 573741055 1998848 976M 82 Linux swap / Solaris
/dev/sda6 573743104 625141759 51398656 24.5G 83 Linux
/dev/sda7 286287872 345180159 58892288 28.1G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdb: 7.5 GiB, 8004829184 bytes, 15634432 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
Disklabel type: dos
Disk identifier: 0x037cbc77

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 15634431 15632384 7.5G c W95 FAT32 (LBA)









share|improve this question















I've gone through the usual steps for adding Windows to the bootloader options by modifying 40_custom and adding the following:



menuentry "Windows 10" {
insmod part_gpt
insmod chain
set root='(hd0,msdos2)'
chainloader +1
}


However, when I select Windows in the bootloader, it says "Error: invalid signature. Press any key to continue". I don't know why I'm getting this error. How can I fix it?
EDIT: It says there are syntax errors here but I can't see any.
if [ "${grub_platform}" == "pc" ]; then
menuentry "Microsoft Windows Vista/7/8/8.1/10 BIOS/MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr

search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 XXXXXXXXXXXXXXXX
ntldr /bootmgr
}
fi



EDIT2: Output of sudo fdisk -l



~$ sudo fdisk -l
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 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
Disklabel type: dos
Disk identifier: 0x71b1e4fb

Device Boot Start End Sectors Size Id Type
/dev/sda1 63 80324 80262 39.2M de Dell Utility
/dev/sda2 * 223580160 286285823 62705664 29.9G 83 Linux
/dev/sda3 30801920 223580159 192778240 91.9G 7 HPFS/NTFS/exFAT
/dev/sda4 286287870 625141759 338853890 161.6G 5 Extended
/dev/sda5 571742208 573741055 1998848 976M 82 Linux swap / Solaris
/dev/sda6 573743104 625141759 51398656 24.5G 83 Linux
/dev/sda7 286287872 345180159 58892288 28.1G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdb: 7.5 GiB, 8004829184 bytes, 15634432 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
Disklabel type: dos
Disk identifier: 0x037cbc77

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 15634431 15632384 7.5G c W95 FAT32 (LBA)






ubuntu windows grub2 dual-boot boot-loader






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 7 at 2:39

























asked Jul 2 at 23:56









Christopher Russell

94




94





bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Give some more information, are you using UEFI or BIOS mode? Which guide you are following ?
    – Arpit Agarwal
    Jul 5 at 23:40










  • @ArpitAgarwal I'm honestly not sure. This is an old 32=bit computer from 2009 and there bios doesn't even let me choose between UEFI or Legacy. I was following generic guides for adding Windows to the bootloader by editing 40_custom and then rewriting using grub-mkconfig
    – Christopher Russell
    Jul 6 at 21:43












  • have a look at wiki.archlinux.org/index.php/…
    – Arpit Agarwal
    Jul 6 at 21:54










  • Dang, I followed the steps for Windows Vista/7/8/8.1/10 but I'm still getting Invalid Signature. I might have messed with a file that I shouldn't have
    – Christopher Russell
    Jul 7 at 0:36










  • @ArpitAgarwal It actually says there are syntax errors. Do you see any? Check my update above
    – Christopher Russell
    Jul 7 at 0:58


















  • Give some more information, are you using UEFI or BIOS mode? Which guide you are following ?
    – Arpit Agarwal
    Jul 5 at 23:40










  • @ArpitAgarwal I'm honestly not sure. This is an old 32=bit computer from 2009 and there bios doesn't even let me choose between UEFI or Legacy. I was following generic guides for adding Windows to the bootloader by editing 40_custom and then rewriting using grub-mkconfig
    – Christopher Russell
    Jul 6 at 21:43












  • have a look at wiki.archlinux.org/index.php/…
    – Arpit Agarwal
    Jul 6 at 21:54










  • Dang, I followed the steps for Windows Vista/7/8/8.1/10 but I'm still getting Invalid Signature. I might have messed with a file that I shouldn't have
    – Christopher Russell
    Jul 7 at 0:36










  • @ArpitAgarwal It actually says there are syntax errors. Do you see any? Check my update above
    – Christopher Russell
    Jul 7 at 0:58
















Give some more information, are you using UEFI or BIOS mode? Which guide you are following ?
– Arpit Agarwal
Jul 5 at 23:40




Give some more information, are you using UEFI or BIOS mode? Which guide you are following ?
– Arpit Agarwal
Jul 5 at 23:40












@ArpitAgarwal I'm honestly not sure. This is an old 32=bit computer from 2009 and there bios doesn't even let me choose between UEFI or Legacy. I was following generic guides for adding Windows to the bootloader by editing 40_custom and then rewriting using grub-mkconfig
– Christopher Russell
Jul 6 at 21:43






@ArpitAgarwal I'm honestly not sure. This is an old 32=bit computer from 2009 and there bios doesn't even let me choose between UEFI or Legacy. I was following generic guides for adding Windows to the bootloader by editing 40_custom and then rewriting using grub-mkconfig
– Christopher Russell
Jul 6 at 21:43














have a look at wiki.archlinux.org/index.php/…
– Arpit Agarwal
Jul 6 at 21:54




have a look at wiki.archlinux.org/index.php/…
– Arpit Agarwal
Jul 6 at 21:54












Dang, I followed the steps for Windows Vista/7/8/8.1/10 but I'm still getting Invalid Signature. I might have messed with a file that I shouldn't have
– Christopher Russell
Jul 7 at 0:36




Dang, I followed the steps for Windows Vista/7/8/8.1/10 but I'm still getting Invalid Signature. I might have messed with a file that I shouldn't have
– Christopher Russell
Jul 7 at 0:36












@ArpitAgarwal It actually says there are syntax errors. Do you see any? Check my update above
– Christopher Russell
Jul 7 at 0:58




@ArpitAgarwal It actually says there are syntax errors. Do you see any? Check my update above
– Christopher Russell
Jul 7 at 0:58










2 Answers
2






active

oldest

votes


















0














You should install os-prober and run it once



sudo apt-get install os-prober
sudo os-prober


Generate grub config file



sudo grub-mkconfig -o /boot/grub/grub.cfg


Don't edit the file manually






share|improve this answer





















  • Same error unfortunately. OS-prober didn't detect Windows 10 either.
    – Christopher Russell
    Jul 5 at 23:35










  • If os-prober isn't listing then most probably the windows partition has got some issue. Reinstall is the only option left
    – Arpit Agarwal
    Jul 7 at 2:20










  • I know you mean reinstall Windows but is there any way to reinstall Grub without an active internet connection? I think it's a problem with Grub since this is a fresh installation of Windows
    – Christopher Russell
    Jul 7 at 2:28










  • Are you using ubuntu unity ? If yes, then try some other flavor like xubuntu
    – Arpit Agarwal
    Jul 7 at 2:34










  • Also post the output of sudo fdisk -l
    – Arpit Agarwal
    Jul 7 at 2:35



















0














It looks like you've followed an old guide that expects Windows to use MBR partitioning.



The "invalid signature" error suggests Secure Boot is enabled. When Secure Boot is enabled, all bootloaders must be signed with a private key, and a matching public key must be included in the Secure Boot variables in the firmware NVRAM. GRUB is dutifully reading the first sector of the partition you've specified, but since it does not contain the appropriate Secure Boot signature, the firmware refuses to execute it.



Secure Boot requires native UEFI-style boot as a prerequisite. You may be able to disable Secure Boot on your system, but since GRUB already starts for you, there is probably no need to do that.



Your insmod part_gpt suggest you expect the disk to have a GPT-style partitioning which usually goes together with UEFI boot style, but on the other hand, set root=(hd0,msdos2) expects a MBR partition.



On my Debian system with GPT partitioning, the set root line reads: set root='hd0,gpt1'. If your system uses GPT partitioning, use the gptN partition identifiers instead of msdosN.



Also chainloader +1 tells GRUB to read the boot block from the first block of the partition; in UEFI native boot, there is no such thing. To boot Windows in UEFI mode, the set root line should point to the EFI System Partition that contains the Windows bootloader, and the chainloader line should be chainloader /EFI/Microsoft/Boot/bootmgfw.efi.






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',
    autoActivateHeartbeat: false,
    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%2f453124%2fadd-windows-10-to-grub2-bootloader%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









    0














    You should install os-prober and run it once



    sudo apt-get install os-prober
    sudo os-prober


    Generate grub config file



    sudo grub-mkconfig -o /boot/grub/grub.cfg


    Don't edit the file manually






    share|improve this answer





















    • Same error unfortunately. OS-prober didn't detect Windows 10 either.
      – Christopher Russell
      Jul 5 at 23:35










    • If os-prober isn't listing then most probably the windows partition has got some issue. Reinstall is the only option left
      – Arpit Agarwal
      Jul 7 at 2:20










    • I know you mean reinstall Windows but is there any way to reinstall Grub without an active internet connection? I think it's a problem with Grub since this is a fresh installation of Windows
      – Christopher Russell
      Jul 7 at 2:28










    • Are you using ubuntu unity ? If yes, then try some other flavor like xubuntu
      – Arpit Agarwal
      Jul 7 at 2:34










    • Also post the output of sudo fdisk -l
      – Arpit Agarwal
      Jul 7 at 2:35
















    0














    You should install os-prober and run it once



    sudo apt-get install os-prober
    sudo os-prober


    Generate grub config file



    sudo grub-mkconfig -o /boot/grub/grub.cfg


    Don't edit the file manually






    share|improve this answer





















    • Same error unfortunately. OS-prober didn't detect Windows 10 either.
      – Christopher Russell
      Jul 5 at 23:35










    • If os-prober isn't listing then most probably the windows partition has got some issue. Reinstall is the only option left
      – Arpit Agarwal
      Jul 7 at 2:20










    • I know you mean reinstall Windows but is there any way to reinstall Grub without an active internet connection? I think it's a problem with Grub since this is a fresh installation of Windows
      – Christopher Russell
      Jul 7 at 2:28










    • Are you using ubuntu unity ? If yes, then try some other flavor like xubuntu
      – Arpit Agarwal
      Jul 7 at 2:34










    • Also post the output of sudo fdisk -l
      – Arpit Agarwal
      Jul 7 at 2:35














    0












    0








    0






    You should install os-prober and run it once



    sudo apt-get install os-prober
    sudo os-prober


    Generate grub config file



    sudo grub-mkconfig -o /boot/grub/grub.cfg


    Don't edit the file manually






    share|improve this answer












    You should install os-prober and run it once



    sudo apt-get install os-prober
    sudo os-prober


    Generate grub config file



    sudo grub-mkconfig -o /boot/grub/grub.cfg


    Don't edit the file manually







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 3 at 4:13









    Arpit Agarwal

    34429




    34429












    • Same error unfortunately. OS-prober didn't detect Windows 10 either.
      – Christopher Russell
      Jul 5 at 23:35










    • If os-prober isn't listing then most probably the windows partition has got some issue. Reinstall is the only option left
      – Arpit Agarwal
      Jul 7 at 2:20










    • I know you mean reinstall Windows but is there any way to reinstall Grub without an active internet connection? I think it's a problem with Grub since this is a fresh installation of Windows
      – Christopher Russell
      Jul 7 at 2:28










    • Are you using ubuntu unity ? If yes, then try some other flavor like xubuntu
      – Arpit Agarwal
      Jul 7 at 2:34










    • Also post the output of sudo fdisk -l
      – Arpit Agarwal
      Jul 7 at 2:35


















    • Same error unfortunately. OS-prober didn't detect Windows 10 either.
      – Christopher Russell
      Jul 5 at 23:35










    • If os-prober isn't listing then most probably the windows partition has got some issue. Reinstall is the only option left
      – Arpit Agarwal
      Jul 7 at 2:20










    • I know you mean reinstall Windows but is there any way to reinstall Grub without an active internet connection? I think it's a problem with Grub since this is a fresh installation of Windows
      – Christopher Russell
      Jul 7 at 2:28










    • Are you using ubuntu unity ? If yes, then try some other flavor like xubuntu
      – Arpit Agarwal
      Jul 7 at 2:34










    • Also post the output of sudo fdisk -l
      – Arpit Agarwal
      Jul 7 at 2:35
















    Same error unfortunately. OS-prober didn't detect Windows 10 either.
    – Christopher Russell
    Jul 5 at 23:35




    Same error unfortunately. OS-prober didn't detect Windows 10 either.
    – Christopher Russell
    Jul 5 at 23:35












    If os-prober isn't listing then most probably the windows partition has got some issue. Reinstall is the only option left
    – Arpit Agarwal
    Jul 7 at 2:20




    If os-prober isn't listing then most probably the windows partition has got some issue. Reinstall is the only option left
    – Arpit Agarwal
    Jul 7 at 2:20












    I know you mean reinstall Windows but is there any way to reinstall Grub without an active internet connection? I think it's a problem with Grub since this is a fresh installation of Windows
    – Christopher Russell
    Jul 7 at 2:28




    I know you mean reinstall Windows but is there any way to reinstall Grub without an active internet connection? I think it's a problem with Grub since this is a fresh installation of Windows
    – Christopher Russell
    Jul 7 at 2:28












    Are you using ubuntu unity ? If yes, then try some other flavor like xubuntu
    – Arpit Agarwal
    Jul 7 at 2:34




    Are you using ubuntu unity ? If yes, then try some other flavor like xubuntu
    – Arpit Agarwal
    Jul 7 at 2:34












    Also post the output of sudo fdisk -l
    – Arpit Agarwal
    Jul 7 at 2:35




    Also post the output of sudo fdisk -l
    – Arpit Agarwal
    Jul 7 at 2:35













    0














    It looks like you've followed an old guide that expects Windows to use MBR partitioning.



    The "invalid signature" error suggests Secure Boot is enabled. When Secure Boot is enabled, all bootloaders must be signed with a private key, and a matching public key must be included in the Secure Boot variables in the firmware NVRAM. GRUB is dutifully reading the first sector of the partition you've specified, but since it does not contain the appropriate Secure Boot signature, the firmware refuses to execute it.



    Secure Boot requires native UEFI-style boot as a prerequisite. You may be able to disable Secure Boot on your system, but since GRUB already starts for you, there is probably no need to do that.



    Your insmod part_gpt suggest you expect the disk to have a GPT-style partitioning which usually goes together with UEFI boot style, but on the other hand, set root=(hd0,msdos2) expects a MBR partition.



    On my Debian system with GPT partitioning, the set root line reads: set root='hd0,gpt1'. If your system uses GPT partitioning, use the gptN partition identifiers instead of msdosN.



    Also chainloader +1 tells GRUB to read the boot block from the first block of the partition; in UEFI native boot, there is no such thing. To boot Windows in UEFI mode, the set root line should point to the EFI System Partition that contains the Windows bootloader, and the chainloader line should be chainloader /EFI/Microsoft/Boot/bootmgfw.efi.






    share|improve this answer


























      0














      It looks like you've followed an old guide that expects Windows to use MBR partitioning.



      The "invalid signature" error suggests Secure Boot is enabled. When Secure Boot is enabled, all bootloaders must be signed with a private key, and a matching public key must be included in the Secure Boot variables in the firmware NVRAM. GRUB is dutifully reading the first sector of the partition you've specified, but since it does not contain the appropriate Secure Boot signature, the firmware refuses to execute it.



      Secure Boot requires native UEFI-style boot as a prerequisite. You may be able to disable Secure Boot on your system, but since GRUB already starts for you, there is probably no need to do that.



      Your insmod part_gpt suggest you expect the disk to have a GPT-style partitioning which usually goes together with UEFI boot style, but on the other hand, set root=(hd0,msdos2) expects a MBR partition.



      On my Debian system with GPT partitioning, the set root line reads: set root='hd0,gpt1'. If your system uses GPT partitioning, use the gptN partition identifiers instead of msdosN.



      Also chainloader +1 tells GRUB to read the boot block from the first block of the partition; in UEFI native boot, there is no such thing. To boot Windows in UEFI mode, the set root line should point to the EFI System Partition that contains the Windows bootloader, and the chainloader line should be chainloader /EFI/Microsoft/Boot/bootmgfw.efi.






      share|improve this answer
























        0












        0








        0






        It looks like you've followed an old guide that expects Windows to use MBR partitioning.



        The "invalid signature" error suggests Secure Boot is enabled. When Secure Boot is enabled, all bootloaders must be signed with a private key, and a matching public key must be included in the Secure Boot variables in the firmware NVRAM. GRUB is dutifully reading the first sector of the partition you've specified, but since it does not contain the appropriate Secure Boot signature, the firmware refuses to execute it.



        Secure Boot requires native UEFI-style boot as a prerequisite. You may be able to disable Secure Boot on your system, but since GRUB already starts for you, there is probably no need to do that.



        Your insmod part_gpt suggest you expect the disk to have a GPT-style partitioning which usually goes together with UEFI boot style, but on the other hand, set root=(hd0,msdos2) expects a MBR partition.



        On my Debian system with GPT partitioning, the set root line reads: set root='hd0,gpt1'. If your system uses GPT partitioning, use the gptN partition identifiers instead of msdosN.



        Also chainloader +1 tells GRUB to read the boot block from the first block of the partition; in UEFI native boot, there is no such thing. To boot Windows in UEFI mode, the set root line should point to the EFI System Partition that contains the Windows bootloader, and the chainloader line should be chainloader /EFI/Microsoft/Boot/bootmgfw.efi.






        share|improve this answer












        It looks like you've followed an old guide that expects Windows to use MBR partitioning.



        The "invalid signature" error suggests Secure Boot is enabled. When Secure Boot is enabled, all bootloaders must be signed with a private key, and a matching public key must be included in the Secure Boot variables in the firmware NVRAM. GRUB is dutifully reading the first sector of the partition you've specified, but since it does not contain the appropriate Secure Boot signature, the firmware refuses to execute it.



        Secure Boot requires native UEFI-style boot as a prerequisite. You may be able to disable Secure Boot on your system, but since GRUB already starts for you, there is probably no need to do that.



        Your insmod part_gpt suggest you expect the disk to have a GPT-style partitioning which usually goes together with UEFI boot style, but on the other hand, set root=(hd0,msdos2) expects a MBR partition.



        On my Debian system with GPT partitioning, the set root line reads: set root='hd0,gpt1'. If your system uses GPT partitioning, use the gptN partition identifiers instead of msdosN.



        Also chainloader +1 tells GRUB to read the boot block from the first block of the partition; in UEFI native boot, there is no such thing. To boot Windows in UEFI mode, the set root line should point to the EFI System Partition that contains the Windows bootloader, and the chainloader line should be chainloader /EFI/Microsoft/Boot/bootmgfw.efi.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 3 at 20:39









        telcoM

        15.7k12143




        15.7k12143






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453124%2fadd-windows-10-to-grub2-bootloader%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

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt